just-give-me-the-pixels
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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');

Package Sidebar

Install

npm i just-give-me-the-pixels

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

34.2 kB

Total Files

34

Last publish

Collaborators

  • seansleblanc