I found a question similar to mine here but it doesn't answer my specific question.
I have a single .ICO file that contains three icons:
- 16x16 4-bit (16 colour)
- 32x32 4-bit (16 colour)
- 48x48 24-bit (True colour)
I chose to put these three into it although I only have a definite need for the first two (16x16 for the application title bar and task bar; 32x32 for ALT-TAB) because this article said so.
While Windows imposes no restrictions on the sizes of icons, common sizes include 16, 32, and 48 pixels square. For this reason, developers are encouraged to include a minimum of the following sizes and color depths in their icon resources:
16 x 16 16 colors
32 x 32 16 colors
48 x 48 256 colors
However, as you can see, I made an error by adding a True Colour (24-bit colour) instead of a 256 colour (8-bit colour) image as the 48x48 one.
When I use the above .ICO file my ALT-TAB icon is pixelated, as if the 48x48 has been squished down and used instead of the 32x32.
If I change the .ICO file to only contain the 16x16 and 32x32 images, or to have the recommended 8-bit colour 48x48 image then ALT-TAB looks fine and does correctly use my 32x32 image.
My question is why does including a true colour 48x48 size cause the problem with ALT-TAB display?
P.S. Nothing like writing out your question on StackOverflow to help you spot your own error (wrong number of colours!) but I am still curious why the True colour image causes this behaviour.