export type XlsxImageFormat = 'png' | 'jpeg' | 'gif' | 'bmp' | 'webp' | 'tiff' | 'svg' | 'emf' | 'wmf'; /** * Map from image format to the Content-Types Default extension that Excel uses * in `[Content_Types].xml`. SVG / EMF / WMF use the same extension as the * format string; PNG/JPEG/GIF/BMP do too. WebP and TIFF use their canonical * short names. */ export declare const IMAGE_FORMAT_EXTENSION: Readonly>; /** Map from image format to its IANA `image/*` MIME type. */ export declare const IMAGE_FORMAT_MIME: Readonly>; export interface XlsxImage { bytes: Uint8Array; format: XlsxImageFormat; /** Pixel width. Zero when dimensions can't be determined for the format. */ width: number; /** Pixel height. Zero when dimensions can't be determined for the format. */ height: number; /** ZIP archive path, e.g. `xl/media/image3.png`. Set by the writer. */ path?: string; /** rels-resolved id used by ``. Set by the loader. */ rId?: string; } export declare function detectImageFormat(bytes: Uint8Array): XlsxImageFormat | undefined; interface Dimensions { width: number; height: number; } export declare function detectImageDimensions(bytes: Uint8Array, format: XlsxImageFormat): Dimensions; /** * Build an `XlsxImage` from raw bytes. Detects the format and dimensions * automatically. Caller may pass an explicit `format` to override detection * (e.g. when bytes were read from a `data:` URL with a known MIME type) or * `width`/`height` to skip the parser. */ export declare function loadImage(bytes: Uint8Array, opts?: { format?: XlsxImageFormat; width?: number; height?: number; }): XlsxImage; export {};