JDK-8149371 : multi-res. image: -Dsun.java2d.uiScale does not work for Window icons (some ambiguity for Window.setIconImages()?)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-02-08
  • Updated: 2023-08-18
  • Resolved: 2016-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b140Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Please run the attached test with -Dsun.java2d.uiScale=2 and compare image and the icons. expected: all of them must be green. in fact only the image is green (see 'icons.png').

JDK9 b99 + Win7 (non-HiDPI diaplay)
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/cbe230dcfd13 User: lana Date: 2016-10-12 19:59:33 +0000
12-10-2016

URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/cbe230dcfd13 User: rchamyal Date: 2016-09-26 07:03:55 +0000
26-09-2016

The javadoc for Window.setIconImages() method should be updated.
23-08-2016

could it be my mistake in assigning the priority level? Not sure if the impact is medium or low. In the latter case the priority could be reduced to P4
14-03-2016

can't be tbd_major as P3 introduced in 9
11-03-2016

There is also a potential ambiguity here: Let us have a list of multi-resolution images having the following resolution variants: iconsList = { icon1 {low - 16x16, high - 32x32} icon2 {low - 32x32, high - 64x64} } What is the correct icon after "setIconImages(iconsList)" call, if the size 32x32 fits and the scale = 2? "icon1-high" or "icon2-low"? The initial (naive) expectation is that "icon1-high" should be chosen in case when the scale is greater than one. Docs: "If the list contains several images of the same size, the first will be used." What is the "1st" here: "icon1-high" or "icon2-low"? Probably this should be specified for multi-res. images
09-02-2016

The issue isn't caused by the above ambiguity. Please compile/run the 2nd attached 'MultiResIconTest.java' using scale = 1, 2, 4. The image color will be red/green/blue (as expected). the icon is always red (nok).
09-02-2016

please see also 'artifacts.png'. does this issue duplicate JDK-8069348? If no, it shoul be filed separately.
08-02-2016