A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/ImageData/pixelFormat below:

ImageData: pixelFormat property - Web APIs

ImageData: pixelFormat property

Note: This feature is available in Web Workers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The read-only ImageData.pixelFormat property is a string indicating the pixel format of the image data.

The pixel format can be set during ImageData initialization using either the ImageData() constructor or the createImageData() method.

Value

This property can have the following values:

Examples Floating-point pixel data for 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 See also

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.4