import { ImageDataLike, WasmSource } from "./common.js"; export declare enum Subsampling { YUV444 = 1, YUV422 = 2, YUV420 = 3, YUV400 = 4 } export declare enum AVIFTune { Auto = 0, PSNR = 1, SSIM = 2 } export interface Options { /** * [0 - 100], 0 = worst quality, 100 = lossless * * @default 50 */ quality?: number; /** * As above, but -1 means 'use quality' * * @default -1 */ qualityAlpha?: number; /** * Range: [-1, 10], 0 = slowest, 10 = fastest, slower should make for a better quality image in less bytes. * A combination of settings are tweaked to simulate this speed range. * * @default 6 */ speed?: number; /** * Chrome subsampling type. * * @default YUV420 */ subsample?: Subsampling; /** * If true, ignores `tileRowsLog2` and `tileColsLog2` and automatically chooses suitable tiling values. * * @default false */ autoTiling?: boolean; /** * [0 - 6], Creates 2^n tiles in that dimension * * @default 0 */ tileRowsLog2?: number; tileColsLog2?: number; /** * Extra chroma compression, cannot be used in lossless mode. * * @default false */ chromaDeltaQ?: boolean; /** * Bias towards block sharpness in rate-distortion optimization of transform coefficients [0, 7] * * @default 0 */ sharpness?: number; /** * Amount of noise (from 0 = don't denoise, to 50) * * @default 0 */ denoiseLevel?: number; /** * Distortion metric tuned with. * * @default AVIFTune.Auto */ tune?: AVIFTune; /** * Use libsharpyuv for RGB->YUV conversion if needed. * * @default false */ sharpYUV?: boolean; } export declare const defaultOptions: Required; export declare const mimeType = "image/avif"; export declare const extension = "avif"; 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;