Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

just-give-me-the-pixels

seleb7MIT1.0.3TypeScript support: included

get pixel data without colour profile

pixels, image, imagedata, png, color-profile

readme

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

changelog

1.0.3 (2021-05-18)

Bug Fixes

1.0.2 (2021-05-15)

Bug Fixes

  • try to get canvas context to fail out sooner (c99e1cb)

1.0.1 (2021-05-15)

Bug Fixes

  • cleanup gl after getting pixels (b93254b)
  • remove console logs (c8df7e4)

1.0.0 (2021-05-15)

Features

  • first pass at implementation (1b5a601)