Jump to content

Remove background with mask?

Recommended Posts

I have two image files. I have a file with an image overlayed on a background. I have that exact background as a second image with no overlay. I no longer have the image overlay as it's own image and I need it back.


Is there a way to mask the background image onto the overlayed image to end up with just the overlay itself and no background? It's too complex an overlay to simply cut out by hand and still look the way I want it to.





This here is exactly what I'm looking for, is there something similar for Paint.NET? I'd hate to have to download GIMP just to do this one thing.

Edited by darxide
Link to comment
Share on other sites

Layer the two images one above the other on a single canvas.  Full image below and background image above.


Set the upper layer's blend mode to XOR.  This should black out all pixels which exactly match the lower layer.


Select the black region on the upper layer with the magic Wand and a very low tolerance.  You're trying to get just the background elements - not the "object"


Activate the full image layer & press delete.


Hide the upper layer.



What just happened here?  We used XOR to find the matching pixels in both images.  We selected these and removed them from the full image.  This should have left us with the net different pixels between the two images.

  • Upvote 1
Link to comment
Share on other sites

There must have been some quality differences when the two were saved because the background is slightly different. Just enough that they don't match for the XOR but you can't tell by looking unless you zoom in 500% and stare at a small cluster of pixels. When I flip between the layers I notice the tiniest differences in the hues of some of the pixels.


Oh, well. Thanks for the info, I'm sure it will come in handy at some point now that I know how to do it.

Link to comment
Share on other sites

You might be able to capture some of the stray pixels by increasing the Tolerance of the Magic Wand.


If the background is different then trying to use it as a mask is doomed I'm afraid.  Perhaps this might help http://forums.getpaint.net/index.php?/topic/13796-cutting-out-images/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...