Jump to content
  • Advertisement

Archived

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

master_ball

Bitmap file offsets

This topic is 5886 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

Hey everyone! I have a problem with a 24-bit color bitmap. Where do I get the offset for the start of the actual BMP pixel data (RGB)? I''ve tried this: int offset = sizeof(BITMAPFILEHEADER) + BMPFH.bfOffBits; where BMPFH is a BITMAPFILEHEADER struct. Also, is each RGB value 32-bit aligned? Thanks! Yours in confusion... - master_ball ---------------------------- We R 138

Share this post


Link to post
Share on other sites
Advertisement
Don''t add the size of the fileheader, just use the value as is.
If the bitmap is 24bit, then the RGB values are aligned by 24 bits, not 32. (As you should be able to tell from the filesize).

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!