Questions tagged [node-canvas]

Node canvas is a Cairo backed Canvas implementation for NodeJS.

Installation

$ npm install canvas

node-canvas extends the canvas API to provide interfacing with node, for example streaming PNG data, converting to a Buffer instance, etc. Among the interfacing API, in some cases the drawing API has been extended for SSJS image manipulation / creation usage, however keep in mind these additions may fail to render properly within browsers.

Github

Node Wiki

152 questions
0
votes
1 answer

Get file size of GIFs with node-canvas?

After much struggling, I've managed to get node-canvas installed on Windows. When I try to read in the image size of a GIF, however, it just gives me back 0 for the width and height. var FileSystem = require('fs'); var Canvas =…
mpen
  • 272,448
  • 266
  • 850
  • 1,236
-1
votes
1 answer

Using a declared class as a function argument in Javascript

I've declared a class gly that accesses a canvas made with node-canvas. const width = 250; const height = 250; const canvas = createCanvas(height, width); const gly = canvas.getContext("2d"); A separate function (outside that class) takes multiple…
1 2 3
10
11