Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

image-to-rgba-matrix

1.0.0 • Public • Published

image-to-rgba-matrix

Convert an image into a RGBA matrix.

Install

$ yarn add image-to-rgba-matrix

$ npm install --save image-to-rgba-matrix

Usage

// ES5
const imageToRgbaMatrix = require('image-to-rgba-matrix');
 
// ES6
import imageToRgbaMatrix from 'image-to-rgba-matrix';
 
// From file path
imageToRgbaMatrix('./path-to-image').then(console.log);
 
// From image (png/jpg/bmp) buffer
imageToRgbaMatrix(imageBuf).then(console.log);
 
// From url
imageToRgbaMatrix('http://bencevans.io/avatar.jpg').then(console.log);

Licence

MIT © Ben Evans

install

npm i image-to-rgba-matrix

Downloadsweekly downloads

1

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability