Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/canvas-from-ndarray
Updates a canvas RGBA pixels from an ndarray
https://github.com/thibauts/canvas-from-ndarray
Last synced: 21 days ago
JSON representation
Updates a canvas RGBA pixels from an ndarray
- Host: GitHub
- URL: https://github.com/thibauts/canvas-from-ndarray
- Owner: thibauts
- License: mit
- Created: 2015-09-27T12:16:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-27T12:17:16.000Z (about 9 years ago)
- Last Synced: 2024-11-18T23:35:23.974Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
canvas-from-ndarray
===================
### Updates a canvas RGBA pixels from an ndarrayUpdates a canvas RGBA pixels from a ndarray with shape `[width, height, 4]` and with underlying array structure ordered as `[R, G, B, A, R, G, B, A, ...]`. If no canvas is provided one is created internally.
Install
-------```bash
$ npm install canvas-from-ndarray
```Usage
-----```javascript
var canvasFromNdarray = require('canvas-from-ndarray');var canvas = canvasFromNdarray(arr/*, canvas */); // updates the provided canvas if available
```