This page hosts a formal specification of .bmp file format of Heroes of Might and Magic using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.
meta:
id: heroes_of_might_and_magic_bmp
application: Heroes of Might and Magic
file-extension: bmp
license: CC0-1.0
endian: le
seq:
- id: magic
type: u2
- id: width
type: u2
- id: height
type: u2
- id: data
size: 'width * height'