Hi Anton,

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.
Looks good.

Thanks,
Vadim

On 30.08.2013 20:57, 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.


Reply via email to