Which icon sizes should my Windows application's icon include?

321,730

Solution 1

I took some time to check it in detail. I created an icon whose images have sizes of 16, 24, 32, 40, 48, 64, 96, 128 and 256. Then I checked which image is shown. All these were done with normal 96dpi. If using a larger DPI, the larger sizes may be used (only checked this a bit in Windows 7). The results:

Windows XP:

  • Explorer views:
    • Details / List: 16
    • Icons: 32
    • Tiles / Thumbnails: 48
  • Right-click->Properties / choosing a new icon: 32
  • Quickstart area: 16
  • Desktop: 32

Windows 7:

  • Explorer views:
    • Details / List / Small symbols: 16
    • All other options: 256 (resized, if necessary)
  • Right-click->Properties / choosing a new icon: 32
  • Pinned to taskbar: 32
    • Right-click-menu: 16
  • Desktop:
    • Small symbols: 32
    • Medium symbols: 48
    • Large symbols: 256 (resized, if necessary)
    • Zooming using Ctrl+Mouse wheel: 16, 32, 48, 256

Windows Runtime: (from here)

  • Main tile: 150x150, 310x150 (wide version)
  • Small logo: 30x30
  • Badge (for lockscreen): 24x24, monochromatic
  • Splashscreen: 620x300
  • Store: 50x50

