Read all pixels from bitmap into one big array

Oct 21, 2013 at 6:36pm
Hi,

I need to be able to take a bitmap e.g. "untitled.bmp" (bit depth: 24) and loop through every pixel from top left to bottom right and find the rgb (or hex) value for each pixel e.g. (255,255,255) for white and store this rgb (or hex) value in a two-dimensional array depending on its [column]and[row].

I have no idea how to read bitmap data in in c++ so can anybody help?

Oh also I'm reluctant to use windows header files as I'd prefer it to be cross-platform.

Thanks!
Last edited on Oct 21, 2013 at 6:46pm
Oct 21, 2013 at 7:19pm
It might pay to research the bitmap file format
Topic archived. No new replies allowed.