Batch trace of bitmaps
Hi Inkscape list,
Is it possible for inkscape, or some other command line utility, to do batch tracing of bitmap to svg files? I've seen that through Inkscape verbs you can use "SelectionTrace", but that still requires manual input.
I've tried potrace, but that only works on black and white images, and I've tried autotrace but that only produces jigsaw-like svgs and I want ones where the different colours are stacked on top of each other
Thanks for any help that you can give
Antonio
On 06/09/2012 17:48, Antonio Roberts wrote:
Is it possible for inkscape, or some other command line utility, to do batch tracing of bitmap to svg files? I've seen that through Inkscape verbs you can use "SelectionTrace", but that still requires manual input.
I've tried potrace, but that only works on black and white images, and I've tried autotrace but that only produces jigsaw-like svgs and I want ones where the different colours are stacked on top of each other
Inkscape's built-in bitmap tracing tool can't be scripted to be run without user interaction from the command line or a batch-processing script (there are no verbs available to control the options and to execute the tracing).
Maybe the (python-based) command line tool shared in this forum topic could be of help for you:
[SOLVED] How do I replicate Inkscape's bitmap tracer? http://www.inkscapeforum.com/viewtopic.php?f=22&t=11898
hth, ~suv
Thanks for the tip, but I got a few errors
http://www.inkscapeforum.com/viewtopic.php?f=22&t=11898&p=47965#p479... On Sep 6, 2012 5:17 PM, "~suv" <suv-sf@...16...> wrote:
On 06/09/2012 17:48, Antonio Roberts wrote:
Is it possible for inkscape, or some other command line utility, to do batch tracing of bitmap to svg files? I've seen that through Inkscape verbs you can use "SelectionTrace", but that still requires manual input.
I've tried potrace, but that only works on black and white images, and I've tried autotrace but that only produces jigsaw-like svgs and I want ones where the different colours are stacked on top of each other
Inkscape's built-in bitmap tracing tool can't be scripted to be run without user interaction from the command line or a batch-processing script (there are no verbs available to control the options and to execute the tracing).
Maybe the (python-based) command line tool shared in this forum topic could be of help for you:
[SOLVED] How do I replicate Inkscape's bitmap tracer? http://www.inkscapeforum.com/viewtopic.php?f=22&t=11898
hth, ~suv
On 07/09/2012 12:22, Antonio Roberts wrote:
Thanks for the tip, but I got a few errors
http://www.inkscapeforum.com/viewtopic.php?f=22&t=11898&p=47965#p479...
Which python version do you have installed? As mentioned by the author, the script requires Python >= 3.2 (I can reproduce your syntax error if I try to run the script with Python 2.7).
However, it seems that the script has not been thoroughly tested on other platforms except Windows anyway: when trying to make it work on OS X (with Python 3.2), after some tweaking (to work around the "'module' object has no attribute 'SW_HIDE'" error), the script fails for me with the same error message from potrace as described by the Ubuntu user who posted right before you in that forum topic ("Document is empty, line 1, column 1"). I haven't yet figured out why...
Sorry, it seems that the software is not yet in a state where it can be recommended for general usage. I should have tested it myself beyond getting all the required dependencies installed & running the script only to show the help message.
~suv
participants (2)
-
Antonio Roberts
-
~suv