canvas-pixels

0.0.0 • Public • Published

canvas-pixels stable

Grab the pixels from a canvas' context, be it 2D or 3D, and return them in an array.

Usage

NPM

pixels = getPixels(context)

Returns context's pixels in an array – with a 2D context, this will be a Uint8ClampedArray, and a webgl context will return a Uint8Array.

pixels.get2d(context)

pixels.get3d(context)

Same as above, but without the auto-detection.

License

MIT. See LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    100
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    100

Package Sidebar

Install

npm i canvas-pixels

Weekly Downloads

16

Version

0.0.0

License

MIT

Last publish

Collaborators

  • hughsk