@mescius/dsimageviewer
Version:
Document Solutions Image Viewer
18 lines (17 loc) • 760 B
TypeScript
/**
* CanvasToBMPConverter is a utility class for converting HTML canvas elements to BMP format.
*/
export declare class CanvasToBMPConverter {
/**
* Converts an HTML canvas element to a BMP format and returns the result as an ArrayBuffer.
* @param canvas - The HTML canvas element to convert.
* @returns A Promise that resolves to the ArrayBuffer containing the BMP data.
*/
static toArrayBuffer(canvas: HTMLCanvasElement): Promise<ArrayBuffer>;
/**
* Converts a canvas to a Blob in BMP format.
* @param canvas - The HTML canvas element to convert.
* @returns A Promise that resolves to the Blob containing the BMP image.
*/
static toBlob(canvas: HTMLCanvasElement): Promise<Blob>;
}