[OpenJDK 2D-Dev] [8] Review request for 8023565: JPG causes javax.imageio.IIOException: ICC APP2 encoutered without prior JFIF!

Andrew Brygin andrew.brygin at oracle.com
Sat Aug 31 12:07:54 UTC 2013

Hello Anton,

  I agree that we should just ignore APP2 in this case.
  The fix looks fine to me.


On 8/30/2013 8:57 PM, anton nashatyrev wrote:
> Hello,
>     here is the updated fix (without the regression test): 
> http://cr.openjdk.java.net/~alitvinov/8023565/webrev.01 
> <http://cr.openjdk.java.net/%7Ealitvinov/8023565/webrev.01>
> Thanks!
> Anton.
> On 22.08.2013 21:15, anton nashatyrev wrote:
>> Hello,
>>     could you please review the following fix:
>> fix: http://cr.openjdk.java.net/~alitvinov/8023565/webrev.00 
>> <http://cr.openjdk.java.net/%7Ealitvinov/8023565/webrev.00>
>> bug: http://bugs.sun.com/view_bug.do?bug_id=8023565 (the bug is not 
>> still replicated here so please use the internal jbs if available)
>>     Problem description: if the JPEG file doesn't contain the JFIF 
>> flag tag, but contain the ICC_PROFILE tag then reading its metadata 
>> via ImageIO causes exception: javax.imageio.IIOException: ICC APP2 
>> encoutered without prior JFIF!
>>     Fix description: Though it looks like the image was created 
>> incorrectly (no JFIF flag, but the JFIF extension tag exists), the 
>> image format is not formally corrupted. imageio Jpeg decoder should 
>> ignore the implied tag nature (ICC profile) and just treat it as an 
>> application specific tag.
>> Thanks!
>> Anton.

More information about the 2d-dev mailing list