When you make a selection in an image in Photoshop, then paste the selection to another image or background, very often you’ll find (when it’s placed on a different colored background) a stubborn ring of pixels around your initial selection. This is known as an edge halo, fringing or matting.
Here’s a fairly extreme example. The snail was selected on a white background and pasted onto the dark red background. We can clearly see the white halo. This sort of thing is a problem for web designers. If you want to have an object sitting on a colored background you need to remove that edge halo after you remove the background, but it’s close to impossible to do it well using an eraser, so how do you get rid of it ? Well as is often the case with Photoshop, there is more than one way to skin a cat. Here’s three options.
1. Contract your selection
When you make your initial selection on the original image use the Refine Edge dialog box (this gives you a preview) or choose Select > Modify > Contract to contract your selection. Use this technique while you still have the marching ants showing your selection. Using the Refine Edge sliders you will be able to get a much better selection.
2. Use the Defringe command
You can use this command after you delete the background (it doesn’t work on layer masks or while a selection is active). Make your selection, then delete the background, then choose Layer > Matting > Defringe and enter a value in pixels. Photoshop analyzes the active layer and replaces the color of the pixels around the object’s edge with the color of nearby pixels. For example, if you enter 2 px, it’ll replace a 2-pixel rim of color all the way around the object.
3. Remove Black/White Matting
If your halo is simply black or white, Photoshop can remove it automatically. After you’ve deleted the background, select the layer with the object of interest on it and then choose Layer > Matting > Remove Black Matte or Remove White Matte. Like the Defringe command, this doesn’t work on layer masks or while you have an active selection.
If you enjoyed reading this post, you’ll love Learnable; the place to learn fresh skills and techniques from the masters. Members get instant access to all of SitePoint’s ebooks and interactive online courses, like Foundations of Photoshop.
Comments on this article are closed. Have a question about Photoshop? Why not ask it on our forums?