/** One decoded bitmap: chunky 8-bit samples, plus alpha when the file carries it. */ export interface DecodedBmp { readonly width: number; readonly height: number; /** Row-major RGB samples, `width * height * 3` long. */ readonly data: Uint8Array; /** One byte per pixel, present only when the file states real transparency. */ readonly alpha?: Uint8Array; /** `biXPelsPerMeter`/`biYPelsPerMeter` turned into pixels per inch. */ readonly dpiX?: number; readonly dpiY?: number; } /** Whether these bytes open with the `BM` signature of a bitmap FILE. */ export declare function isBmp(bytes: Uint8Array): boolean; /** * MS-ODRAW §2.2.28 — a `BlipDIB`'s payload is a bitmap without its 14-byte * BITMAPFILEHEADER, which the Escher record makes redundant. Put it back. * * @param dib The bytes from the DIB header onwards. * @returns A complete BMP file, or `undefined` when the header does not read * as a bitmap at all. */ export declare function dibToBmp(dib: Uint8Array): Uint8Array | undefined; /** * Decode a Windows bitmap into 8-bit RGB samples. * * @param bytes A complete BMP file (`BM` signature included). * @returns The samples, their size and any alpha channel. * @throws Error when the file is malformed, or carries a bitmap this does not * read — a JPEG or PNG smuggled inside a DIB (`BI_JPEG`/`BI_PNG`), * which is a whole other file wearing a bitmap header. */ export declare function decodeBmp(bytes: Uint8Array): DecodedBmp;