Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to actually invert the fuzzy selection?
#1
Hi. I want to select the opposite of what is currently fuzzy selected. This at first glance would look like invert selection but it it's not. The selection has soft edges and when inverted it selects the remaining unselected pixels. And the selection is hard edged.
Intuitively when I invert selection I expect to select 1-alpha of the already selected pixels, plus  the -- until then -- unselected pixels.
Reply
#2
(10-28-2020, 01:22 PM)andreim Wrote: Intuitively when I invert selection I expect to select 1-alpha of the already selected pixels, plus  the -- until then -- unselected pixels.

This is how it works...

In the image below:
  • Selection (ants, to the 50% selection line) is the purple dashed circle
  • Leftmost is bucket-fill on selection
  • Center is bucket-fill on inverted selection
  • Rightmost is difference between the two, they are equal (black circle) on the 50% selection line
   
Reply
#3
I think this came up before, especially for small selected parts of an image.
You should experiment with the threshold value for the fuzzy select tool.
or use a path to make the selection, Where the path crosses a pixel (sub-pixel) pixel transparency is adjusted.

   

(1) Black selected, selection inverted
(2) Selection cut.
(3) Inverted selection, path from selection.
(4) Selection from path, selection cut.
Reply
#4
Thank you, from your demo it looks like it should be. But in my drawing the behavior is different, as I described.
Settings I used:
Gimp 2.10

fuzzy select > select transparent areas (tried off too), antialiasing, select by composite (tried alpha too), threshold 0.0;
invert selection;
bucket fill > mode normal, opacity 100%, fill whole selection (tried fill similar colors too).Result:
[Image: 2hR47v7]
Nothing seems to work, lol. Here's the link for the image: https://ibb.co/2hR47v7

EDIT:
Please if someone could take a look at the file in question, maybe there's something wrong with the file: https://we.tl/t-vxDseilJ5n
Reply
#5
You haven't said what you are selecting with the fuzzy select - the black or the transparency?

Oh and GIMP 2.10.????? - it can make a difference.
Reply
#6
For that particular type of image. No selection required. Bucket fill with the mode set to behind.

   
Reply
#7
Thank you guyz for sticking with me. Fuzzy select = Fuzzy selection Angel . And I didn't think it would matter as long as the final selection has transparency levels.
I don't want to bucket fill, I want to delete the <fuzzy empty> out of another layer. How?
Reply
#8
What was that bit about bucket fill Wink quote bucket fill > mode normal, opacity 100%, fill whole selection

Still a bit of a guess as to objective but...

Is it say, the transparent area of layer#1 use to cut out the equivalent area in layer ? Try
On layer#1 make a selction Layer -> Transparency -> Alpha to Selection
Invert the selection
Down to layer: Cut the selection.
A slight difference in anti-aliasing, might be ok.

30 second example: https://i.imgur.com/K7vHT6O.mp4
Reply
#9
Thank you very much, you nailed it! That's exactly what I wanted to do. As for the procedure, I'll search for a way to automate it, macro or script-fu.
I even installed 2.8 thinking that it would be a 2.10 issue  Big Grin

I appreciate your time and everyone else's. Guys, I give you that -- the level of kindness of this community comes first in the top of the dozens communities that I'm part of.
Reply
#10
For that particular case, as it didn't require a great deal of precision, I got away with it by using your procedure. But in most cases there's a difference unaccounted for, as @Ofnuts pointed out in the first reply. Initially I didn't get what s/he meant.
I've tested different ways to invert alpha and selection with different results but surprisingly haven't yet found a way to get a perfect "complement":
[Image: pvJQ74Z]
https://ibb.co/pvJQ74Z

And of course by "perfect" I mean a complement that totally blacks its counterpart.
Reply


Forum Jump: