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

Alexey Ivanov alexey.ivanov at oracle.com
Tue Oct 17 16:42:28 UTC 2017

Hi Sergey, Semyon,

On 12/10/2017 21:39, Sergey Bylokhov wrote:
> On 06/10/2017 17:16, Semyon Sadetsky wrote:
>>> The maximum icon which we used before you fix is 32pixel's icon(yes 
>>> it is a large icon), and 128 is a size of this icon on 4k monitor( 
>>> The windows can return a 128pixel's icon on 4k monitor) The 
>>> EXTRA_LARGE and JAMBO was not used in our code.
>> So, it is not supposed to work on 8k monitor? Why we should have this 
>> limit while the native platform hasn't it?
> This is my understanding, before those fix the maximum size was 32x32.

It is my understanding too. Thus limiting the size of icon to 128 pixels 
seemed reasonable.

At this moment the buffer for icon pixels is allocated on the stack, 
therefore the size cannot be dynamic. If memory for icon pixels is 
allocated dynamically, the limitation can be removed.

It makes sense to address this limitation under a separate issue, do you 


>>>> But these constants are related to the predefined system icon sizes 
>>>> while the Extract() may scale icon to any size.
>>> Does it really scale for any size?
>>> For example if I request the icon for some pdf,java,txt files of 
>>> size 100 then:
>>>   - On HiDPI screen I get the native icon of size 64.
>>>   - On LowDPI screen I get the native icon of size 32.
>>> In both cases the user will get MRI, which will scale the native icon.
>>> http://mail.openjdk.java.net/pipermail/awt-dev/2017-October/013179.html
>> Why returning MRI is wrong?
> The MRI is good, if this is what the user is expected. My point was 
> that the native system is not scale the icon and the user gets MRI 
> which content is unrelated to the passed "size".
>> Which calls are you talking about DPI-aware or DPI-unaware?
> This is jdk10client + the current patch.

More information about the awt-dev mailing list