Merge pull request #224 from Schmidor/tiff_oldjpeg_srcregion

Fix reading srcRegion for OLD_JPEG
This commit is contained in:
Harald Kuhr 2016-04-21 14:10:49 +02:00
commit f9229028ee

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);