Imagine an image with a free selection with Antialiasing on + Feather edge pixels, copy and paste to new Layer(top), set the top Layer mode to something like Clear/Erase.
I wonder if the following is not possible at all -even with individual pixel adjustments- or technically not possible for a program to automatically predict the desired result?:
I'm looking for a way to extract the difference as a single piece of graphics which I could use like a puzzle stone to get same background image again out of these 2 parts.

Explanation with help of my 4 pictures example collection below:
Picture 2 merged with Picture 3 must together look like the original image(bottom picture 4)
So basically add to the -individual pixels different alpha values- of that red marked border zone(top picture) the appropriate reversed difference of "individual pixel alpha values" from original image pixels to get a 1:1 copy of the original image as result.

enter image description here

  • Hi. Welcome to GDSE. Can you please post an example image either showing what you want to achieve, or what has failed. I'm having difficulty understanding your requirements to be honest.
    – Billy Kerr
    Oct 4, 2021 at 12:27
  • I added an example image.
    – atereou
    Oct 4, 2021 at 12:56
  • OK, I get it now. Thanks for that. Posted a possible workaround
    – Billy Kerr
    Oct 4, 2021 at 15:44

2 Answers 2


One possible workaround, is to use a layer mask to do the initial cutout. I suppose you wouldn't necessarily have to use layer masks for this, but it makes it easier.

Duplicate that masked layer, and invert the mask on one of those layers. This will give you the cutout, and the piece to insert. There will obviously be a gap at this stage.

Then make a group for each layer, and then duplicate the layers in each of the groups several times until you get a nice fit with no visible gap.

Here's an example done in Photoshop, but it should also be possible in other raster image editors that support masks and layer groups, such as GIMP for example. I'm using the Move tool, set to "group" to move the group, rather than individual layers.

enter image description here

You could then merge the layers in each of those groups, so you are left with only two layers.

enter image description here

  • Is this the end result? I still see a gap in your footage and does it only work because it's black on black(my example images have a structure, it's no black solid)?
    – atereou
    Oct 4, 2021 at 18:01
  • @atereou - if there's still a gap, you could add more duplicates, I only did five duplicates as a demonstration. The gap isn't visible for me when viewed at 100%. As far as the structure you are referring to is concerned, I can't really answer that, since I don't have access to your original image file. You may need to experiment to get a better result, or it may not be possible using this technique for your specific image.
    – Billy Kerr
    Oct 4, 2021 at 18:16
  • Alright. My test image was that one at the very bottom in my question above - it's black with some brighter areas.
    – atereou
    Oct 4, 2021 at 18:22
  • @artereou yeah I can see it, but it's not the original image file. I can't really tell how the transparency is structured. Maybe you could share the PSD, or PNG?
    – Billy Kerr
    Oct 4, 2021 at 18:26
  • well no problem - could I also take a look at your test .psd eventually?
    – atereou
    Oct 4, 2021 at 18:29

Your question has 2 questions:

  1. Can you remove the fringe color. Yes you can its called defringe, unmulting etc. Software usually have several functions for this.

  2. Can you merge the 2 alpha mapped images seamlessly. No. Simply alpha is not coverage and anything less that 100% will always show the background through. You can do it differently though by allowing overlap.

  • How could I imagine the overlap idea? Could you add this to your answer?
    – atereou
    Oct 4, 2021 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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