+==========================================================================================+ |Keen 1-3 type graphics format: | +==========================================================================================+ Bitmaps are the most basic ways to store data, and existed before the fancy PNGs and JPGs. Basically they consist of a header and palette followed by the image data read left to right, bottom to top. There are several 'color generations' of bitmaps, monochrome (Black and white, 2-color or 1-bit), 4-bit (16 color or EGA) 8-bit (256 color or VGA) and 24-bit ('True color' or helluva lot of colors.) This covers two main types, 4 and 8-bit, though it is simple enough to figure out the formats of monochrome and 24-bit (24 bits have no palette since the image data is a series of RGB values for each pixel.) 0 2 String "BM' 2 4 File size 6 4 Blank 10 4 Header size, 118 for 4-bit, 1078 for 8-bit 14 4 ? dword value 40 18 4 Bitmap width 22 4 Bitmap height 26 2 Word value 1 28 4 Type, dword value 4 for 4-bit, 8 for 8-bit, etc 32 22 Some gibberish, not useful 54 ? Palette, x * 4 byte RGBS entries, 64 for 4-bit, 1024 for 8-bit ? ? Bitmap data, if width is not divisible by 4 each row as extra, unread data added to it to make it so. Rows are stored starting from the bottom of the bitmap to the top, but are read left to right.