Constructor
Members
number
static Status
Status
Properties:
Name | Type | Description |
---|---|---|
Unload |
number | |
Loading |
number | |
Loaded |
number |
Methods
create(width, height, datanullable)
Create a new image
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width |
number | Image's width | ||
height |
number | Image's height | ||
data |
Uint8Array |
<nullable> |
null | An array with pixels (r, g, b, a) |
getData() → {Image|Uint8Array}
Get Image's data
A native Image object or an array depending method use to load the image
Image
|
Uint8Array
getSize() → {Array.<number>}
Get image's dimensions
Image's width and height in pixel
Array.<number>
isReady() → {boolean}
Indicates if the image is ready to be use
True if image is ready, otherwise false
boolean
loadFromFile(path)
Load image from a file
Parameters:
Name | Type | Description |
---|---|---|
path |
string | Path to the image file |