1.0.3 • Published 3 years ago

just-give-me-the-pixels v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

just-give-me-the-pixels

get pixel data without colour profile

npm i just-give-me-the-pixels

order of attempts at retrieving pixel data will be:

  • loading into an ImageBitmap and reading from a WebGL framebuffer
  • fetching as a buffer and parsing via image-decode
  • loading into an img, drawing into a canvas, and reading via ImageData

example:

import { getPixels } from 'just-give-me-the-pixels';
const { width, height, data } = await getPixels('image src.png');