RawImageData
A container for raw image data.
Constructor Summary
Public Constructor | ||
public |
constructor(width: Number, height: Number, data: Uint8ClampedArray, channels: Number) Constructs a new image data container. |
Member Summary
Public Members | ||
public |
The amount of color channels used per pixel. |
|
public |
The image data. |
|
public |
The height of the image. |
|
public |
The width of the image. |
Method Summary
Public Methods | ||
public |
toCanvas(): Canvas Creates a canvas from this image data. |
Public Constructors
public constructor(width: Number, height: Number, data: Uint8ClampedArray, channels: Number) source
Constructs a new image data container.
Params:
Name | Type | Attribute | Description |
width | Number |
|
The width of the image. |
height | Number |
|
The height of the image. |
data | Uint8ClampedArray |
|
The image data. |
channels | Number |
|
The amount of color channels used per pixel. Range [1, 4]. |
Public Members
Public Methods
public toCanvas(): Canvas source
Creates a canvas from this image data.
Return:
Canvas | The canvas or null if it couldn't be created. |