[OpenJDK 2D-Dev]  Review request for 8023565: JPG causes javax.imageio.IIOException: ICC APP2 encoutered without prior JFIF!
vadim.pakhnushev at oracle.com
Wed Sep 4 13:27:24 UTC 2013
It seems that we could safely treat ICC profile in APP2 as an unknown
marker if file doesn't contain JFIF marker.
Basically it's a workaround for decoding Exif format files.
On 30.08.2013 20:57, anton nashatyrev wrote:
> here is the updated fix (without the regression test):
> On 22.08.2013 21:15, anton nashatyrev wrote:
>> could you please review the following fix:
>> fix: http://cr.openjdk.java.net/~alitvinov/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.
More information about the 2d-dev