So the result: Windows XP uses 16, 32, 48-size icons, while Windows 7 (and presumably also Vista) also uses 256-size icons. All other intermediate icon sizes are ignored (they may be used in some area which I didn't check).


I also checked in Windows 7 what happens if icon sizes are missing:

The missing sizes are generated (obviously). With sizes of 16, 32, and 48, if one is missing, downscaling is preferred. So if we have icons with size 16 and 48, the 32 icon is created from the 48 icon. The 256 icon is only used for these if no other sizes are available! So if the icons are size 16 and 256, the other sizes are upscaled from the 16 icon!

Additionally, if the 256 icon is not there, the (possibly generated) 48 icon is used, but not resized anymore. So we have a (possibly large) empty area with the 48 icon in the middle.

Note that the default desktop icon size in XP was 32x32, while in Windows 7 it is 48x48. As a consequence, for Windows 7 it is relatively important to have a 48 icon. Otherwise, it is upscaled from a smaller icon, which may look quite ugly.


Just a note about Windows XP compatibility: If you reuse the icon as window icon, then note that this can crash your application if you use a compressed 256 icon. The solution is to either not compress the icon or create a second version without the (compressed) 256 icon. See here for more info.

Solution 2

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:

  • At 100% resolution: Explorer uses 16, 40, 48, and 256. Windows Photo Viewer uses 96. Paint uses 256.
  • At 125% resolution: Explorer uses 20, 40, and 256. Windows Photo Viewer uses 96. Paint uses 256.
  • At 150% resolution: Explorer uses 24, 48, and 256. Windows Photo Viewer uses 96. Paint uses 256.
  • At 200% resolution: Explorer uses 40, 64, 96, and 256. Windows Photo Viewer uses 128. Paint uses 256.

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.

Solution 3

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."

Solution 4

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.

Solution 5

(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:

  • 16x16
  • 24x24
  • 32x32
  • 48x48
  • 256x256
Share:
321,730

Related videos on Youtube

Daniel Rose
Author by

Daniel Rose

I work at INFORM GmbH as software developer in the GUI team, using C# and a combination of WPF (for new/updated controls) and Windows Forms (for legacy controls).

Updated on January 23, 2021

Comments

  • Daniel Rose
    Daniel Rose over 3 years

    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?

  • Camilo Martin
    Camilo Martin over 12 years
    Well, here it says 64px is also required, and on the official icon guidelines it says 20px, 24px and 40px are also recommended. The 40px icon seems to be used in alt+tab and baloons, others seem to be used depending on DPI (e.g., 20px being used instead of 16px in a higher-DPI screen, otherwise scaled down from the bigger 32px size, which may look even uglier). Haven't tested.
  • Daniel Rose
    Daniel Rose over 12 years
    I did some more testing. For display on the desktop, when I set it to 144dpi ("150%") on Windows 7, for the smallest possible icon it used the 24px icon (if it is there, otherwise uprezzed 16px). From the icon guidelines, it seems there is a "Classic Mode" on Vista which also uses the 64px icon. However, Windows 7 does not use it. Rather, only the 256px icon is resized.
  • Camilo Martin
    Camilo Martin over 12 years
    Interesting, thanks for the finds. In any case, I don't know how many applications in the wild have more than 16, 32, 48 and (hopefully) 256 px icons. I'd guess very few. But maybe users would notice, because one icon between the rest is crispier.
  • Daniel Rose
    Daniel Rose over 12 years
    @Camilo Note that it is possible to resize with CTRL+Mousewheel, and all the "in between" sizes are uprezzed/downrezzed. However, what definitely gets noticed is if the 48px icon is missing, since that is the size used in the default Windows 7 desktop.
  • Camilo Martin
    Camilo Martin over 12 years
    And it's missing half of the time if the application is an utility and not very popular software, or old... Even some of Visual Studio's icons (those for filetypes) don't even have 48px versions.
  • cplotts
    cplotts over 10 years
    See my answer here (stackoverflow.com/questions/12385143/…) but if you compress the 256x256 image in the .ico file ... Windows XP systems will have trouble opening the file. You will get a FileFormatException with HRESULT 0x88982F07.
  • a paid nerd
    a paid nerd over 8 years
    FWIW, another SO answer mentioned an application called IcoFX -- it's a fully-fledged graphic editor but features an easy to open an image and save it in all of the above "recommended" sizes and bit deptsh. (It's shareware with 30 day full trial.)
  • Bartosz Wójcik
    Bartosz Wójcik about 8 years
    It's also worth to mention those high DPI versions need to be saved in 24bpp mode, I've tried to store them in 8 bit color mode and Windows 7 used 256px version instead of 20x20px in 125% DPI.
  • caesay
    caesay almost 8 years
    This is simple, but exhaustive. Very important to take DPI into consideration.
  • Dan Gravell
    Dan Gravell almost 8 years
    Great reference. Note that if you have an existing ico file that you are editing, the icon cache may mean you don't see the changes you make in the desktop/Explorer. To fix that, run ie4uinit.exe -ClearIconCache (Win 7) - from superuser.com/questions/499078/…
  • Drew Noakes
    Drew Noakes over 7 years
    An update for Windows 10 would be great. It seems that at 96 DPI the icons are 24x24, but Windows 10 also supports higher DPI settings.
  • homerun
    homerun about 7 years
    I have seen you have dealt with Java before. How can I implement such behavior with Java? The problem is that the icon shown in the system task bar is much bigger compare to the icon in the title bar and they cannot be re-sized properly by the system. The most I can do is stage.getIcons().add(image); but it won't let me specify what size and where it belongs to for example the task-bar, folder-view or any else. I'm using JavaFX 8
  • Christian
    Christian about 7 years
    @someFolk java compiles to "class" files or a "jar" file (which is a zip of class files + manifest). In other words, it does not compile to PE (windows executables). However, there are tools that build wrappers for you - basically small programs that contain the jar as a resource (which is extract and ran when the program is run). The answer here mentions a few of them What this means is that your problem depends on the program you use. However, there are tools for editing resources (eg: Resource Hacker)
  • NateS
    NateS almost 4 years
    A lot of info without clearly answering the question.
  • user4551
    user4551 over 3 years
    Sorry, did you mean 64? Your post has 84, which isn't mentioned anywhere else, but doesn't mention 64, which seems to be one of the default sizes.
  • Joe Huang
    Joe Huang over 3 years
    No size list in that page.
  • Joe Huang
    Joe Huang over 3 years
    So give me a list that cover Win7~10 all icon sizes please.