[OpenJDK 2D-Dev] [9] RFR: JDK-8160943 : skipImage() in JPEGImageReader class throws IIOException if we have gaps between markers in Jpeg image

Jim Graham james.graham at oracle.com
Mon Aug 1 20:00:00 UTC 2016


Hi Jay,

This looks good...

			...jim

On 8/1/16 1:26 AM, Jayathirth D V wrote:
> Hi,
>
>
>
> Please review the following fix in JDK9 at your convenience:
>
>
>
> Bug :  https://bugs.openjdk.java.net/browse/JDK-8160943
>
> Webrev : http://cr.openjdk.java.net/~jdv/8160943/webrev.00/
>
>
>
> Root cause : While fixing JDK-8152672 we considered that there can be no data in Jpeg image which can be like “FF FF”
> and we threw IIOException if we find data as “FF FF” and considered it as invalid marker.
>
>
>
> Solution : According to https://www.w3.org/Graphics/JPEG/itu-t81.pdf there can be gaps between markers in Jpeg image and
> it can contain fill bits like “X FF”.
>
> In this case if a fill bit is followed by any valid maker in Jpeg it will contain sequence of data which will be “FF
> FF”. So we should not consider “FF FF” as invalid marker and just parse through it. Added check to consider “FF FF” as
> normal data in Jpeg.
>
>
>
> Thanks,
>
> Jay
>



More information about the 2d-dev mailing list