Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.15 KB

browser.md

File metadata and controls

48 lines (35 loc) · 1.15 KB

Browser

Functions

get(data, callback)

Asynchronously get an ImageData instance based on provided data

getSync(image)ImageData

Synchronously get an ImageData instance based on provided image

get(data, callback)

Asynchronously get an ImageData instance based on provided data

Throws:

  • Error If the data argument is not a string, HTMLImageElement, File or Blob
  • Error If the callback argument is not a function
Argument Type
data string | HTMLImageElement | File | Blob
callback function

getSync(image) ⇒ ImageData

Synchronously get an ImageData instance based on provided image

Throws:

  • Error If the image argument is not an HTMLImageElement
  • Error If the image has not completed loading
Argument Type
image HTMLImageElement