BITMAPFILEHEADER — the fixed 14-byte preamble of a BMP/DIB file.
Always little-endian; the two-byte signature is "BM" for standard Windows bitmaps (other variants like "BA", "CI", "CP", "IC", "PT" are out of scope).
Shape of a BITMAPFILEHEADER
Shape of a BITMAPFILEHEADER
import { assertEquals } from "@std/assert"; import type { BitmapFileHeader } from "@binstruct/bmp"; const header: BitmapFileHeader = { signature: "BM", fileSize: 70, reserved1: 0, reserved2: 0, pixelOffset: 54, }; assertEquals(header.signature, "BM"); assertEquals(header.pixelOffset, 54);