(03-30-2022, 04:26 PM)Krikor Wrote: By superimposing the final result (the opposite image) over the contours of the initial image, with a red layer in the background, it is possible to see a small gap generated in this process.
At least in my tests, only the procedure suggested by Denzjos did not present this gap.
A faint gap is normal and expected!
If your process is correct, the pixels that are anti-aliased black-to-transparent become anti-aliased transparent-to-black, or, in other words, they get the complementary opacity so are still only partially opaque. So when you overlap both images, you overlap partially opaque pixels with other partially opaque pixels and cannot get a full opacity, so you see a faint gap.
If there is no gap, the opposite image is too thick, and if there are fully transparent pixels in the gap, the opposite image is too thin.
It's the same as doing this:
- Create a layer filled with black and duplicate it.
- Create a circle selection
- On one layer, delete the selection
- On the other layer, Select > Invert and delete the selection
- Check the result over a white layer
- You can also (without a white background) use the pointer dialog to check the alpha of the pixels in the gap and check that all pixels are above 75% opacity(*)
(*) because the pixels with opacity X in one layer will have opacity 1-X in the other. When you apply this in the alpha-compositing formula the resulting opacity is expressed by 1-X+X² which in the [0.0, 1.0] range has a minimum of 0.75 for X=0.5