From: http://www.telegraphics.com.au/svn/icoformat/trunk/dist/README.html "The ICO format has an inherent 1 bit transparency mask (0 = opaque, 1 = transparent), called the AND bitmap." which is the older format icon. and: "In PNG (Vista) format icons, the alpha channel is simply stored as part of the PNG. There is no separate mask."
http://www.rw-designer.com/windows-xp-icon http://www.rw-designer.com/vista-icon
According to these, you can store the images as PNG in Vista instead of BMP+mask, allowing you to preserve the alpha channel. Vista also supports 256x256 icon images (according to the information above).
http://www.axialis.com/tutorials/tutorial-vistaicons.html http://msdn.microsoft.com/en-us/library/aa511280.aspx
Have some more information. From the MDSN article, it appears that toolbar images (and other images stored in image lists?) only support a 1-bit alpha mask.
http://msdn.microsoft.com/en-us/magazine/cc546571.aspx
Has information on the new format. Note that PNG can be used in place of DIB image data.
It shouldn't be too difficult to use something like libpng to handle the images and produce a bitmap from it. This would need support on the resource compiler side as well.
IIRC, Wine *does* support AlphaBlending, but it is very slow.
- Reece
AFAIK - Windows has supported icon transparency since XP - or even before. In the case of XP, transparency was supported simply through 32-bit bitmaps, which is what I've used in my patch.
This works fine in XP, and you can see it in action, because many icons have subtle drop-shadows and the like. I believe in that case, the transparency mask would be unused, or maybe be set as a simple transparency = (alpha==0) value by the authoring app as an attempt at backward compatibility.
32-bit uncompressed (or RLE) works fine for small icons - even up to 48x48, but these days high resolution is becoming more and more common, and we're seeing icons containing images up to as large as 256x256px. But in 32-bit uncompressed that's a quater megabyte, which is enough to make most engineers wince, hence the introduction of PNG!