Icon Formats
Unlike other graphics formats, icon resources can and should contain more than one graphic representation. An icon resource should contain images in different sizes and color depths.
Icon and cursor authors should consider the hardware and software configurations of their target audience. If your audience is not limited to specific hardware and software configurations, you should include multiple image formats. Doing so will guarantee that the images appear as you intended.
Microsoft recommends that your icon contain these three sizes:
- 48 x 48 pixels
- 32 x 32 pixels
- 16 x 16 pixels
Each icon should contain these three color depths to support different monitor display settings:
- 24-bit with 8-bit alpha (Windows XP)
- 8-bit (256 colors)
- 4-bit (16 colors)
Icon Sizes and Where They are Used
Windows platforms use four different sizes of icons and displays these sizes in different areas , as follows:
| Size | Values | Where Used |
|---|---|---|
| Shell Large | User selected. Standard sizes are 32x32 and 48x48. | On the Desktop, and in Large Icon views of Explorer and open folders. |
| Shell Small | Size is 16x16 pixels as defined by Windows and cannot be changed. | On the Start menu, and in Small Icon, List and Details views of Explorer and open folders. |
| System Large | Size is defined by the video driver, usually 32x32. | In <ALT><TAB> dialog (also known as "Cool Switch"). |
| System Small | Size is derived from the size of window captions. The caption size can be adjusted from the Appearance tab in the Display Properties dialog. | Title bar (caption) of application windows. |
Icons on the right side of the Windows XP Start menu are displayed at the 24 × 24 pixels size. This is not a size that you need to provide since it is generated by Windows XP automatically.
If you are creating icons for a toolbar, the Windows standard sizes are 24 × 24 and 16 × 16 pixels.
How Windows chooses an image format
Windows and its applications display different size icons under a variety of conditions. When multiple images are present in an icon or cursor, the following selection rules are applied:
- The image closest to the desired size is chosen.
- If two or more images of that size are present, the one that matches the current icon color depth is selected.
- If none match the color depth exactly, Windows chooses the image with the greatest color depth without exceeding the system icon color depth.
- If all the size-matched images exceed the icon color depth, the one with the lowest color depth is chosen.
- Windows treats all images of 256 or more colors as equal. For example, it is useless to have a 32x32 256-color image and a 32x32 True Color image in the same resource-Windows will simply choose the first one it encounters.
- When the video display mode is set to 256 colors, Windows will prefer a 16-color icon to a 256-color icon, and will display all icons using the system default palette.