import { type OxyColor, type OxyImage, type OxyImageInfo } from '../../oxy'; import type { TwoDimensionalArray } from '../TwoDimensionalArray'; export interface EncodeImageOptions { pixels: TwoDimensionalArray | TwoDimensionalArray; palette?: OxyColor[]; imageInfo: OxyImageInfo; } export interface ImageService { load(uri: string): Promise; /** * Gets information about the image in the specified byte array. * @param bytes The image data. * @returns An OxyImageInfo structure. */ getImageInfo(bytes: Uint8Array): Promise; /** * Decodes an image from the specified byte array. * @param bytes The image data. * @returns The 32-bit pixel data. The indexing is [x,y] where [0,0] is top-left. */ decode(bytes: Uint8Array): Promise; /** * Encodes the specified pixels. * @returns The image data. */ encode(option: EncodeImageOptions): Promise; } export declare function getImageService(): ImageService; export declare function setImageService(imgService: ImageService): void; //# sourceMappingURL=ImageService.d.ts.map