Suppose you want to trace multiple bitmaps with some fixed inkscape tracing settings, is there a way to do it automatically with a batch file?
2 Answers
I created a repo for this task, too late but I hope it help
# New trace action with fully optional parameters
selection-trace:{scans},{is_smooth[false|true]},{is_stack[false|true]},{is_remove_background[false|true],{speckles},{smooth_corners},{optimize}}
# Example:
# Trace 256 colors then export to output.svg
$ inkscape.exe --actions="select-all;selection-trace:256,false,true,true,4,1.0,0.20;export-filename:output.svg;export-do;" "input.png" --batch-process
-
-
@bluevariant great work! are you planning to release a new version? the version you shared works in windows but I compiled in Linux and it doesn't work, it seems to be a problem fixed in 1.3.x– utiqAug 29 at 22:15
Potrace
Inkscape trace bitmaps with an embedded version of Potrace. Unfortunately we can not access this from the command line. In additions there are no shared libraries from Inkscape and Portrace meaning you will have to install potrace in addition to Inkscape for command line batch tracing of bitmaps.
The advantage of doing so is that you will have far more access to fine tune your traces with specific options nicely listed in the potrace manual.
On Linux systems potrace should be available from your software repositories. Source packages and precompiled binaries for other operating systems are available from sourceforge.
-
1Potrace does only BW and grayscale images, inskape does the color ones too by separating the channels May 18, 2016 at 18:48