It is currently Wed Jul 24, 2024 6:31 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Save pixels between outer & inner selection
PostPosted: Wed Mar 28, 2018 7:57 pm  (#1) 
Offline
GimpChat Member

Joined: Nov 08, 2016
Posts: 45
GIMP Version: 2.8.22
Operating System: Linux
OS Version: Linux Mint 17.3
GIMP Experience: Basic Level



If I have a selection and shrink it by 10 px, how do I get only the image between the outer selection and the inner selection that is 10 px wide?

I can achieve it via the steps below, but is there an easier way?

I save the outer selection To Path. This is the original selection.
Shrink the selection and save it To Path. This is the new/inner selection.
Go to the Paths Dialog and select the original/outer selection and add it back using the Shift key on Path to Selection, then I click on the new/inner selection and subtract it using the Ctrl key. Last I invert the selection and cut. Everything is taken away except the 10 px frame.


Attachments:
save-selection.jpg
save-selection.jpg [ 22.47 KiB | Viewed 1928 times ]
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: Save pixels between outer & inner selection
PostPosted: Wed Mar 28, 2018 9:22 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1366
One way to do it -
Find center of canvas: Image > Guides > New Guide by percentage.
Select 50% for horizontal and 50% vertical.
Rectangle select tool > tick 'expand from center' and 'rounded corners' in the bottom of toolbox.
Start at center and drag select tool to the outside.
You need to look at the pixel size in lower left corner of your work area and compare it to image size minus 10px.
Delete inside of select tool. ;)


Top
 Post subject: Re: Save pixels between outer & inner selection
PostPosted: Wed Mar 28, 2018 11:42 pm  (#3) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
You can get the same effect by saving the selection to a channel and doing the operations with the channel's right click menu.

For an easier way, how about ?:
1) convert the selection into a path
2) shrink the selection and convert to a path
3) make sure both paths are visible
4) merge visible paths

But note that selections converted into a path are not always 100% accurate.

A third way of getting this shape is:
make a rectangular selection with rounded edges
convert into a path
stroke the path

The most accurate technique is probably getting arakne's path shapes plug-in and use it to create a rectangle with rounded edges and then stroke the path


Top
 Post subject: Re: Save pixels between outer & inner selection
PostPosted: Thu Mar 29, 2018 1:17 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4758
- Make outer selection
- Select>Save to channel
- Select>Shrink
- Select>Invert
- Open the Channels list, right click on the selection and "Intersect with current selection".

You can also look at Select>Border.

_________________
Image


Top
 Post subject: Re: Save pixels between outer & inner selection
PostPosted: Thu Mar 29, 2018 9:41 am  (#5) 
Offline
GimpChat Member

Joined: Nov 08, 2016
Posts: 45
These look awesome. I'm going to take some time and go through each one.

Regarding arakne's path shapes plug-in, I couldn't get it to run on linux. I gave all the python scripts executable permission, but still got Permission denied. I watched the video and it seems pretty powerful.

Even though there may be scripts to do a function, I want to do it manually, within reason, so I learn, and then I'll use the script :-)

Update on arakne's path shapes plug-in:
This is the way I installed it on Linux:

cd $HOME/.gimp-2.8/plug-ins/
mkdir arakne ; cd arakne
unzip it here
find -iname '*.py' -exec chmod u+x '{}' \;
find -iname '*.py' -exec dos2unix '{}' \;

I added $HOME/.gimp-2.8/plug-ins/arakne to gimp:
Edit > Preferences > Folders > Plug-Ins

I still get permission errors. It seems like gimp tries to run each directory inside plug-ins as an executable. But otherwise, everything works.


Top
 Post subject: Re: Save pixels between outer & inner selection
PostPosted: Thu Mar 29, 2018 8:39 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
With a selection just go to the select menu and choose border.


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Where did GIMP save my file, & how do I change default save location

5

No new posts Attachment(s) Aura/ Outer glow

3

No new posts Attachment(s) Creating two outer rings for a logo

3

No new posts How to detect only the outer edge and turn into a path

7

No new posts Attachment(s) Custom Font Outer Glow for Gimp 2.10: Initial Release

4



* Login  



Powered by phpBB3 © phpBB Group