[OpenJDK 2D-Dev] Review Request for JDK-8152672 : Exception getting thumbnail size for JPEG with embedded thumbnail
Jayathirth D V
jayathirth.d.v at oracle.com
Wed Jun 1 07:18:18 UTC 2016
Hi,
Please review the following fix in JDK9:
Bug : https://bugs.openjdk.java.net/browse/JDK-8152672
Webrev : http://cr.openjdk.java.net/~jdv/8152672/webrev.00/
Issue : When we are trying to get properties related to second image in JPEG file we are getting IIOException mentioning that it is not a JPEG file.
Root cause : When we are skipping first image to reach second image header, we are just trying to find next available EOI marker. But if first image has embedded thumbnail in APP1 marker, we will reach to EOI of this thumbnail and not EOI of first image. So after we reach EOI of embedded thumbnail we try to access second image SOI marker which will fail.
Solution : We have to change the logic of how we skip to consecutive images in JPEG file. We know that application markers, comments or other markers can contain data same as SOI & EOI. Instead of just checking for EOI marker serially, we should read length of these markers and skip them.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160601/6a6d83ed/attachment.html>
More information about the 2d-dev
mailing list