Archived

This topic is now archived and is closed to further replies.

Getting Transparency in Bitmaps!

This topic is 6007 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this nifty little 2d sprite engine, but I can''t seem to get transparency working at all. It uses .bmp file format, and I don''t want to use .tga for the sake of my users (that''ll use the software). So I need to keep it in the bmp range. I just need to know how to make the color black (#000000, 0,0,0, B L A C K, ) transparent. I''ve tried some stuff, but I guess I just can''t figure the right way to do it. I got one to work, but it made the rest of the image semi-transparent, which isn''t what I wanted, and I don''t want my users to have to go through the trouble of masking, so I just need the one black color transparent. Any ideas? - Twilight Terror of Syntesis

Share this post


Link to post
Share on other sites
Simple, just loop through the image, if the current R-G-B is 0-0-0, then set that bit in the alpha channel to black (transperent), other wise set it to white (solid).

I bleave Nate still has a color key demo on his site (http://nate.scuzzy.net)

Edited by - NitroGL on June 27, 2001 10:18:05 PM

Share this post


Link to post
Share on other sites