Transparency in Windows GDI

Started by
1 comment, last by null_pointer 24 years, 1 month ago
How can I do transparent blits in Windows GDI? I'm trying to stay away from DX, but I'll use it if I have to. BTW, I can't be sure whether the people who use it will be using Windows versions later than 95. Basically I'm looking for the color keying that DX does -- just eliminating the black pixels from the source bitmap. If there's no way to do it with BitBlt, then perhaps I can modify the bitmap bits directly? Would it be easy or hard to accomplish color keying with this method? (i.e., could I simply set the black pixels of the source equal to the same pixels of the destination, making it look transparent?) How can I access a bitmap handle as a chunk of memory? Thanks! - null_pointer Edited by - null_pointer on 3/21/00 8:05:02 AM
Advertisement


There is a new API function called TransparentBlt, but it is only available for Win98 and up...

Otherwise, you will have to do it the old fashioned way (afaik)..here is a link that might get you started:

http://support.microsoft.com/support/kb/articles/Q79/2/12.ASP

Luck!

-mordell
__________________________________________

Yeah, sure... we are laughing WITH you ...
Wow! That was just what I needed! And sample source code in that article too...

Thanks!


- null_pointer

This topic is closed to new replies.

Advertisement