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

Alexey Ivanov alexey.ivanov at oracle.com
Fri Sep 29 14:34:04 UTC 2017

Hi Sergey,

On 25/09/2017 21:44, Sergey Bylokhov wrote:
> On 9/22/17 04:22, Alexey Ivanov wrote:
>> There's no way of knowing in advance.
>> Explorer does not restrict the size of icons (now), it's up to 
>> developers of a particular file handler to provide icons. Usually, 
>> there's only one icon with size larger than 255.
>> If there's the icon of the requested size, Explorer will give it to 
>> you, otherwise it will scale the closest available to the requested 
>> size.
>> Windows documentation suggests the following sizes:
>> https://msdn.microsoft.com/en-us/library/windows/desktop/dn742485(v=vs.85).aspx#size_requirements 
> 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.

Since |IExtractIcon::Extract| gives you the requested size, performing 
scaling if required, then MRI will never be created.

As for sizes, 16 seems to be the minimum icon size (Windows shell 
overlay icons are 10×10). The reasonable maximum size seems to be 256.


> <SNIP>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20170929/4fa7d856/attachment.html>

More information about the awt-dev mailing list