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
1
vote
0 answers

Node project exiting without error on Canvas.createCanvas()

I am making a Discord bot, and i want it to send a picture at a specific event (that is irrelevant). I'm facing a weird problem: whenever i try to use Canvas.createCanvas(x,y) my Node project exits without any error in logs (as im using it through…
loib
  • 23
  • 4
1
vote
1 answer

Error while configuring Node Canvas module with jpeg support on Windows 2016

I'm trying to build an application with fabric.js on node server. I followed the documented steps and i was able to set the canvas and fabric modules. When i tried to include support for jpeg files by updating the binding.gyp file, the node.canvas…
1
vote
1 answer

Building Autodesk Forge RCDB on Windows 10 fails with node-gyp errors

While attempting to get the Forge Responsive Connected Database to build. I am unable to build this application on my Windows 10 machine. I am unable to succesffuly run “npm install”. I get the following errors as listed below. I ended up trying to…
1
vote
0 answers

Installing node-canvas on CentOS 7 "Package cairo was not found in the pkg-config search path"

I am struggeling with the installation of node-canvas on CentOS 7. As recommended I followed the installation instructions and executed the following commands: sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel…
VerveDev
  • 11
  • 3
1
vote
1 answer

nodejs canvas: Image given has not completed loading

i'm getting this error: ctx.drawImage(avatar, 50, 50 ); ^ Error: Image given has not completed loading at Request.request.get when trying to do this: app.get('/test', (req, res) => { let Canvas = require('canvas') …
kRicha
  • 797
  • 9
  • 27
1
vote
3 answers

Node.js node canvas show base64 image

I'm currently transfering a base64 image from a client to my server with socket.io. On the server, I want to render that base64 image into my canvas. The code is: function newSlide(slideImage){ socket.broadcast.emit('newSlide', slideImage); var…
nameless
  • 1,483
  • 5
  • 32
  • 78
1
vote
1 answer

Present canvas interface in shared code on both server and client

I am trying to write shared code (that runs on both server and client) that uses an HTML canvas. On the client, this should work perfectly fine. On the server, Node doesn't have a canvas (or a DOM), so I'd like to use the node-canvas plugin:…
futuraprime
  • 5,468
  • 7
  • 38
  • 58
1
vote
1 answer

PHP - Is there any way to control process executions?

I have php and nodejs installed in my server. I am calling a nodejs code which uses node canvas via php Like: Problem: Each process of this execution consumes around 250 Mb of memory because of node…
Abhinav
  • 8,028
  • 12
  • 48
  • 89
1
vote
1 answer

Loading a texture in THREE.js using Node

I am trying to build a messenger bot which does some image processing in 3d and returns a brand new image. I use THREE.CanvasRenderer and my app is hosted on Heroku. When a user /POSTs an attachment to my webhook, I want to take the URL of the newly…
Georgi B. Nikolov
  • 976
  • 2
  • 13
  • 24
1
vote
1 answer

Installing node-canvas on EC2 - fontconfig.h build error

I am trying to get node-canvas to build via npm install on an AWS EC2 instance. I'm trying to use the latest (Feb 2016) version of canvas, 1.3.10 I followed the instructions outlined…
Ali Parr
  • 4,737
  • 3
  • 31
  • 35
1
vote
1 answer

Paper.js Server-Side Can't Work with Received Layers

In an effort to reduce clientside load, we are attempting to do the work of flattening Paper.js layers on a Node Express server. We have many layers to flatten with lots of image data. And rather than overwriting our data structure, we want to end…
Scotty H
  • 6,432
  • 6
  • 41
  • 94
1
vote
0 answers

jCanvas image drawing on Node

So I am on Windows and I have followed the example for running jCanvas on Node: https://github.com/robertjustjones/jcanvas-in-node And I can get the example to work, however I have problems when I try to use jCanvas's draw image capabilities such…
1
vote
0 answers

Problems with require('imagediff') but not require('/pathTo/imagediff.js')

I installed node-canvas and imagediff in a local directory and wrote up a test example that compares two already existing image files. It runs just fine with the code below: var Canvas = require('canvas') , imagediff =…
willko747
  • 517
  • 1
  • 6
  • 13
1
vote
1 answer

npm deleting failed install module

I am attempting to npm install canvas-superjoe (a fork of canvas) on Windows, but I am running into a link problem: LINK : fatal error LNK1181: cannot open input file 'C:\GTK\lib\libpng.lib'…
Casey Kuball
  • 7,717
  • 5
  • 38
  • 70
0
votes
0 answers

Sharp, Pnpm on windows The specified procedure could not be found

I am trying to run an application that is dependent on sharp. I get this error when I try to run the application. I use pnpm as package manager I did a lot of digging around this. But unable to find the solution. Please help.
dewesh jha
  • 63
  • 6