<AWT Dev> RFR: 8182043 Access to Windows Large Icons

Alexander Zuev alexander.zuev at oracle.com
Mon Mar 30 17:18:44 UTC 2020

Hi Eric,

   thanks for pointing it out, i'm aware of this issue but i don't think 
it will affect me in this case,
mostly because despite the name this instance of multi resolution image 
icon contains only one
resolution variant. I have tested it with the setup haveing two displays 
with different scaling
factor and haven't seen any errors. But yes - the mentioned bug has to 
be fixed some time soon.


On 30-Mar-20 17:55, Eirik Bakke wrote:
> Hi, Alex.
> 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.
> (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.)
> -- Eirik
> *From:* awt-dev <awt-dev-bounces at openjdk.java.net> *On Behalf Of 
> *Alexander Zuev
> *Sent:* Monday, March 30, 2020 7:19 AM
> *To:* awt-dev at openjdk.java.net
> *Subject:* <AWT Dev> RFR: 8182043 Access to Windows Large Icons
> Hello,
>   please review my fix for the issue 8182043: Access to Windows Large 
> Icons
>   Bug: https://bugs.openjdk.java.net/browse/JDK-8182043
>   Webrev: http://cr.openjdk.java.net/~kizune/8182043/webrev 
> <http://cr.openjdk.java.net/~kizune/8182043/webrev/>
>   Main idea is to provide a new API call to retrieve image of the 
> specified size
> and to make Windows implementation that for all the resolutions higher 
> than 24 pixels
> returns the multi resolution image icon with image inside being the 
> highest quality icon
> available and the size set to the size requested by the user. This way 
> we will have good
> scaling across the different resolution while maintaining relative 
> sizes in the UI intact.
> The exception made for images size of 24 and less since sometimes 
> application has
> different image for the small icons in its resource section which is 
> optimized to
> make sure that on low resolution screen this icon is not displayed as 
> just scaled down
> blurry little square.
> /Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20200330/65a972b6/attachment-0001.htm>

More information about the awt-dev mailing list