Yes, the formats are different: output6.bmp was generated by IrfanView Blue/Cyan
// file:output5.bmp ID 4D42
// size 6466
// offset 130
// width 176
// height 264
// planes 1
// depth 1
// compression 0
// pixelsize 6336
// colorsused 2
// colorsimportant 2
// file:output6.bmp ID 4D42
// size 6398
// offset 62
// width 176
// height 264
// planes 1
// depth 1
// compression 0
// pixelsize 6336
// colorsused 2
Note that ImageMagick generated output5.bmp has an extra "colorsimportant" field.
The actual bitmap rendered correctly from the respective "offset"
filespec: output5.bmp
000000 42 4D 42 19 00 00 00 00 00 00 82 00 00 00 6C 00 *BMB...........l.*
000010 00 00 B0 00 00 00 08 01 00 00 01 00 01 00 00 00 *..░.............*
000020 00 00 C0 18 00 00 00 00 00 00 00 00 00 00 02 00 *..└.............*
000030 00 00 02 00 00 00 00 00 FF 00 00 FF 00 00 FF 00 *................*
000040 00 00 00 00 00 FF 42 47 52 73 00 00 00 00 00 00 *......BGRs......*
000050 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 *.....@..........*
000060 00 40 00 00 00 00 00 00 00 00 00 00 00 40 00 00 *.@...........@..*
000070 00 00 00 00 00 00 00 00 00 00 FF FF FF 00 00 00 *................*
000080 00 00 *..*
filespec: output6.bmp
000000 42 4D FE 18 00 00 00 00 00 00 3E 00 00 00 28 00 *BM■.......>...(.*
000010 00 00 B0 00 00 00 08 01 00 00 01 00 01 00 00 00 *..░.............*
000020 00 00 C0 18 00 00 00 00 00 00 00 00 00 00 02 00 *..└.............*
000030 00 00 00 00 00 00 FF FF 00 00 FF 00 00 00 *..............*
You can see the colorsimportant field at offset 0x0032 means that the Palette uses a different format. i.e. Palette is @ 0x007A [FF FF FF 00] [00 00 00 00] White-Black
The IrfanView Palette is @ 0x0036 [FF FF 00 00] [FF 00 00 00] Cyan-Blue
Here is a Wikipedia article that describes the
BMP file formatI suspect that ImageMagick can generate both formats. I wonder whether it is worth the effort to support the extra
An OS/2 2.x OS22XBITMAPHEADER (BITMAPINFOHEADER2 in IBM's documentation) contains 24 additional bytes
David.
p.s. I have just been listening to an excellent play on the Radio about Nikolai Gogol (my hero)