It is currently Thu Mar 28, 2024 5:41 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: layer boundary as selection
PostPosted: Wed Oct 18, 2017 11:42 am  (#1) 
Offline
New Member

Joined: Oct 18, 2017
Posts: 2
GIMP Version: 2.8.14
Operating System: Windows
OS Version: 10
GIMP Experience: Experienced User



dear all,

I am an experienced GIMP user, but there is one problem I can't find an easy solution for. I would like to be able to use the bounderies of a layer as fixed selection. for instance, I have a GIMP file with layers in different sizes and positions. When I press Ctrl-A the boundaries of the active layer are selected. But, then, when I make another layer active, GIMP changes the selection to the bounderies of that other layer. That is not what I want!

as an example, yesterday I had two images of same size. I used the second with blend 'darker' and opacity 60 and shifted a little bit to the right and downward. Then how do I get to the point where the canvas is the intersection of the two layers?

And help would be greatly appreciated!

Henk


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: layer boundary as selection
PostPosted: Wed Oct 18, 2017 12:34 pm  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2414
Nothing very quick that springs to mind.

First thoughts, instead of ctrl-a, use the fuzzy select tool with a large threshold to select all the layer. The threshold maxed out will select everything including transparency.

That selection unlike ctrl-a can go to a channel screenshot https://i.imgur.com/Lm6856h.jpg

Repeat for another layer, another channel https://i.imgur.com/ZXbLxRC.jpg

Now the two channels (selection masks) can be added / subtract / intersect to a combined selection. https://i.imgur.com/80ipLkT.jpg

_________________
Image


Top
 Post subject: Re: layer boundary as selection
PostPosted: Wed Oct 18, 2017 12:37 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4726
The selection isn't linked to a layer, but to the image (even if actions apply to the intersection of the selection and the active layer). Ctr-A select everything, if you switch layers, you are just looking at the selection somewhere else, so to speak.

if the layer are filled, you can to Layer>transparency>Alpha to selection to get a selection that covers the layer exactly. If you want to crop your image to the intersection of both layers:

* 1st layer: Layer>Transparency alpha to selection
* Select>Save to channel
* 2nd layer: Layer>Transparency alpha to selection
* Open the Channels list, right click on the "Selection Mask copy" and "Intersect with selection"
* Image>Crop to selection

_________________
Image


Top
 Post subject: Re: layer boundary as selection
PostPosted: Wed Oct 18, 2017 1:00 pm  (#4) 
Offline
New Member

Joined: Oct 18, 2017
Posts: 2
Thank you Rich2005 and Ofnuts!

It may not be a quick solution, but via the channels I can at least create the exact selection I want. Much better than trying to pinpoint guides somewhere.

many thanks!


Top
 Post subject: Re: layer boundary as selection
PostPosted: Wed Oct 18, 2017 1:30 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3969
Location: Canada
I don't know if you need a script. But I created one anyway just for kicks.
It simply rectangle selects your active layer with chosen the operation (Add/Subtract/Replace/Intersect).
https://www.gimplearn.net/viewtopic.php ... f=3&t=1023

_________________
TinT


Top
 Post subject: Re: layer boundary as selection
PostPosted: Wed Dec 30, 2020 12:29 pm  (#6) 
Offline
New Member

Joined: Dec 30, 2020
Posts: 1
Hello,

For starters, yes.. i know this is an old thread, however since I was looking for a solution to resize the layer boundary to the content of the layer and not finding any simple solution, I just stopped searching and accepted as is. Than again, every single time I was using GIMP it kept bothering me.. I search again and this thread keeps popping up as top result, yet not giving me a simple and quick solution.

Therefore, I registered just for the purpose of sharing what the simple and quick solution is.. (and I might forget this myself in the future)

Option 1
- Select the specific layer
- Select the Fuzzy select tool
- Select the content of the layer
- Go to "Layer" on the top menu bar
- Select "Crop to selection"

Option 2
- Select the specific layer
- Select all by Ctrl-A on the keyboard
- Select the "Fuzzy select tool"
- Hold the Ctrl-key to set the "Fuzzy select tool" to "subtract"
- Select an empty area of the layer without selecting actual content
- Go to "Layer" on the top menu bar
- Select "Crop to selection"

Option 1 is prone to mistakes, because you actually have to select every single piece of content in that layer. If you miss some part and you crop the layer boundary, these parts are hidden because their outside the layer boundary.

So Option 2 is less prone to mistakes because you avoid having to select every single piece of content. Only the empty space, between all the parts of content, and so I personally prefer this option as apposed to the first.

Good luck


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Can't get marching ants to show (selection boundary display)

2

No new posts Attachment(s) Apply Selection to Layer with LIVE PREVIEW

6

No new posts Attachment(s) GEGL selection modification filter to apply on layer mask

8

No new posts Selection pasting only transparency - single layer image [Solved]

3

No new posts Attachment(s) How to edit enlarged boundary size area.

2



* Login  



Powered by phpBB3 © phpBB Group