Here is the header code, with appropriate comments :
` Two byte file-type indicator
write byte 1, asc("B")
write byte 1, asc("M")
` Total file size
write long 1, 26+( ((Width*3)+PadSize) * Height )
` These two must be zero
write word 1, 0
write word 1, 0
` Where the graphics data starts (26 bytes in)
write long 1, 26
` The size of the rest of the header
write long 1, 12
` Bitmap width
write word 1, Width
` Bitmap height
write word 1, Height
` Single plain
write word 1, 1
` 24 bit image
write word 1, 24
` Data starts here
The data itself is in reverse-line sequence, with each line padded to a 4 byte boundary.
This format is basically an abbreviated format 3 bitmap - No encoding, no compression, 24 bit mode only.
For fairly comprehensive breakdowns of the bitmap formats (and others) you can go to
http://www.wotsit.org/
*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++
http://www.matrix1.demon.co.uk