Windows Icon

From Lazarus wiki
Revision as of 17:59, 4 November 2011 by Lainz (talk | contribs) (→‎Icon Editor: replaced IcoFX, isn't freeware anymore)
Jump to navigationJump to search

Icon Editor

Those are programs that you can use on design time of your icon:

With LazPaint, GIMP, Inkscape or the application you want design the icon. With Lazarus Image Editor or IcoFX save as .ico format.

Default Set

The default set contains the icon sizes that work in Windows in a DPI setting of 96 (100% - Default).

  • 16x16
  • 32x32
  • 48x48
  • 256x256

16x16: This is used for Windows Explorer "Detail view", "List view", "Small icons", it is the application icon in a window and the icon in the notification area.

32x32: This is used for Windows Explorer "Content view", desktop "Small icons", application icon in taskbar and start menu icons.

48x48: This is used for Windows Explorer "Mosaic view", "Medium size icon" and desktop "Medium size icon".

256x256: This is used for Windows Explorer "Big icons" and desktop "Big icons".

Also the 256x256 icon is scaled, depending of the OS needs, to intermediate sizes between 48x48 and 256x256.

DPI Modes

The default set is for 96 DPI, but if you are running in High DPI you need bigger icons, scaled depending on the DPI setting.

120 DPI (125%):

  • 16x16 > 20x20
  • 32x32 > 40x40
  • 48x48 > 60x60
  • 256x256

144 DPI (150%):

  • 16x16 > 24x24
  • 32x32 > 48x48
  • 48x48 > 72x72
  • 256x256

192 DPI (200%):

  • 16x16 > 32x32
  • 32x32 > 64x64
  • 48x48 > 96x96
  • 256x256

The most used High DPI settings are 120 & 144. If you want quality icons in High DPI you must include in your set:

<delphi>16x16 ; 32x32 ; 48x48 ; 256x256 // Default set 96 DPI 20x20 ; 40x40 ; 60x60 // Additional used in 120 DPI 24x24 ; 72x72 // Additional used in 144 DPI</delphi>

If you include only the default set your image icons will be scaled by the OS to the needed size but loss of quality will occur.

Image: icon set comparison in High DPI.

window icon comparison.png

Top: full icon set for High DPI. Quality icon.

Bottom: icon set for 96 DPI. Pixelated icon.

External Links

(Note: in this MSDN article some things may differ to those explained in this article which was written based on tests in Windows 7, not Vista).