0.0.2 • Published 3 years ago

read-jpg v0.0.2

Weekly downloads
7
License
CC0-1.0
Repository
github
Last release
3 years ago

read-jpg

Universal JPG File Reader. Uses read-pixels in the Browser and jpeg-js in NodeJS

install

npm install read-jpg

usage in the browser / frontend

import readJPG from 'read-jpg';

const result = readJPG({ data: arrayBuffer });
// result is { height: 200, width: 100, pixels: [[[...]]] }

usage in NodeJS / backend

const readJPG = require("read-jpg");

const result = readJPG({ data: buffer });