import type { Canvas } from '@napi-rs/canvas';
/**
 * Convert a canvas to a buffer.
 * @param canvas The canvas to convert.
 * @returns A promise that resolves to the buffer.
 */
export declare function canvasToData(canvas: HTMLCanvasElement | Canvas): Promise<Uint8Array>;
/**
 * Convert a buffer to a data url.
 * @param data The buffer to convert.
 * @returns A promise that resolves to the data url.
 */
export declare function toDataUrl(data: Uint8Array): Promise<string>;
