Switch to full style
Ask all general Gimp related questions here
Post a reply

Is there a script for doing Stroke outside selection?

Thu May 25, 2023 9:29 pm

GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: Basic Level



My apologies if this has already been answered somewhere. I did a search, but nothing useful came up.

Does anyone have a script for adding a stroke ONLY to the OUTSIDE of a selection? I found one for selecting an entire layer (which is useful, and a rather glaring omission on GIMP's part). And I figured out how to add a path and put a stroke along that path. But every attempt I've made to put a stroke along the outside has either yielded nothing at all, or the usual problem with the stroke straddling the line.

I've been searching extensively for tips on this, and they're all either incomprehensible or don't work. Also, I don't want to have to jump through a million hoops to do something that OUGHT to be simple.

I can't be the only one who's at their wits' end about this. Has someone made a script for doing this simple thing? If so, can someone please post a link to it?

Thanks in advance.

Re: Is there a script for doing Stroke outside selection?

Thu May 25, 2023 10:57 pm

What you can do when you want a stroke outside a selection is
Do your selection. Grow it (the selection) then stroke it. Change your selection to a path and get rid of your selection. Stroke the path - will be better.

Re: Is there a script for doing Stroke outside selection?

Fri May 26, 2023 2:58 am

* Select > To path
* Select > Invert
* Edit > Stroke path

But usually, instead of doing this, you just stroke a layer below so the part that is inside is masked off, because with the edge of the selection will have partially selected pixels that may leave a tiny but visible gap.

If you need to outline the contents of a layer that has a transparent background you can automate a few things with my ofn-outline-layer script.

Re: Is there a script for doing Stroke outside selection?

Thu Aug 31, 2023 10:36 pm

Actually, I did find a solution that worked well for me. I'll post it here to help others:

Go to Filters --> Light and Shadow --> Drop Shadow.
Set X and Y both to 0.
Set Blur Radius to 0.
Set Grow Shape to Circle.
Set both Opacity levels to maximum.
Then adjust the Grow Radius to increase or decrease the line thickness.

Re: Is there a script for doing Stroke outside selection?

Fri Sep 01, 2023 6:44 am

https://github.com/LinuxBeaver/GEGL-SSG ... /releases/

My plugin SSG can make a stroke go more outside a selection using its "make SSG go inward or outward" slider

ssg.png
ssg.png (81.32 KiB) Viewed 407 times
Post a reply