<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hi, Alex.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Beware that MultiResolutionImage is not reliable on Windows due to https://bugs.openjdk.java.net/browse/JDK-8212226 . It would seem very easy to fix the latter bug, though. Just
have SunGraphics2D.drawHiDPIImage return false instead of null if img is a MultiResolutionImage with zero dimensions.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">(I discovered the bug above while implementing HiDPI/SVG icon support for the Apache NetBeans IDE. We ended up having to avoid MultiResolutionImage altogether on Windows.)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">-- Eirik<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><font size="2" face="Calibri"><span style="font-size:11.0pt;font-weight:bold">From:</span></font></b> awt-dev <awt-dev-bounces@openjdk.java.net>
<b><span style="font-weight:bold">On Behalf Of </span></b>Alexander Zuev<br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, March 30, 2020 7:19 AM<br>
<b><span style="font-weight:bold">To:</span></b> awt-dev@openjdk.java.net<br>
<b><span style="font-weight:bold">Subject:</span></b> <AWT Dev> RFR: 8182043 Access to Windows Large Icons<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Calibri"><span style="font-size:11.0pt">Hello,<br>
<br>
please review my fix for the issue 8182043: Access to Windows Large Icons<br>
<br>
Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8182043">https://bugs.openjdk.java.net/browse/JDK-8182043</a><br>
Webrev: <a href="http://cr.openjdk.java.net/~kizune/8182043/webrev/">http://cr.openjdk.java.net/~kizune/8182043/webrev</a><br>
<br>
Main idea is to provide a new API call to retrieve image of the specified size<br>
and to make Windows implementation that for all the resolutions higher than 24 pixels<br>
returns the multi resolution image icon with image inside being the highest quality icon<br>
available and the size set to the size requested by the user. This way we will have good
<br>
scaling across the different resolution while maintaining relative sizes in the UI intact.<br>
The exception made for images size of 24 and less since sometimes application has<br>
different image for the small icons in its resource section which is optimized to
<br>
make sure that on low resolution screen this icon is not displayed as just scaled down
<br>
blurry little square.<br>
<br>
/Alex<o:p></o:p></span></font></p>
</div>
</body>
</html>