Gimp-Forum.net
Converting path/selection to single stroke? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Converting path/selection to single stroke? (/Thread-Converting-path-selection-to-single-stroke)



Converting path/selection to single stroke? - ringo.r81 - 02-06-2018

Hi, I'm looking for a way to convert a path to a single line:
I have a scanned image. I used the "select by color" tool to select the outline. I then convert selection to path. Is there any tool or script that will change the path to a single line, rather than the outlines that the selection followed?

This whole thing is an attempt to get an image file that will allow me to DRAW/WRITE my own images with a Cricut machine, rather than print & cut or simply cutting the images out. I was told that I'll need to find a way to save a file as a "single stroke" vector image. If anybody knows another way to go about this, please let me know! I feel like I'm being pretty dense about this...  Huh

[attachment=1427]


RE: Converting path/selection to single stroke? - Ofnuts - 02-06-2018

Wrong tool. There are paths/vectors in Gimp, but mostly to draw/delimit things. If paths are your main concern, use Inkscape.

I think what you mean is called "centerline".


See here for a way to obtain a single line from your bitmap, in particular the Autotrace software or the Inkscape "centerline" plugin.

If you remain with Gimp, you create paths by hand over your bitmap, this isn't that hard.


RE: Converting path/selection to single stroke? - Blighty - 02-07-2018

I am not familiar with the Cricut machine, so these are just some thoughts.

Can the Cricut software use svg files?
Are you creating your images from scratch, or are you starting with a bitmap?

If creating from scratch and cricut can use svg files, then use Inkscape.

If you are starting with a bitmap, you may be able to use that in cricut. Cricut should have some tracing ability to create vectors. (I know that Silhouette Cameo tracing works very well). Convert your bitmap into a silhouette image (ie just 2 colours, black and white) and let cricut trace that.

Another option is to do your tracing in Inkscape. This can be auto tracing or manual tracing. Manual tracing is quick and easy once you get used to it. A disadvantage of Inkscape is that it does not do centreline tracing.


RE: Converting path/selection to single stroke? - Espermaschine - 02-07-2018

there are also online tracing services

try a search engine with the words: "online vector trace"

lots of results !


RE: Converting path/selection to single stroke? - rich2005 - 02-07-2018

Plenty on-line bitmap to vector converters. There might be one that does a center-line conversion, I-do-not-know.

On the other hand Mac might have some great vector application tucked away.

You could try the latest 0.92.2 Inkscape which should have a center line option (Inkscape menu Filters -> Extensions -> Images -> Center-Line Trace)

https://inkscape.org/en/release/0.92.2/

As I understand it this might need an old command line application Autotrace to function. It looks like you get it here. http://macappstore.org/autotrace/

If Inkscape + AutoTrace does not work then worth trying Autotrace on its own.

Code:
autotrace -color-count 2 -centerline -output-format svg -output-file out.svg -report-progress snoopy.bmp

My linux installation requires .bmp format with compatibility option turned on.

A typical line drawing from the internet probably needs cleaning up - jpeg artefacts for example. Some editing as well. Snoopys nose or eye as solid black does not work - no line to trace. Here is the command in a terminal, the original .bmp image and the vector single line SVG.

[Image: ZDa9BrV.jpg]

Depending on the complexity of the image, not impossible to use Gimp and trace over with the path tool. Just takes a bit of care, time and practice.


RE: Converting path/selection to single stroke? - ringo.r81 - 02-07-2018

Thanks so much for the replies, all! This gives me a few more things to try. Smile