import type { FastAverageColorOptions, FastAverageColorResource, FastAverageColorResult, FastAverageColorRgba } from './types'; export * from './types'; export declare class FastAverageColor { canvas: HTMLCanvasElement | OffscreenCanvas | null; ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null; /** * Get asynchronously the average color from not loaded image. */ getColorAsync(resource: FastAverageColorResource, options?: FastAverageColorOptions): Promise; /** * Get average color from image url */ getColorAsync(imageUrl: string, options?: FastAverageColorOptions): Promise; /** * Get the average color from images, videos and canvas. */ getColor(resource: FastAverageColorResource, options?: FastAverageColorOptions): FastAverageColorResult; /** * Get the average color from a array when 1 pixel is 4 bytes. */ getColorFromArray4(arr: number[] | Uint8Array | Uint8ClampedArray, options?: FastAverageColorOptions): FastAverageColorRgba; /** * Get color data from value ([r, g, b, a]). */ prepareResult(value: number[], error?: Error): FastAverageColorResult; /** * Destroy the instance. */ destroy(): void; private bindImageEvents; }