How to figure out if bitmap has an alpha channel
-
I need to figure out if a HBITMAP/CBitmap has an alpha channel, but bitmap.bmBitsPixel is always 32, no matter if it's a 16-color bitmap or 24-bit+alpha channel bitmap.
-
I need to figure out if a HBITMAP/CBitmap has an alpha channel, but bitmap.bmBitsPixel is always 32, no matter if it's a 16-color bitmap or 24-bit+alpha channel bitmap.
I don't think DDBs support alpha channel, at least not in the standard Windows APIs.
-
I need to figure out if a HBITMAP/CBitmap has an alpha channel, but bitmap.bmBitsPixel is always 32, no matter if it's a 16-color bitmap or 24-bit+alpha channel bitmap.
One way is to see if there are any non-zero values in the alpha channel. If so, they it likely has one, though this is definitely not exact.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke