import { ImageDataLike, WasmSource } from "./common.js"; export declare const Presets: readonly ["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"]; export declare const Subsampling: readonly ["420", "422", "444"]; export declare const Tune: readonly ["psnr", "ssim", "grain", "fastdecode"]; export interface Options { /** * Quality-based VBR [0, 100], it will map to `--crf` parameter of x265. * quality=0 -> crf=50 * quality=50 -> crf=25 * quality=100 -> crf=0 * * @default 50 */ quality?: number; /** * If true, Bypass transform, quant and loop filters. * * Note: it does not bypass chroma subsampling, you need * also to set `chroma` to "444" for exact lossless. * * @default false */ lossless?: boolean; /** * Trade off performance for compression efficiency. * * @default "slow" */ preset?: typeof Presets[number]; /** * Tune the settings for a particular type of source or situation. * * @default "ssim" */ tune?: typeof Tune[number]; /** * Max TU recursive depth for intra CUs。 * * [1, 4], default 2. */ tuIntraDepth?: number; /** * CPU effort, larger value increases encode time. * Range is [0, 100], but only changes at a few values. * * @default 50 */ complexity?: number; /** * Specify chroma subsampling method. * * @default "420" */ chroma?: typeof Subsampling[number]; /** * Use more accurate and sharper RGB->YUV conversion if needed. * * @default false */ sharpYUV?: boolean; } export declare const defaultOptions: Required; export declare const mimeType = "image/heic"; export declare const extension = "heic"; export declare const bitDepth: number[]; export declare function loadEncoder(input?: WasmSource): Promise; export declare function loadDecoder(input?: WasmSource): Promise; export declare function encode(image: ImageDataLike, options?: Options): Uint8Array; export declare function decode(input: BufferSource): ImageData;