Jump to content
  • Advertisement

Archived

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

master_ball

Bitmap file offsets

This topic is 5972 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!