Fixed bug in progress reporting.

This commit is contained in:
Harald Kuhr 2015-04-09 11:44:53 +02:00
parent e61f6f6d7b
commit 2a5736bea1

View File

@ -277,13 +277,13 @@ public final class PCXImageReader extends ImageReaderBase {
throw new AssertionError();
}
processImageProgress(100f * y / height * c / header.getChannels());
if (abortRequested()) {
break;
}
}
processImageProgress(100f * y / height);
if (y >= srcRegion.y + srcRegion.height) {
break;
}
@ -300,6 +300,11 @@ public final class PCXImageReader extends ImageReaderBase {
return destination;
}
protected void processImageProgress(float percentageDone) {
// System.err.println("percentageDone: " + percentageDone);
super.processImageProgress(percentageDone);
}
private void readRowByte(final DataInput input,
Rectangle srcRegion,
int xSub,