Archived

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

master_ball

Bitmap file offsets

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