Skip to main content
gamedev.net
🔒 Locked

Bitmap file offsets

Started by master_ball Aug 13, 2002 at 1:58 AM 0 replies 300+ views
Original Post
master_ball
master_ball
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
-- master_ball --------------------------------student seeking future game dev career, advice welcome
Kippesoep
Kippesoep
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).

Kippesoep

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.