Closed mhcgolds closed 4 years ago
Hi,
The problem is that Node.js has no built in Image, Canvas and similar objects. It's mentioned in the Readme, but it's probably not that clear that imageToSVG()
and imageToTracedata()
don't work with Node.js directly.
The good news is that there are many solutions! The easiest is problably reading the nodecli example, where an external PNG.js is used to load an image file to an ImageData object and then calling imagedataToSVG()
.
You can also search the web for "Node.js canvas" to find modules which might support Image and Canvas objects.
Hello,
I'm trying to use this lib for the first time in a simple NodeJS app. And when I call
ImageTracer.imageToSVG(url, callback);
, I got the error:This is how I'm including it:
ImageTracer = require('imagetracerjs');
and theurl
is valid. Node version is: 10.16.3Any advice ? Thank you