This property can have the following values:
"rgba-unorm8"
representing RGBA with 8 bit per component unsigned normalized format, using a Uint8ClampedArray
."rgba-float16"
representing RGBA with 16 bits per component, using a Float16Array
. Floating-point pixel values allow representing colors in arbitrarily wide gamuts and high dynamic range (HDR).Floating-point pixel values allow representing colors in arbitrarily wide gamuts and high dynamic range (HDR). You can set the pixelFormat
setting to "rgba-float16"
to use RGBA values with 16 bits per component. This requires the dataArray
to be a Float16Array
.
let floatArray = new Float16Array(4 * 200 * 200);
let imageData = new ImageData(floatArray, 200, 200, {
pixelFormat: "rgba-float16",
});
console.log(imageData.pixelFormat); // "rgba-float16"
Specifications Browser compatibility
Loadingâ¦
See alsoImageData
Float16Array
CanvasRenderingContext2D.createImageData()
CanvasRenderingContext2D.putImageData()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5