jankovicsandras / imagetracerjs

Simple raster image tracer and vectorizer written in JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle (absolute) paths in CLI correctly

der-On opened this issue · comments

Currently the nodecli.js script requires paths to be set relative to the nodecli directory.

Instead change https://github.com/jankovicsandras/imagetracerjs/blob/master/nodecli/nodecli.js#L58
to

infilename, // Input file path

and https://github.com/jankovicsandras/imagetracerjs/blob/master/nodecli/nodecli.js#L76
to

outfilename, // Output file path

This will do two things:

  1. It will resolve paths relative to the current working directory instead of the nodecli directory (expected result for the user)
  2. It will resolve absolute paths, or paths with protocolls in front that are supported by nodes fs module.

Hi,

This should be fixed in version 1.2.6, please test.