How to write a bmp file from Pixel values and colour table
Posted on 2000-05-18
I have two buffers, one that contains Pixel values, and one that contains Colour Table Data.
I got those buffers from using LoadImage and then processing the HBITMAP that is the result...
These values are written to a file. Now I need to load the file, which contains those two buffers, and save it as a bitmap file (bmp). How do I do it? I'm getting all mixed up with DIBs and DDBs and stuff like that. I thought that what I have IS a bitmap!
Anyway. The colour table size is always 256*3 (Although some of the images are 24bit colour, and then there is NO colour table, and each pixel takes 3 bytes (RGB).