Read all pixels from bitmap into one big array


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.

Last edited on
It might pay to research the bitmap file format
Topic archived. No new replies allowed.