0
$\begingroup$

I would like to convert a given image (say a binary image) into a .svg (or the outline into a path). I figured out that this could be accomplished with Inkscape. However, I need this to be a part of my new addon, meaning it should rely only on blender or python. Any ideas?

$\endgroup$
0

1 Answer 1

4
$\begingroup$

Directly from Blender only using python can be done via pypotrace. This is a python package that binds to potrace. potrace is also used by InkScape for converting images to Paths. You will need to include potrace and pypotrace in your add-on.

The result of the trace is a path. You will need to develop to you likings how to convert this to an SVG. But as SVG is just an XML file that will not be that hard.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .