I had a paper-and-ink image with a thick black border around it. Past the black border was very dirty white paper. I wanted to (using Photoshop) replace the dirty white paper with pure white, or possibly with paper texture cloned from other parts of the image.

I realized that there was a reasonable gap in luminosity between the border and the dirt, so I figured what I could do is pick a shade of grey somewhere inside that gap, let's call it the threshold, that's brighter than the border, and darker than the dirt. Then just use the polygonal lasso tool to select right down the middle of the black border (so no finicky feathered edges on the selection, just nice straight lines) and select the dirty trim around the image. Fill that area with white on a new layer, and then say "Display this layer wherever the background is brighter than the threshold, otherwise display the background." If I pick the right threshold value, that should have the effect of masking off the dirty white paper, but letting through the border, right? All without the need to do any tedious, risky manual work that might gnaw into the border.

But how can I do that? Is it even possible?


1 Answer 1


I think what you try to do is this:

  1. Copy the original layer
  2. Hit D to reset your foreground and background colors
  3. Use the stamp-filter on the copied layer Filter > Sketch > Stamp
  4. Adjust Light/Dark Ballance (your threshold) and smoothness to your liking
  5. Select the whole layer and copy it
  6. Create a mask on your original layer
  7. Alt+Click on the mask thumbnail
  8. Paste the copied content from before
  9. Invert the mask CMD or CTRL+I)
  10. Delete the layer you used the stamp filter on
  11. Create a white layer for your background

Your Answer

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

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