Skip to content

Experience-Monks/rgba-to-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgba-to-canvas

stable

Turns a flat array of RGBA pixels, like those in a Uint8ClampedArray, into a new Canvas.

Example

var rgbaToPixels = require('rgba-to-canvas')

var canvas = rgbaToPixels(pixels, [ 128, 128 ])
document.body.appendChild(canvas)

Usage

NPM

canvas = rgbaToPixels(array, shape)

For the given flat array of RGBA data (Uint8Array or Uint8ClampedArray), and the [width, height] shape, returns a new canvas with the specified pixels.

License

MIT, see LICENSE.md for details.

About

gets a new Canvas from the given RGBA pixel array

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published