It is currently Sun Jun 30, 2024 5:36 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Reduce line thickness
PostPosted: Wed Feb 23, 2011 4:51 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
Hi, Guys can you help me? I recently did a contour line on a map. I did all the contour lines 2 pixels wide, except for one which somehow was done 3 pixels wide. I thought it was a simple job to just reduce it by 1 pixel, but unless I am overlooking something I do not seem to be able to do this.
I include a small image which if you blow up to 800% in gimp you will see is 3 pixels wide. This is a practice one I made to play around with.
If someone can show me a way to easily reduce the line width to 2 pixels I will be very happy.
I have played with shrink/enlarge, blur/sharpen and paths. (even tried the advanced settings , but I haven't a clue what I am doing there!)
NB, this is not a calamitous problem as each contour line is on a separate layer and I can reproduce the layer with a line two pixels wide, but it is a longish job and a simple solution would save a lot of time.
Attachment:
3 pixels wide.jpg
3 pixels wide.jpg [ 8.91 KiB | Viewed 13099 times ]

_________________
Image


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 5:31 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
There are probably several ways to obtain this, one being you can mask out everything but the 3px contour, and then turn that contour to a path, erase the 3px contour and then stroke the path at 2px.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 6:07 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2011
Posts: 225
Filters->Generic->Dilate in Gimp 2.7.1 at least does something like this.


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 6:21 am  (#4) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Too bad it doesn't have options for how much to dilate.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 10:51 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12531
I did try G'MIC's Skeletinize filter (invert Skeletinize invert since Skeletinize works on white lines), but it didn't quite give the result that I could except.

Attachment:
skel.png
skel.png [ 1.79 KiB | Viewed 13058 times ]


Kimpii's Dilate idea does give a better result, but still not true 1px.

Attachment:
dilate.png
dilate.png [ 4.68 KiB | Viewed 13058 times ]


As a side note, selecting all white then grow/fill with white 1px gives the exact result as dilate. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 10:53 am  (#6) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
There are probably several ways to obtain this, one being you can mask out everything but the 3px contour, and then turn that contour to a path, erase the 3px contour and then stroke the path at 2px.
The problem with the path is that it's a double-line path. I don't know how to make it a single lined one.

If you stroke the path you don't get a 2 pixel line.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 11:14 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12531
Of course, there just anything better then tracing (tedious), but I only half A'd (you can figure out the word; lol) the trace work. :)


Attachments:
trace.png
trace.png [ 10.17 KiB | Viewed 13052 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 11:14 am  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
kimppi wrote:
Filters->Generic->Dilate in Gimp 2.7.1 at least does something like this.
mahvin wrote:
Too bad it doesn't have options for how much to dilate.

That would be "Filters->Distort->Value Propagate".

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 2:20 pm  (#9) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I meant to create a path over the existing contour, erase the old line, rerun "Stroke Path" at 2px.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 5:28 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
It seems you all run into the same problem as I did. It appears that all filters or scripts draw a double path that spans the line width (as per Oregonian) hence any manipulation done is multiplied by two. Adding will give you a 5 (3+1X2), subtracting will give you 1 (3-1X2)--- one on each side of the path created by selection of a 3 wide line. It appears that you can not make an even numbered line width from an uneven numbered line width and vice versa.
Tracing any width line to make a "single" path and subsequent stroking the path 2 wide will work but is not practicable in my case.
I only run a basic Gimp so do not have access to Gmic and all the other SCM's and Plugins and I believe that any solution would be within the basic Gimp.

_________________
Image


Last edited by wbool63 on Wed Feb 23, 2011 8:10 pm, edited 1 time in total.

Top
 Post subject: Re: Reduce line thickness
PostPosted: Wed Feb 23, 2011 6:04 pm  (#11) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
If you mask out the other contour lines and leave only the 3px line showing, you can use Colors - Curves to reduce the size of the line. It might require a slight blur, and second Curves application to make it appear worthy for the rest of the contour lines.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 4:11 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
Hi, Mahvin, I've played around with what you suggest , but i am not having too much luck. It would be great if you could show me in a bit more detail perhaps with an outcome on my little test image. I am probably misunderstanding what you are trying to do!

_________________
Image


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 4:19 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I think it would be simplest, and quickest to just redo the line :lol
What would work very nicely is an offset script.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 5:10 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
Rod I have already redone the line . As I said in my original post I can redo the line as it is on a separate layer. But the problem interested me. Suppose all the contour lines were on a single layer, it would be very difficult to recover and probably very time consuming.
I have just tried the same exercise in Ps and have exactly the same problem, so I think it is not possible to adjust a line width by a single pixel

_________________
Image


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 6:30 am  (#15) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I use this technique extensively for thinning lineart, have done so for 2 plus years. It's just not "pixel" perfect, but pretty darn close. Bear in mind, that it sure beats having to redo a whole line from scratch. And if it can fool an observer, does it really need to be perfect? For some reason, the videos flicker when you watch them from gimpchat. It's best to watch them on YouTube, fullscreen.

www.youtube.com Video from : www.youtube.com

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 6:37 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
wbool63 wrote:
Rod I have already redone the line . As I said in my original post I can redo the line as it is on a separate layer. But the problem interested me. Suppose all the contour lines were on a single layer, it would be very difficult to recover and probably very time consuming.
I have just tried the same exercise in Ps and have exactly the same problem, so I think it is not possible to adjust a line width by a single pixel


Actually you could just cut and paste all the lines into separate layers and then edit the one's you needed to.
Not really that time consuming.Mahvins method of madness looks ideal though.
Kudos Mahvin! :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Reduce line thickness
PostPosted: Thu Feb 24, 2011 7:00 am  (#17) 
Offline
Former Member
User avatar

Joined: Nov 17, 2010
Posts: 618
Location: Rockford, IL
I just saw mahvin's video on YouTube (benefits of being a sub, I get it emailed, and notified on YouTube)

Learned something new using the curves filter :)


Top
 Post subject: Re: Reduce line thickness
PostPosted: Fri Feb 25, 2011 3:48 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jun 24, 2010
Posts: 504
Location: Western Vic Australia
Thank You Mahvin for showing your method. It is a good easy way to make a line appear thinner.
Unfortunately it does not suit my application to make it appear thinner, I wanted it to be reduced in absolute pixel width and retain the aliassed staircase look.
I tried something very similar to your method before I re-did the whole line. In most applications where smooth anti-aliassing is used your method would be very useful.
Again thanks for your input.

wbool63

_________________
Image


Top
 Post subject: Re: Reduce line thickness
PostPosted: Sat Oct 22, 2022 10:27 am  (#19) 
Offline
New Member

Joined: Oct 22, 2022
Posts: 1
I answered this at gimp-forum net

search "Thread make lines thicker on already drawn object?"

1. fuzzy select
2. select->shrink
3. cut and paste to where you want it


Top
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Reduce denisity in Filters > Noise

2

No new posts BRUSH SIZE REDUCE AND ENLARGE (Solved)

7

No new posts Attachment(s) Path: reduce the number of nodes while keeping the shape

9

No new posts What is this line?

3

No new posts Attachment(s) Gradient from line

3



* Login  



Powered by phpBB3 © phpBB Group