Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/get-canvas-pixels
Get an array of RGBA pixel values from a canvas
https://github.com/thibauts/get-canvas-pixels
Last synced: 21 days ago
JSON representation
Get an array of RGBA pixel values from a canvas
- Host: GitHub
- URL: https://github.com/thibauts/get-canvas-pixels
- Owner: thibauts
- License: mit
- Created: 2015-09-26T17:51:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-26T17:51:27.000Z (about 9 years ago)
- Last Synced: 2024-11-16T02:09:02.052Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
get-canvas-pixels
=================
### Get an array of RGBA pixel values from a canvasExtracts an Uint8ClampedArray of RGBA pixel values from a canvas.
Install
-------```bash
$ npm install get-canvas-pixels
```Usage
-----```javascript
var getCanvasPixels = require('get-canvas-pixels');var canvas = document.getElementById('canvas');
var pixels = getCanvasPixels(canvas);console.log(pixels);
/*
[0, 0, 0, 255, 255, 255, 255, 255, ...]
*/
```