import * as sharp from 'sharp'; import { g as EncodeBitDepth, B as BmpPaletteColor } from '../types-BGopbNUS.js'; type PixelSource = Uint8Array | ArrayBufferLike | ArrayBufferView; type SharpRawChannels = 3 | 4; interface SharpRawDescriptor { width: number; height: number; channels: SharpRawChannels; premultiplied?: boolean; } interface SharpRgbaInfo { width: number; height: number; channels: 4; premultiplied?: boolean; } interface DecodedSharpInput { data: Uint8Array; raw: SharpRgbaInfo; info: SharpRgbaInfo; width: number; height: number; channels: 4; } interface SharpRawInfo { width: number; height: number; channels: number; premultiplied?: boolean; } interface SharpRawLike { data: PixelSource; info: SharpRawInfo; } interface SharpRawFlatLike { data: PixelSource; width: number; height: number; channels: number; premultiplied?: boolean; } interface EncodeBmpOptions { bitDepth?: EncodeBitDepth; topDown?: boolean; palette?: BmpPaletteColor[]; } interface SharpFromBmpOptions { input: PixelSource; sharp?: SharpModule; } type BmpSharpInput = PixelSource; type DecodeForSharpInput = PixelSource; type SharpModule = (typeof sharp)["default"]; type SharpInstance = ReturnType; declare class SharpAdapterError extends Error { constructor(message: string); } declare class NotBmpInputError extends SharpAdapterError { constructor(); } declare class SharpModuleLoadError extends SharpAdapterError { constructor(message?: string, options?: { cause?: unknown; }); } declare class InvalidSharpRawInputError extends SharpAdapterError { constructor(message: string); } declare function isBmp(input: unknown): input is BmpSharpInput; declare function decodeForSharp(input: DecodeForSharpInput): DecodedSharpInput; /** * @deprecated Use decodeForSharp instead. */ declare function toSharpInput(input: DecodeForSharpInput): DecodedSharpInput; declare function sharpFromBmp(input: DecodeForSharpInput, sharpModule?: SharpModule): SharpInstance; declare function sharpFromBmp(options: SharpFromBmpOptions): SharpInstance; declare function encodeFromSharp(input: SharpRawLike, options?: EncodeBmpOptions): Uint8Array; declare function encodeFromSharp(input: SharpRawFlatLike, options?: EncodeBmpOptions): Uint8Array; declare function encodeFromSharp(data: PixelSource, info: SharpRawInfo, options?: EncodeBmpOptions): Uint8Array; export { type BmpSharpInput, type DecodeForSharpInput, type DecodedSharpInput, type EncodeBmpOptions, InvalidSharpRawInputError, NotBmpInputError, type PixelSource, SharpAdapterError, type SharpFromBmpOptions, type SharpInstance, type SharpModule, SharpModuleLoadError, type SharpRawDescriptor, type SharpRawFlatLike, type SharpRawInfo, type SharpRawLike, decodeForSharp, encodeFromSharp, isBmp, sharpFromBmp, toSharpInput };