[OpenJDK 2D-Dev] <OpenJDK 2D-Dev> Review request for JDK-8074967: JPEGImageReader incorrectly identifies YCbCr JPEGs as RGB in standard metadata

Jayathirth D V jayathirth.d.v at oracle.com
Thu Nov 19 09:49:08 UTC 2015


Hi Phil/Prasanta,

 

Please review following fix in jdk9:

 

Bug : https://bugs.openjdk.java.net/browse/JDK-8074967

 

Webrev : http://cr.openjdk.java.net/~rchamyal/jay/8074967/webrev.00/

 

Bug : JPEGImageReader incorrectly identifies YCbCr JPEGs as RGB in standard metadata

 

Root cause : In JPEG image if there is no JFIF or EXIF header. We are not checking component ID's to determine color space properly. Third channel component ID (3) is matching the length of componentSpecs length and we are not setting colorspace as YCbCr. It is set to RGB which is wrong.

 

Solution : We should check for id greater than componentSpecs length and not greater than equal. But adding a tighter check to match individual component ID is better. So made changes to match individual component ID with 1, 2 & 3 to set color space as YCbCr.

 

Thanks,

Jay

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20151119/ba4f7922/attachment.html>


More information about the 2d-dev mailing list