import { D as DecodedBmp, B as BmpPaletteColor, a as BmpBinaryInput, b as DecodeOptions, c as BmpImageData, E as EncodeOptions, d as EncodedBmp, e as DecodeColorOptions, f as DecodedRgb } from './types-BGopbNUS.js'; export { g as EncodeBitDepth } from './types-BGopbNUS.js'; declare class BmpDecoder implements DecodedBmp { private pos; private readonly bytes; private readonly view; private readonly options; private bottomUp; private dibStart; private paletteEntrySize; private externalMaskOffset; private maskRed; private maskGreen; private maskBlue; private maskAlpha; fileSize: number; reserved: number; offset: number; headerSize: number; width: number; height: number; planes: number; bitPP: number; compress: number; rawSize: number; hr: number; vr: number; colors: number; importantColors: number; palette?: BmpPaletteColor[]; data: Uint8Array; constructor(input: BmpBinaryInput, options?: DecodeOptions); private ensureReadable; private readUInt8; private readUInt16LE; private readInt16LE; private readUInt32LE; private readInt32LE; private parseFileHeader; private parseDibHeader; private parseCoreHeader; private parseInfoHeader; private validateDimensions; private parseBitMasks; private parsePalette; private parseRGBA; private transformToRgbaIfNeeded; private getPaletteColor; private setPixel; private bit1; private bit4; private bit8; private bit15; private scaleMasked; private bit16; private bit24; private bit32; private bit8Rle; private bit4Rle; getData(): Uint8Array; } declare function decode(bmpData: BmpBinaryInput, options?: DecodeOptions): DecodedBmp; type ResolvedEncodeOptions = Required> & { palette: BmpPaletteColor[]; }; declare class BmpEncoder { private readonly pixelData; private readonly width; private readonly height; private readonly options; private readonly palette; private readonly exactPaletteIndex; constructor(imgData: BmpImageData, options: ResolvedEncodeOptions); private normalizePalette; private validatePalette; private validateChannel; private rowStride; private sourceY; private sourceOffset; private paletteKey; private findPaletteIndex; private writePalette; private encode1Bit; private encode4Bit; private encode8Bit; private encode16Bit; private encode24Bit; private encode32Bit; encode(): Uint8Array; } declare function encode(imgData: BmpImageData, qualityOrOptions?: number | EncodeOptions): EncodedBmp; /** * Decode BMP data directly to RGBA without changing the default `decode` behavior. */ declare function decodeRgba(bmpData: BmpBinaryInput, options?: DecodeColorOptions): DecodedBmp; /** * Decode BMP data to packed RGB bytes (`width * height * 3`). */ declare function decodeRgb(bmpData: BmpBinaryInput, options?: DecodeColorOptions): DecodedRgb; declare const bmp: { encode: typeof encode; decode: typeof decode; decodeRgba: typeof decodeRgba; decodeRgb: typeof decodeRgb; }; export { BmpBinaryInput, BmpDecoder, BmpEncoder, BmpImageData, BmpPaletteColor, DecodeColorOptions, DecodeOptions, DecodedBmp, DecodedRgb, EncodeOptions, EncodedBmp, decode, decodeRgb, decodeRgba, bmp as default, encode };