Trace_to_SVG

hh hh at hyperhh.de
Mon Mar 5 16:08:17 EST 2018


Just uploaded "Trace_to_SVG" (MIT license from Potrace).

The stack uses Potrace (by P. Seliger, the "lite" JavaScript version) in a
browser widget with your input. It runs using LC 8/9 on Mac/ Win 7+10/ Ubuntu.
I changed the JavaScript a little bit to use better the power of the "LC-GUI".

You input an image (especially your own painting) or an image from a group or
an image from a text field. This is traced to an SVG path using curves with a
selectable level of smoothing.

The image is translated to "black and white" for tracing, you can set weights
for building the preparing grayLevel and set the threshold value. Transparency
is supported.

The generated SVG is displayed in a grouped "SVG Icon" widget and
(if installed) in a grouped "SVG_Text" widget, ready for being copied.

The size of the generated SVG is in between 10% and 110% of the input image!

Download "Trace_to_SVG" from "Sample Stacks"
(or http://livecodeshare.runrev.com/stack/869).





More information about the Use-livecode mailing list