5
votes

When an application icon is displayed, is it Windows who decides which version (bit depth) to use or is it somehow set in the ICO file?

If I create an ICO file only with 32bit colors (24bit + 8bit transparency), the icon displays fine on Win XP. If I add for example 4bit version, Windows use always this 4bit version, even if there are 32bit images as well. My monitor is set to 32bit colors. I am using Greenfish Icon Editor if this is any important.

Is there any way how to push Windows to use the 32bit icons instead of the 4bit ones?

EDIT: I used IcoFX to just open the original ICO file and re-save it and now Windows always chooses the right bit depth. Interesting...

2

2 Answers

2
votes

It's chosen by Windows based on the bit-depth of the surface it's drawn onto. It also depends on the actual order of the icons inside the .ICO file (or resource), that's why you get different result with IcoFX.

1
votes

Windows will use the icon with whatever bit depth it can display, so your understanding of how things should work is correct.

I've not used Greenfish, so don't know if it is creating the icon file correctly. If you're using VS2008 you could try the (free) Axialis IconWorkshop to double-check the icon file (they have a non-free standalone version also).