Type Alias PixelData

Informations about an image

type PixelData = {
    components: number;
    height: number;
    pixels: Uint8ClampedArray | Uint8Array;
    width: number;
}
Index

Properties

components: number

Number of components per pixel (3 if image is RGB, 4 if image is RGBA)

height: number

Height of the image in number of pixels

pixels: Uint8ClampedArray | Uint8Array

The array of pixels as RGBRGB or RGBARGBA in a row-major order

width: number

Width of the image in number of pixels

Was this helpful?

Client JS
Reference
PixelData