0.1.0 • Published 6 years ago
rgba-image v0.1.0
rgba-image
Pure Javascript implementation of ImageData
npm install rgba-image
const { createImage, ImageData } = require( 'rgba-image' )
const arr = new Uint8ClampedArray( 50 * 50 * 4 )
// functional form - optional argument is always last!
const id1 = createImage( 50, 50 )
const id2 = createImage( 50, 50, arr )
// class form - matches WHATWG specification
const id3 = new ImageData( 50, 50 )
const id4 = new ImageData( arr, 50, 50 )
0.1.0
6 years ago