Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Outline of a selection
#1
Hello

Is it possible to copy the outline of a selection from one layer to another?
I say the outline, and not the content.

Thanks for your help.
Reply
#2
(05-19-2023, 10:24 AM)prandus Wrote: Is it possible to copy the outline of a selection from one layer to another?
I say the outline, and not the content.

If you mean by outline, the 'marching ants', (aka marquee) you get having made a selection, then that applies to all layers. 

All you need do is make the required layer active by clicking on it in the layers dialogue, then copy / paste / cut / fill whatever you need to do on that layer.

For future use you can save a selection: Select -> Save to Channel and restore at a later date from the Channels dock.  see: https://docs.gimp.org/en/gimp-channel-dialog.html and https://docs.gimp.org/en/gimp-channel-di...annel-mask

When you Save an image as a Gimp .xcf file that channel information is kept and also an active selection if there is one.
Reply
#3
I will be more specific (English is not my language):
My end goal is to blur the background of a photo.
Online solutions are very good at cutting out a foreground.
So I got my foreground and wanted to stick it on the previously blurred image. The problem is that the colors of the foreground are integrated into the blurring and therefore bleed on the background (This effect is also visible on online solutions that promise a blurring of the background).
So I would like to remove the foreground from my image BEFORE blurring it.
But, while writing this I tell myself that if I delete the 1st plan, it is the transparency of the deleted part that will drool...
That's what it looks like in the attached picture...
So my solution is not correct.

Thank you for your helping hand.


Attached Files Image(s)
   
Reply
#4
(05-19-2023, 10:24 AM)prandus Wrote: Hello

Is it possible to copy the outline of a selection from one layer to another?
I say the outline, and not the content.

Thanks for your help.

The selection always apply to the whole image. So you can perfectly create the selection using features in a layer, and then activate another layer and use that selection (delete things, paint things...).
Reply
#5
(05-19-2023, 01:15 PM)prandus Wrote: I will be more specific (English is not my language):
My end goal is to blur the background of a photo.
Online solutions are very good at cutting out a foreground.
So I got my foreground and wanted to stick it on the previously blurred image. The problem is that the colors of the foreground are integrated into the blurring and therefore bleed on the background (This effect is also visible on online solutions that promise a blurring of the background).

I am still not sure about the problem ?  Your attached image - what is it ? 

Looks like the on-line foreground extract has cropped the image

Try:

Invert the selection: Select -> Invert then Edit -> Cut to remove the semi-transparent pixels
Turn the selection off Select -> None
Make the layer same size as the background layer: Layer -> Layer to Image Size.

Otherwise, give a screenshot of the whole image not just a corner.
Reply
#6
Here are several illustrative images:

- starting image: "flowers"
- foreground (what could be): "flowers_foreground"
- image obtained after global blurring then pasting of the foreground: "flowers1",
- image obtained after deleting the foreground, blurring, then pasting the foreground: "flowers2".

On "flowers1", the light colors of the foreground have smudged on the background,
On "flowers2", it's the transparency due to the erasure of the foreground that drools on the background.

All of these effects are completely normal; So the method I'm using isn't the right one...
So is there a better way to blur a background?
Thanks for your help;


Attached Files Image(s)
               
Reply
#7
Thanks, that gives a bit more to work on.

Looking at the foreground extracted image, all the dark colour is removed, as with an aggressive colour select.  I would try and find some other method to make the initial selection.

I used regular Gimp here: The foreground selection tool see: https://docs.gimp.org/2.10/en/gimp-tool-...elect.html

Then a layer mask using the generated selection.

There are other ways but this is what I recommend.  3 minutes https://youtu.be/2WB1Yw6XwBU Sorry it is in English.



Reply
#8
Thumbs Up 
Excellent !

It is very kind of you to have made the effort to detail the explanations in this way.
I applied the method and the result would be perfect if I had taken the necessary time for the selection.

Thank you so much.  Smile


Attached Files Thumbnail(s)
   
Reply
#9
If I may, another way to do it
Drag and drop the red channel on the canvas
filters > Levels to give a lot of contrast

   

Select the black part > Select > remove holes > fill with black, then select invert > Fill with white
Then duplucate 3 or 4 times the flower layer, on each delete the flower, and move them / transform / flip them horizontally/vertically to remove the holes, then merge them all and blur, and on the top flower layer apply the mask you did created

   
Reply
#10
Thank you.

Indeed, there are several methods to clip the foreground; some faster than others, depending on the image.

But my problem is mainly, in fact, the blurring of the background.
With "Gaussian blur", there is the problem of the halo; it is avoided with "median blur"; but I find the result less natural. 
Maybe I'm too demanding...
Reply


Forum Jump: