int getThumbnailHeight(int index) { if (thumb != null) { if (index == 0) { return thumb.getHeight(); } index--; } JFIFExtensionMarkerSegment jfxx = (JFIFExtensionMarkerSegment) extSegments.get(index); return jfxx.thumb.getHeight(); }
BufferedImage getThumbnail(ImageInputStream iis, int index, JPEGImageReader reader) throws IOException { reader.thumbnailStarted(index); BufferedImage ret = null; if ((thumb != null) && (index == 0)) { ret = thumb.getThumbnail(iis, reader); } else { if (thumb != null) { index--; } JFIFExtensionMarkerSegment jfxx = (JFIFExtensionMarkerSegment) extSegments.get(index); ret = jfxx.thumb.getThumbnail(iis, reader); } reader.thumbnailComplete(); return ret; }