The width of the image (number of pixels).
The height of the image (number of pixels).
A one-dimensional array (Uint8ClampedArray) that stores the color of each pixel in the order R (red component) -> G (green component) -> B (blue component) -> A (alpha component), proceeding from the top-left to the top-right of the image and from top to bottom. The number of elements in the array is width * height * 4.
Intermediate data of an image produced by visualizing a
DataObjectaccording to the conditions of a ColorMap. The RGBA color components are stored as aUint8ClampedArray. It is almost the same as theImageDataavailable in browser and Deno environments, but it is defined independently so that it can be used uniformly even in Node.js and Bun environments whereImageDatais not available.Depending on the runtime environment, use the following functions to convert it to a final image.
HTMLCanvasElement, limited to the browser main thread)OffscreenCanvas, limited to the browser main thread or a web worker)Uint8Arrayof a PNG image in browser, Node.js, Deno, and Bun)If an ImageDataObject is not needed, the following functions can convert directly from a
DataObjectand a ColorMap to an image.HTMLCanvasElement, limited to the browser main thread)OffscreenCanvas, limited to the browser main thread or a web worker)Uint8Arrayof a PNG image in browser, Node.js, Deno, and Bun)