12

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?

1
  • 1
    Related one and two, but I actually would like to do it through inkscape, to have the tracing tool installed just once.
    – Andrestand
    Jan 15, 2014 at 11:46

2 Answers 2

4

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

link GitHub repository

2
  • Sure helped me, thanks :D
    – gltovar
    Sep 21, 2022 at 21:39
  • @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
    – utiq
    Aug 29 at 22:15
2

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.

1
  • 1
    Potrace does only BW and grayscale images, inskape does the color ones too by separating the channels May 18, 2016 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.