A module that bundles features for creating images from a DataObject.
Depending on the execution environment, you mainly use the following functions to convert from a
DataObject and a ColorMap into an
image.
createCanvas (converts to an
HTMLCanvasElement, limited to the browser main thread)
createOffscreenCanvas (converts to an
OffscreenCanvas, limited to the browser main thread or web worker)
createPng
(converts to a Uint8Array of a PNG image in the browser, Node.js, Deno, and
Bun)
In addition, by using createImageDataObject, you can also use the intermediate data
ImageDataObject, which stores the RGBA color components of
each pixel as a Uint8ClampedArray.
A module that bundles features for creating images from a
DataObject.Depending on the execution environment, you mainly use the following functions to convert from a
DataObjectand a ColorMap into an image.HTMLCanvasElement, limited to the browser main thread)OffscreenCanvas, limited to the browser main thread or web worker)Uint8Arrayof a PNG image in the browser, Node.js, Deno, and Bun)In addition, by using createImageDataObject, you can also use the intermediate data ImageDataObject, which stores the RGBA color components of each pixel as a
Uint8ClampedArray.