by LaVolpe (66 Submissions)
Category: Graphics
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (8 Votes)
Now that we are getting into the age of alphablending, PNGs, etc, wouldn't it be nice to offer ability to display 32bpp alpha bitmaps without having to know in advance if it indeed uses the alpha channel or whether or not the bitmap has its RGB bytes pre-multiplied? Try this out. It is a simple project wrapped around a routine that attempts to let you know those things a runtime. The project has some tips, shows a simple way to use AlphaBlend with non-premultiplied bitmaps and an pretty effective way to use GDI+ with 32bpp alpha bitmaps. Two test images are included in the RES file, but other than that, happing hunting for 32bpp alpha bitmaps, unless you care to create your own like I did for this test project.