<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Approved.<br>
<br>
-phil.<br>
<br>
On 11/24/2015 01:39 AM, Jayathirth D V wrote:<br>
</div>
<blockquote cite="mid:ba0c86ad-86e5-46bd-a02f-2ce2f20d7f76@default"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \,serif";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.changed
{mso-style-name:changed;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Phil,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I have replaced
already present comment block with proper comments , since
it was contradicting Metadata spec. And removed extra
comments added by me.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><u><span style="color:#1F497D">Please
review updated webrev:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><a
moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ejdv/8041501/webrev.03/">http://cr.openjdk.java.net/~jdv/8041501/webrev.03/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Jay<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Phil Race <br>
<b>Sent:</b> Tuesday, November 24, 2015 2:08 AM<br>
<b>To:</b> Jayathirth D V<br>
<b>Cc:</b> Prasanta Sadhukhan; <a class="moz-txt-link-abbreviated" href="mailto:2d-dev@openjdk.java.net">2d-dev@openjdk.java.net</a><br>
<b>Subject:</b> Re: <OpenJDK 2D-Dev> Review
request for JDK - 8041501 : ImageIO reader is not
capable of reading JPEGs without JFIF header<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
class="changed">Rather than adding a comment block, it
seems you need to edit the preceding one.</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<pre> * IJG assumes all unidentified 3-channels are YCbCr.<o:p></o:p></pre>
<pre>1715 * We assume that only if the second two channels are<o:p></o:p></pre>
<pre>1716 * subsampled (either horizontally or vertically). If not,<o:p></o:p></pre>
<pre>1717 * we assume RGB.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The fix is invalidating that comment but that is intended since<o:p></o:p></pre>
<pre>(a) following the comment is causing the bug<o:p></o:p></pre>
<pre>(b) the comment is contradicting the public Metadata spec<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>For the benefit of others, the text in the spec is :<o:p></o:p></pre>
<pre>----<o:p></o:p></pre>
<pre>If neither marker segment is present, the following procedure is followed: ....<o:p></o:p></pre>
<pre>For 3- and 4-channel images, the component ids are consulted. If these<o:p></o:p></pre>
<pre>values are 1-3 for a 3-channel image, then the image is assumed to be YCbCr. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>... Otherwise, 3-channel subsampled images are assumed to be YCbCr, <o:p></o:p></pre>
<pre>3-channel non-subsampled images are assumed to be RGB<o:p></o:p></pre>
<pre>---<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>So here is my suggested replacement text for the existing comment block :<o:p></o:p></pre>
<pre>---<o:p></o:p></pre>
<pre>In the absence of certain markers, IJG has interpreted component id's of [1,2,3] as meaning YCbCr.<o:p></o:p></pre>
<pre>We follow that interpretation, which is additionally described in the Image I/O JPEG metadata spec.<o:p></o:p></pre>
<pre>If that condition is not met here the next step here is to examine the subsampling factors<o:p></o:p></pre>
<pre>If any differ we also assume YCbCr, but if all are the same then we assume RGB<o:p></o:p></pre>
<pre>This is also described in the Image I/O JPEG metadata spec.<o:p></o:p></pre>
<p class="MsoNormal">--<br>
<br>
-phil.<br>
<br>
On 11/23/2015 04:01 AM, Jayathirth D V wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">Hi Prasanta,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Removed
repeated usage of getWidth() and getHeight(). Please
review.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ejdv/8041501/webrev.02/">http://cr.openjdk.java.net/~jdv/8041501/webrev.02/</a><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Jay</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> prasanta sadhukhan <br>
<b>Sent:</b> Monday, November 23, 2015 5:15 PM<br>
<b>To:</b> Jayathirth D V<br>
<b>Cc:</b> Philip Race; </span><a
moz-do-not-send="true"
href="mailto:2d-dev@openjdk.java.net">2d-dev@openjdk.java.net</a><span
style="color:windowtext"><br>
<b>Subject:</b> Re: <OpenJDK 2D-Dev> Review
request for JDK - 8041501 : ImageIO reader is not
capable of reading JPEGs without JFIF header</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/23/2015 5:11 PM, Jayathirth D V
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:windowtext">Hi
Prasanta,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Thanks
for suggestion. I have made related changes and updated
the Webrev.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Webrev :
</span><a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ejdv/8041501/webrev.01/">http://cr.openjdk.java.net/~jdv/8041501/webrev.01/</a><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Please
review.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New Roman
,serif",serif">There's no point getting the width
& height repeatedly . You can get it once and use that
info in the loop. It's not going to change in runtime,
isn;t it :-)<br>
<br>
Regards<br>
Prasanta<br>
<br>
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:windowtext">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:windowtext">Jay</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> prasanta sadhukhan <br>
<b>Sent:</b> Monday, November 23, 2015 4:43 PM<br>
<b>To:</b> Jayathirth D V; </span><a
moz-do-not-send="true"
href="mailto:2d-dev@openjdk.java.net">2d-dev@openjdk.java.net</a><span
style="color:windowtext"><br>
<b>Cc:</b> Philip Race<br>
<b>Subject:</b> Re: <OpenJDK 2D-Dev> Review
request for JDK - 8041501 : ImageIO reader is not
capable of reading JPEGs without JFIF header</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Looks ok to me.<br>
But probably you could check for image width &height
programmatically instead of hardcoding to 64 in testcode.<br>
<br>
Regards<br>
Prasanta<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/23/2015 4:09 PM, Jayathirth D V
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><u>Please review following fix in
JDK9:</u><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Bug : <a moz-do-not-send="true"
href="https://bugs.openjdk.java.net/browse/JDK-8041501">https://bugs.openjdk.java.net/browse/JDK-8041501</a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Webrev : <a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ejdv/8041501/webrev.00/">http://cr.openjdk.java.net/~jdv/8041501/webrev.00/</a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Issue : Pink discoloration when we
read JPEG images without JFIF & EXIF header and
having no subsampling.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Root cause : We are overriding JPEG
color space set in IJG library at imageioJPEG.c without
checking component ID’s properly when JFIF & EXIF
are not there. Decision to change color space is solely
done consulting sampling factors.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Solution : Added extra check to
verify component ID’s also before changing color space
determined by IJG library when there is no JFIF &
EXIF header.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Jay<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New Roman
,serif",serif"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>