<AWT Dev> <Swing Dev> [10] Review request for 8182043: Access to Windows Large Icons

Alexey Ivanov alexey.ivanov at oracle.com
Fri Oct 6 17:01:08 UTC 2017

Hi Semyon,

On 29/09/2017 20:39, Semyon Sadetsky wrote:
> On 9/29/2017 12:29 PM, Sergey Bylokhov wrote:
>> On 9/29/17 07:34, Alexey Ivanov wrote:
>>>> Ok, so it means that we will support 1-128 pixels 
>>>> natively(MAX_ICON_SIZE) and others via MRI.
>>> Why 128 pixels? Windows shell usually provides icons up to 256 
>>> pixels, for example there are 256×256 icons for folders and generic 
>>> file type.
>> It is limitation of our implementation:
>> https://bugs.openjdk.java.net/browse/JDK-8151385
>> http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010777.html
> Sergey, it is not clear how those links are related to the icon size 
> returned by Windows?
>>> Since |IExtractIcon::Extract| gives you the requested size, 
>>> performing scaling if required, then MRI will never be crea
>> As far as I understand the bug above, it is possible that OS returns 
>> some other size.
> You've probably didn't understand what Alexey meant. The Extract call 
> may return any size you request (it does scaling internally if there 
> are no suitable image).

Yes, that's what I meant. IExtractIcon::Extract always returns the size 
you requested, if necessary it does internal scaling.

> But the bug above is about queering the fixed size (small or long) 
> which size is determined by OS shell according to the current scale. 
> For those fixed sizes we use SHGetFileInfo not the Extract.

However, I'm afraid IExtractIcon::Extract does not scale the icon to the 
current DPI scaling, it's the task of the programmer to request the icon 
size that's required in current scaling settings to make sure the icon 
is crisp.

> --Semyon

More information about the awt-dev mailing list