Post Reply 

Selecting just a single line

Apr 11, 2012, 02:46 (This post was last modified: Apr 11, 2012 04:40 by DavidBrennan.)
Post: #1
Selecting just a single line
Let's say you just have a simple black line in Gimp. You then use the color select tool to select it, and you plan on then converting that Selection into a single line Path.

From: Rectselect

Into: Path

You select the line, but the Selection tool actually travels a loop around the line. So, when you turn that Selection into a Path, you do not have a single line, but you instead have a loop.

So my question is this: is there any mechanism for making your Selection in GIMP just a single line so that it can then be converted into a Path?

Originally, I was trying to achieve this in Inkscape (and started a thread about it in the Inkscape forum). However, it appears that, although other Vector Art programs can achieve this, Inkscape cannot. So I was thinking that I could instead use Paths in GIMP instead, but this is not possible because of the nature of Selections, as far as I can tell.

Does anybody have any thoughts about this? If anybody is capable of writing any sort of add-on for this, I think it would be very helpful to many people. I'm sorry that I'm incapable of doing so (one day, maybe).

Here's an attempt to illustrate this request:

[Image: Untitled-5.png]
Find all posts by this user
Quote this message in a reply
Apr 11, 2012, 06:27
Post: #2
RE: Selecting just a single line
Thanks, OfNuts.

I was only using the single line as a simplified example. In practice, the goal would be to be able to "Select" single lines over much more complex shapes (and then convert them into paths).

This all started because I had this facial mesh as a .PNG, and I wanted to convert it into a single threaded Curve/Path graphic. However, all the methods of selecting it simply went around the perimeter, creating two parallel lines, rather than one line through the center of the black area.

In Inkscape, the usual tool would probably be its Paint Bucket. In GIMP, it's the Color Select tool. But they both end up selecting the perimeter of lines, not their centers.

Does that make sense?

[Image: FaceMesh.png]
Find all posts by this user
Quote this message in a reply
Apr 11, 2012, 14:20
Post: #3
RE: Selecting just a single line
This is just another example. The objective is to be able go generate Paths/Nodes through the center of a given line rather than around it, as GIMP (and Inkscape) currently do.

I don't need to have it done for that photo at all. It was just something that I was thinking about a few weeks back, and I thought it would be very useful.

For instance, if you want to make a Vector graphic out of handwriting, currently you'll have the two Paths running around the perimeter of it. It would be superior to at least have the choice to also just make a single line through the center.

But I don't actually need it done for anything right now, personally. But just as a feature of GIMP or Inkscape, it would be great, I believe. You can see the link above to the thread at the Inkscape forum for more discussion, if you'd like.
Find all posts by this user
Quote this message in a reply
Apr 13, 2012, 22:04
Post: #4
RE: Selecting just a single line
NOTE: I just learned that this is called "Centerline Trace". It is apparently going to be added to Inkscape in the next version (though Inkscape is very slow with its updates). If it would be possible for anybody to incorporate a Centerline Trace into GIMP, I think that that would be very popular.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Freezes at start of line. DemonSlayer112 3 124 Mar 20, 2018 09:48
Last Post: paynekj
  Can't draw a clean line freehand Dave54 3 550 Jul 12, 2014 16:21
Last Post: Dave54
  command-line optimizing wmichaelv 4 1,164 Jun 11, 2014 08:26
Last Post: rich2005
  change Gimp from multi-window to single window moltres_rider 9 1,767 May 28, 2014 17:26
Last Post: rich2005
  How do I erase in a straight line? Terry50 2 1,402 May 12, 2014 03:11
Last Post: Terry50

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS