0

I have a PNG file of, for example, a person with arms and legs. I want to select an 'arm' and copy it into a new layer. I then want to delete the 'arm' from the original image. So I would have one layer with an 'arm' and one layer with a 'person' missing an 'arm'. When I do this, however, the pixels along the selection line are deleted, resulting in a border of empty pixels separating the selection from the original image.

Is there a way to select where the selection line would have essentially 'zero-width'?

  • 1
    Hi. Welcome to GDSE. Could you please share images showing the original, and the problem/what you are trying to achieve. It sounds like you want to switch off antialiasing in the selection tool options (there is an option for that), but I can't be sure this will work for you, because it will depend on what kind of image it is - for example if it has antialiased or slightly fuzzy edges, or sharp pixel edges. – Billy Kerr Oct 18 '19 at 11:20
0

It depends how you do the selection. The color selection and the fuzzy selection, without anti-aliasing and a zero threshold,will fully select all pixels, so you cut fully-selected pixels and paste fully-selected pixels.

Otherwise, with most selection tools, things are different. Pixels along the edges are partially selected (this partial selection reflects how much of the pixel is inside the selected shape). So when you cut & paste (or paste & delete), the pixels left behind as well as the ones copied are only partially opaque, and since these partial opacities don't add up to full opacity there is a gap.

For instance, this is a blue layer over a white layers. Ctrl-X+Ctrl-V, there is a visible gap:

enter image description here

But the cut is smooth:

enter image description here

One way to fix the problem is to use Select>Sharpen before the cut/paste, so that there are no longer any partially selected pixels. But the cut is jagged:

With a Select>Sharpen there is no gap:

enter image description here

But you are really still looking at something like this:

enter image description here

But the cut is jagged:

enter image description here

So if you used these tools to have smooth edges elsewhere this isn't acceptable, unless you combine two selections, a smooth one on most of the arm and a sharp one on the joint.

  • Color selection and Fuzzy select have both antialiasing active and a non-zero threshold by default, so neither of them is guaranteed to only fully select pixels. – Michael Schumacher Oct 21 '19 at 8:11
  • Fixed. But in practice the Fuzzy select doesn't create that many partially selected pixels. – xenoid Oct 21 '19 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.