1.0.3 • Published 4 years ago
just-give-me-the-pixels v1.0.3
just-give-me-the-pixels
get pixel data without colour profile
npm i just-give-me-the-pixelsorder of attempts at retrieving pixel data will be:
- loading into an
ImageBitmapand reading from a WebGL framebuffer - fetching as a buffer and parsing via
image-decode - loading into an
img, drawing into acanvas, and reading viaImageData
example:
import { getPixels } from 'just-give-me-the-pixels';
const { width, height, data } = await getPixels('image src.png');