- get(data, callback)
-
Asynchronously get an
ImageDatainstance based on provided data -
getSync(image) ⇒
ImageData -
Synchronously get an
ImageDatainstance based on provided image
Asynchronously get an ImageData instance based on provided data
Throws:
ErrorIf the data argument is not a string, HTMLImageElement, File or BlobErrorIf the callback argument is not a function
| Argument | Type |
|---|---|
| data | string | HTMLImageElement | File | Blob |
| callback | function |
Synchronously get an ImageData instance based on provided image
Throws:
ErrorIf the image argument is not an HTMLImageElementErrorIf the image has not completed loading
| Argument | Type |
|---|---|
| image | HTMLImageElement |