The low-quality icon in the Stage taskbar. Javafx

Why is the Stage icon so low quality? The original image is much better. How to fix it?

I used this code to set the image as a scene icon:

stage.getIcons().add(new Image("/res/app_icon.png")); 

Screenshot:
Screenshothot

Original badge:
Original icon

+7
java javafx
source share
1 answer

Update

Unfortunately, JavaFX 8's icon selection implementation does not always select the best icon size for an application from the list of available icons.

Cm:

Problems (currently) are planned to be solved in Java 9.

Some comments on these issues:

Indeed, Glass currently supports assigning only one icon to a window; it will not allow you to assign a set of icons of different sizes. This feature must be implemented in Glass.

-

I noticed that when configuring multiple icons, only the last of the list returned by getIcons () is used. It doesnโ€™t matter if other icons with better resolutions are on the list.

If you provide a list of icons of different sizes, try putting the size that you expect to be the last on the list (perhaps order the smallest to largest list, or put the 48x48 icon, the size of which is used in the Quick Launch area in Windows 7, as the last or only item in the list). Unfortunately, I do not have access to the Windows machine to check the best icon size for this platform.


Icon recommendations (but keep in mind the information in the update above):

  • Provide a set of high quality badges of various sizes to the list returned from stage.getIcons() .
  • The best size is suitable for the execution environment.
  • Use the standard icon sizes with which most operating systems can work without further scaling (for instance item size, this is the power of two or 48x48).
  • Use high quality source images (the original source image in your question seems a bit blurry to me).
  • For very small icons, sometimes the clean scale of a larger icon with a smaller size is not the best. Sometimes an icon designer is best to clean and remove complex parts from a small icon, which may be in order on a larger icon - see Discussing icon size by clicking on pixels to see why.
  • Information on what icon sizes are used by the operating systems that are in this icon guide .

 stage.getIcons().addAll( new Image("/res/app_icon64x64.png"), new Image("/res/app_icon32x32.png"), new Image("/res/app_icon16x16.png") ); 

A great source of high-quality icons of various sizes is http://www.iconarchive.com , such as this refresh icon .

+6
source share

All Articles