Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Windows decide which icon format to display when showing an exe's icon in Windows Explorer?

How does Windows decide which icon format to display when showing an exe's icon in Windows Explorer?

Problem: When we look at our icon file and exe with embedded icon file in various Windows Explorer file views, the icon file is displayed in a higher quality mode than the icon displayed for our executable even though the icon in our executable contains the exact same icon. Our exe's icon has jaggier edges which leads me to believe that Windows Explorer may be trying to upsize a lower resolution icon rather than picking an icon appropriate for the actual display size.

In a multi-format icon file, is there a specific order we should use for positioning each icon format?

For example, we have an icon file with icons in the following formats: - 16x16 - 32x32 - 48x48 - 64x64 - 128x128 - 256x256

We are testing the appearance of our exe's icon using Windows Explorer under Windows XP, Vista and Windows 7.

Any suggestions appreciated.

like image 883
Malcolm Avatar asked Mar 09 '10 00:03

Malcolm


People also ask

What format does Windows use for icons?

The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately.

How do I change the icon for a specific file type in Windows?

Right click extension whose icon you want to change and then select “Edit Selected File Type.” In the “Edit File Type” window, click the “…” button to the right of the Default Icon text field. The “Change Icon” window shows some basic icons, but click the “Browse” button to find your own icon files.

What file type are application icons?

Icons for games and computer websites are saved as a . ico file extension loosely called icon files saved in an "ico format." If you have an image that you want to use as an icon on a device or computer screen, you will need to convert the file into the ico format.

What resolution are Windows icons?

Icons have a maximum size of 256x256 pixels, making them suitable for high-dpi (dots per inch) displays.


2 Answers

Use iConvert, it's free and online. You upload a large 512x512 PNG, it gives you an ICO that works the way it should, with multiple embedded images in different sizes. It also gives you ICNS and HQX files for Mac.

Works great under Win7/Vista/XP for my applications. It takes the pain away from making proper ICO files by hand. As you've discovered, it's easy to mess something up.

like image 143
Lucas Avatar answered Oct 06 '22 04:10

Lucas


One troubleshooting method I would try is to remove all the different size formats from your icon file except one, say 32x32. Then, compare the .ico file display and the .exe file display. If they look different, you'll know it's not a problem with the exe picking the wrong format. If they do look the same, then you can start adding the formats back into your .ico file one at a time until the problem reappears.

When I create icon files, I always have the formats added in order of largest to smallest, highest quality to lowest quality:

256x256 32-bit
96x96 32-bit
48x48 32-bit
32x32 32-bit
16x16 32-bit
48x48 8-bit
32x32 8-bit
16x16 8-bit

like image 27
Stewbob Avatar answered Oct 06 '22 04:10

Stewbob