canvas-from-ndarray

1.0.0 • Public • Published

canvas-from-ndarray

Updates a canvas RGBA pixels from an ndarray

Updates 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

$ npm install canvas-from-ndarray

Usage

var canvasFromNdarray = require('canvas-from-ndarray');
 
var canvas = canvasFromNdarray(arr/*, canvas */); // updates the provided canvas if available

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i canvas-from-ndarray

    Weekly Downloads

    31

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • thibauts