Jump to content
  • Advertisement

Archived

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

Twilight Terror

Getting Transparency in Bitmaps!

This topic is 6231 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
Advertisement
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
Okay, that color key is fine and dandy... but I need it in a bmp, not raw. Can you please help me out? :-P

I'm using the color key idea.


- Twilight Terror of Syntesis

Edited by - Twilight Terror on June 30, 2001 12:48:43 PM

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!