Updated bug title in JBS as it was misleading.

 

From: Jayathirth D V 
Sent: Wednesday, June 01, 2016 12:48 PM
To: Philip Race; Jim Graham
Cc: 2d-dev@openjdk.java.net
Subject: Review Request for JDK-8152672 : Exception getting thumbnail size for 
JPEG with embedded thumbnail

 

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

 

Reply via email to