Skip to content

encode.Function.compress

github-actions[bot] edited this page Oct 26, 2024 · 8 revisions

@monogrid/gainmap-js / encode / compress

Function: compress()

compress(params): Promise<CompressedImage>

Converts a RAW RGBA image buffer into the provided mimeType using the provided quality

Parameters

params: CompressParameters

Returns

Promise<CompressedImage>

Throws

if the browser does not support createImageBitmap

Throws

if the provided source image cannot be decoded

Throws

if the function fails to create a canvas context

Defined in

src/encode/compress.ts:40

Clone this wiki locally