I have a Windows application which will run in Windows XP and newer (i.e. Vista/7). According to the Vista UI Guidelines, the standard sizes are 16x16, 32x32, 48x48, 256x256 (XP standard sizes do not include the 256x256 icon). In addition to those sizes, I also have 96x96 and 128x128 (and could create more).
Which of these icon sizes should I include? Will the shell actually use the "non-standard" sizes, or will I simply bloat my application?
(Updated answer for Windows 8/10)
View full list of guidelines and sizes here, in new Windows design guidelines: https://msdn.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets#asset-types
Still include .ICO file with these sizes to support legacy experiences:
TL;DR. In Visual Studio 2019
, when you add an Icon
resource to a Win32
(desktop) application you get an auto-generated icon file that has the formats below. I assume that the #1 developer tool for Windows does this right. Thus, a Windows
compatible should have the following formats:
| Resolution | Color depth | Format |
|:-----------|------------:|:------:|
| 256x256 | 32-bit | PNG |
| 64x64 | 32-bit | BMP |
| 48x48 | 32-bit | BMP |
| 32x32 | 32-bit | BMP |
| 16x16 | 32-bit | BMP |
| 48x48 | 8-bit | BMP |
| 32x32 | 8-bit | BMP |
| 16x16 | 8-bit | BMP |
After some testing with an icon with 8, 16, 20, 24, 32, 40, 48, 64, 96, 128 and 256 pixels (256 in PNG) in Windows 7:
So 8, 32 were never used (it's strange to me for 32) and 128 only by Windows Photo Viewer with a very high dpi screen, i.e. almot never used.
It means your icon should at least provide 16, 48 and 256 for Windows 7. For supporting newer screens with high resolutions, you should provide 16, 20, 24, 40, 48, 64, 96, and 256. For Windows 7, all pictures can be compressed using PNG but for backward compatibility with Windows XP, 16 to 48 should not be compressed.
Not 96x96, use 64x64 instead. I usually use:
256 works as well on XP, however, old resource compilers sometimes complained about "out of memory" errors.
From Microsoft MSDN recommendations:
Application icons and Control Panel items: The full set includes 16x16, 32x32, 48x48, and 256x256 (code scales between 32 and 256). The .ico file format is required. For Classic Mode, the full set is 16x16, 24x24, 32x32, 48x48 and 64x64.
So we have already standard recommended sizes of:
If we would like to support high DPI settings, the complete list will include the following sizes as well:
In the case of Windows 10 this is not exactly accurate, in fact none of the answers on stackoverflow was, I found this out when I tried to use pixel art as an icon and it got rescaled when it was not supposed to(it was easy to see in this case cause of the interpolation and smoothing windows does) even thou I used the sizes from this post.
So I made an app and did the work on all DPI settings, see it here:
Windows 10 all icon resolutions on all DPI settings
You can also use my app to create icons, also with nearest neighbor interpolation with smoothing off, which is not done with any of the bad editors I have seen.
If you only want the resolutions:
16, 20, 24, 28, 30, 31, 32, 40, 42, 47, 48, 56, 60, 63, 84, 256
and you should use all PNG icons and anything you put in beside these it won't be displayed. See my post why.
The Microsoft UX icon guideline says:
"Application icons and Control Panel items: The full set includes 16x16, 32x32, 48x48, and 256x256 (code scales between 32 and 256)."
To me this implies (but does not explicitly state, unfortunately) that you should supply those 4 sizes.
Additional details regarding color formats, which you may also find useful:
"Icon files require 8-bit and 4-bit palette versions as well, to support the default setting in a remote desktop."
"Only a 32-bit copy of the 256x256 pixel image should be included, and only the 256x256 pixel image should be compressed [as PNG] to keep the file size down."
Source: Stackoverflow.com