0.1.0 • Published 6 years ago

rgba-image v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 )