2009/4/18 Ben Klein shacklein@gmail.com:
2009/4/18 Reece Dunn msclrhd@googlemail.com:
Yeah, AlphaBlending is not supported (hence the diagonals look jagged) -- theming is also affected.
NOTE: I have seen this happen on other Windows apps running on Windows. You need to have the image support an alpha channel - which I'm not sure icons do. I'm not sure of the API calls that are required, though, so it may require some changes to the static control support to render the bitmaps using alpha (in addition to keyed) transparency.
I believe *some* versions of the ANI/CUR/ICO formats support alpha channels, but I couldn't tell you where to look. Out of interest, what format do Vista/Windows 7 icons use, and do they support alpha channels? (I seem to recall some transparency effects on Vista icons, could be wrong).
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