Jump to content
  • Advertisement
Sign in to follow this  
becoolnike

where does a 24 bits bitmap file stores its alpha value?

This topic is 3475 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 am making an bmp file reader and i cant figure out the alpha channel or transparecy of a 24 bits bitmap? where is it store it? any help? i read this link and still dont the the alpha channel. http://en.wikipedia.org/wiki/BMP_file_format

Share this post


Link to post
Share on other sites
Advertisement
If you have something that can read and write the 32bit bmp. They have alpha bits. 8bits for each of Red Green Blue Alpha
The 24bit version (the standard one) only stores 8bit fields for RGB.

Share this post


Link to post
Share on other sites
I have yet to see any paint program that saves in 32 bit BMP format. According to the Windows format for BMP, it does support an alpha channel but I haven't seen it used by any programs, either loading or saving them.

Share this post


Link to post
Share on other sites
thank you.
i foung a link of where a 32 bits stores its alpha channel.

http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=10264




Body (e.g. 32 bits body image)
Blue Green Red Alpha
[00000000] 84 252 84 0
[00000001] 252 252 84 0
[00000002] 84 84 252 0
[00000003] 252 84 252 0
[00000004] 84 252 252 0
[00000005] 252 252 252 0
[00000006] 0 0 0 0
etc. etc.

Share this post


Link to post
Share on other sites
I always used png when I needed an alpha channel (well, I tend to use png whenever is possible). Tga are also a good option, but png are smaller and very well supported natively by many languages and libraries.

Share this post


Link to post
Share on other sites
I use PNG because it supports compression and alpha transparency. If you wish to use power of 2 textures, you can go with DDS textures if you are using DirectX. If I don't need transparency then I usually use a JPG image since it gets the best compression ratio in most cases.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!