If I have two images, one with a transparent object overlay and one without but that are otherwise identical, how can I extract the transparent object?

Example: given the first two squares, how can I get the last one?

enter image description here

  • 1
    I hope you don't mind, I edited your example image to separate the different images as it wasn't obvious what was going on.
    – Cai
    Jun 3 '16 at 21:41

Put the image without the transparent square, perfectly aligned on a layer on top of the one with the square and set its blending mode to 'Divide'. Easy.

Divide blend mode

More information on the different blending modes can be found here:

If you want your square on a transparent background, you can use the square as a layer mask on itself. The result from this won't be perfect (i.e you won't get the exact transparency level as the original) but it will get you very close with some adjustments.

  1. First Select All and Copy Merged.

  2. Paste on a new layer and with your new merged layer selected, add a new layer mask.

  3. alt + click the mask thumbnail to edit the mask.

  4. cmd + I to invert the mask (black masks, white reveals).

You will need to manually adjust the mask using levels/curves etc. so that the transparency matches the original.

edit the mask

Click anywhere other than the layer mask thumbnail in the layers panel to stop editing the layer mask and see the result.

on a transparent background


If the image is flat, you can't. If you have the layered PSD, then it's pretty easy and there are a few ways you could do it.

One way is to select the transparent object you want to isolate, by + Clicking on the layer's icon in the Layers Panel.

enter image description here

With your selection made, go to Image > Crop

enter image description here

Deselect your layer ( + D) and then delete everything else in your document, so only your desired layer is left

enter image description here

Save in a format that supports transparency, PNG for example.

  • In this case, I only have the two flat images Jun 3 '16 at 20:13

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.