c++ - Is there a way to make bmps transparent? -
(using winapi) there way to:
- make transparent pixels?
- somehow instead of using transparency have image dynamically background colors , textures, , fill colors textures, example: if had video game sprite , background color of white, somehow white pixels , fill them background colors/textures?
if create 32-bit bitmap, 24 bits of each pixel used rgb values , 8 bits used alpha channel. set alpha 0 full transparency.
when creating bitmap uses 24-bit or smaller pixels, transparent color indicated pixel in lower-left corner of bitmap.
either way, creating transparent bitmap half equation. creating transparent bitmap easy, have render bitmap in transparent manner. win32 api has transparentblt() , alphablend() functions purpose, , there plenty of online turorials , blogs explain how use them.
Comments
Post a Comment