- get(data, callback)
-
Asynchronously get an
ImageData
instance based on provided data -
getSync(data) ⇒
ImageData
-
Synchronously get an
ImageData
instance based on provided data
ImageData polyfill for Node.js
Create a new ImageData
instance from an object literal
Throws:
Error
If the object argument is not an object literalError
If the object argument is missing required property dataError
If the object argument is missing required property widthError
If the object argument is missing required property height
Param | Type |
---|---|
object | Object |
Asynchronously get an ImageData
instance based on provided data
Throws:
Error
If the data argument is not a string, Buffer, or ReadStreamError
If the callback argument is not a function
Param | Type |
---|---|
data | string | Buffer | ReadStream |
callback | function |
Synchronously get an ImageData
instance based on provided data
Throws:
Error
If the data argument is not a string or BufferError
If the data argument is a string and the file could not be foundError
If the mime type could not be retrievedError
If no image decoder could be found for the mime type
Param | Type |
---|---|
data | string | Buffer |