Writing BMP

Dear Sir

can anyone tell me how to write a data file ( array) to Bmp image in c++?

i have a matrix unsigned car[2048 * 2048 * 4], i want to write it to a BMP file or PNG file. where the height is 2048 and width is 2048. can any one give an idea how to start with this.


Last edited on
Dear Kiana

i tried this way, and all i get is a black image ( when i want to see the results).
Topic archived. No new replies allowed.