Try Install Learn Blog API Packages GitHub
Pages

ImageData

Functions

create
:
ImageData

Returns a newly instantiated ImageData having the specified width and height. Defaults to transparent black.

data
(
imageData
:
ImageData
)
:
Uint8ClampedArray

Returns a Uint8ClampedArray that contains the ImageData object's pixel data.

Data is stored as a one-dimensional array in the RGBA order, with integer values between 0 and 255 (inclusive).

fromDataArray
(
dataArray
:
Uint8ClampedArray
width
:
Number
height
:
Number
)
:
ImageData

Creates ImageData from a Uint8ClampedArray containing the underlying pixel representation of the image.

height
(
imageData
:
ImageData
)
:
Number

returns the height of the ImageData

set
(
imageData
:
ImageData
index
:
Number
value
:
Number
)

Set a single value in the underlying data array

width
(
imageData
:
ImageData
)
:
Number

returns the width of the ImageData