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:

  1. The image closest to the desired size is chosen.

  2. If two or more images of that size are present, the one that matches the current icon color depth is selected.

  3. If none match the color depth exactly, Windows chooses the image with the greatest color depth without exceeding the system icon color depth.

  4. If all the size-matched images exceed the icon color depth, the one with the lowest color depth is chosen.

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

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