Gimp-Forum.net
make lines thicker on already drawn object - 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: make lines thicker on already drawn object (/Thread-make-lines-thicker-on-already-drawn-object)

Pages: 1 2


make lines thicker on already drawn object - Gully - 12-31-2019

I have several objects that are already drawn. After finishing them, I think they need to have thicker lines. Is there a way to make this so, without having to redraw the objects with a thicker line in the pencil or path tool?

I'm using GIMP 2.10 on linux.


RE: make lines thicker on already drawn object - Ofnuts - 12-31-2019

If you used the path tool, it's only a matter of re-stroking with a wider line.

Otherwise, starting with this;

[attachment=3706]

Apply a Gaussian blur:

[attachment=3707]

Start the Curves tool, and make a diagonal across the white part on the right (which is the histogram of your blurred image)

[attachment=3708]

Result:

[attachment=3709]

The trick being to find the position/slope of the diagonal which is the best compromise between smoothness and blurriness.
You can use the Threshold tool instead (but you will have jagged edges)(Threshold is just Curves with a vertical drop). You can also use Levels.


RE: make lines thicker on already drawn object - Gully - 01-06-2020

Ofnuts,

That did the trick. I am curious about the Threshold and Levels tools, but that's academic at this point. Thank you for the information. The steps in your explanation were helpful.


RE: make lines thicker on already drawn object - GimpFanatic - 07-10-2020

This is awesome! It's exactly what I needed to know, so thank you very much. Using the Paths tool for thickening lines is so time-consuming and tedious and this worked perfectly.


RE: make lines thicker on already drawn object - Zorpheus - 03-19-2021

(12-31-2019, 04:39 PM)Gully Wrote: I have several objects that are already drawn. After finishing them, I think they need to have thicker lines. Is there a way to make this so, without having to redraw the objects with a thicker line in the pencil or path tool?

I'm using GIMP 2.10 on linux.

I found an even better solution:
"Select -> By Color" to select the black lines
"Select -> Grow" to widen the selection
Set the background color to the line color wanted, remove alpha channel, and press delete.


RE: make lines thicker on already drawn object - Ofnuts - 03-19-2021

(03-19-2021, 03:01 PM)Zorpheus Wrote:
(12-31-2019, 04:39 PM)Gully Wrote: I have several objects that are already drawn. After finishing them, I think they need to have thicker lines. Is there a way to make this so, without having to redraw the objects with a thicker line in the pencil or path tool?

I'm using GIMP 2.10 on linux.

I found an even better solution:
"Select -> By Color" to select the black lines
"Select -> Grow" to widen the selection
Set the background color to the line color wanted, remove alpha channel, and press delete.

This is very artificial, and you would get the same result by bucket-filling the selection with the color. If the layer isn't opaque all over, the alpha channel is precious, don't delete it if you can avoid it.


RE: make lines thicker on already drawn object - Blighty - 03-19-2021

(12-31-2019, 04:39 PM)Gully Wrote: I have several objects that are already drawn. After finishing them, I think they need to have thicker lines. Is there a way to make this so,

Another method.

If it is black lines on a white background (or dark lines on light background), you can use Filters > Generic > Erode

Doesn't work on a transparent background. But you can put a white background below the lines, merge down, and then use Erode. Now use Color to Alpha to remove the white background.


RE: make lines thicker on already drawn object - mholder - 03-20-2021

(03-19-2021, 08:37 PM)Blighty Wrote:
(12-31-2019, 04:39 PM)Gully Wrote: I have several objects that are already drawn. After finishing them, I think they need to have thicker lines. Is there a way to make this so,

Another method.

If it is black lines on a white background (or dark lines on light background), you can use Filters > Generic > Erode

Yes, Erode and Dilate are excellent ways to do this, my personal favorite especially with masks.  The only issue I have is the results tend to get kind of square edged.  I have found that a mean curvature blur helps round out the square edges a bit.


RE: make lines thicker on already drawn object - vespa6 - 04-01-2022

(12-31-2019, 05:37 PM)Ofnuts Wrote: If you used the path tool, it's only a matter of re-stroking with a wider line.

Otherwise, starting with this;



Apply a Gaussian blur:



Start the Curves tool, and make a diagonal across the white part on the right (which is the histogram of your blurred image)



Result:



The trick being to find the position/slope of the diagonal which is the best compromise between smoothness and blurriness.
You can use the Threshold tool instead (but you will have jagged edges)(Threshold is just Curves with a vertical drop). You can also use Levels.

Can someone please explain this in a bit more detail, I have tried and cant get it to work - Im new to gimp, still learning, thank you


RE: make lines thicker on already drawn object - tmanni - 04-01-2022

If the layer you are working on only contains grayscale values (so no colors and no transparent pixels), you can use the trick of applying the hidden filters used by Select > Grow or Select > Shrink.

Example: for growing black lines on white background, you can do:
Filters > Generic > GEGL Graph... and type:

Code:
gimp:shrink radius-x=5 radius-y=5 edge-lock=yes

or using the grow filter (for the same result):
 
Code:
invert
gimp:grow radius-x=5 radius-y=5
invert

Adjust radius-x and radius-y for your needs.