Minor optimization for standard case with only one image.

This commit is contained in:
Harald Kuhr 2021-04-20 22:41:41 +02:00
parent 3f7cb24407
commit 6ac8a5d8b4

View File

@ -817,13 +817,14 @@ public final class JPEGImageReader extends ImageReaderBase {
// TODO: We should probably optimize this // TODO: We should probably optimize this
try { try {
segments = null;
getSOF(); // No SOF, no image getSOF(); // No SOF, no image
count++; count++;
} }
catch (IIOException ignore) {} catch (IIOException ignore) {}
} }
currentStreamIndex = -1; imageInput.seek(streamOffsets.get(currentStreamIndex));
return count; return count;
} }