Fix reading srcRegion for OLD_JPEG

This commit is contained in:
Oliver Schmidtmer 2016-02-03 00:20:24 +01:00
parent a9428a1ecf
commit 98493b6c16

View File

@ -1079,7 +1079,7 @@ public class TIFFImageReader extends ImageReaderBase {
try (ImageInputStream stream = new SubImageInputStream(imageInput, length)) {
jpegReader.setInput(stream);
jpegParam.setSourceRegion(new Rectangle(0, 0, width, height));
jpegParam.setSourceRegion(srcRegion);
if (interpretation == TIFFExtension.PHOTOMETRIC_YCBCR || interpretation == TIFFBaseline.PHOTOMETRIC_RGB) {
jpegParam.setDestination(destination);