Question

I'm releasing a .NET program, and am in the polishing up stage. I need to set the icon in the project properties. From my research, I would like to create images in the following pixel sizes to cater to all icon sizes: 16, 32, 48, 96, 256.

I have also found a program to convert the 5 pictures to a single ico file called "png2ico".

My problem is this. My source pictures are 32 bit (RGB + alpha) PNG files. I've heard only Vista and later supports reading of .ico files with PNG content in them, so is it dangerous then to use ico files with PNGs inside if I release to the general public who might only have Windows XP?

If I need to use ico files with BMP inside instead, is it dangerous to use 32 bit BMPs? I'd rather not use 24 bit BMPs due to bad anti-aliasing etc.

If I need to use BMP over PNG, is there any recommendation for a program which converts from multiple BMPs to a single .ico file?

Was it helpful?

Solution

PNG images only display on Vista+ but should not cause issues on older versions.

32bit BMPs work correctly on XP+ and displays with broken alpha channel (black) on older versions (Can be avoided with a proper mask (Most icon editors don't support this for 32bpp images?), then it will display like a 24bpp image)

You really should use a real icon editor, there are several free applications out there.

OTHER TIPS

png2ico takes png as source files but it doesn't state that it actually use png compression in the resulting ico file.

I recommend you to use Gimp, there you can create an image with a layer for each size you want the resulting ico to support. Then when you export/save as ico, it will ask you which compression you want for each layer.

For the biggest layers (96 and 256) it is pretty safe to use png compression, because usually older desktops don't display icons so big.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top