How to defeat edge artifacts in composited landscape images

Few things are more frustrating to a photographer than edge fringes or halos that appear in Photoshop after a selected or extracted object has been placed onto a new background. Have faith, for all is not lost, as there are several solutions for handling this dilemma.


Some of these fixes are straightforward and simple, while others may not be as intuitive but can give excellent results, especially where complicated selections are concerned, such as around hair or foliage. Depending on the nature and complexity of the particular selection, it may be necessary to employ more than one fix. Let’s look at how I attack this problem using Photoshop CS4 on a variety of images, going from simple to more intensive methods.

This method is quick and is the one I go to first. It’s particularly useful where there’s not a lot of detail in the selection, such as a distant mountain ridge. Figure 1a is a rather simple shot of Fisher Cap Lake in Glacier National Park, but the sky is pretty boring, so I’d like to spruce it up a little by adding a more interesting sky. The composited image, with new sky background, is shown in Figure 1b. I won’t spend any time discussing how to make a selection or place it over a new background—if you’ve experienced edge fringing, then you already know how to accomplish these tasks. The only thing that I’ll mention is that the method utilized to make the selection seems to have little or no bearing on whether or not a resulting halo will be present.

In this example, the composite looks great, but sure enough on closer inspection, there’s a distracting halo along the mountain spine that makes the image appear unrealistic. Before attempting any fix, I zoom in on the fringed edge so that I can really see the problem and how the solution is working. To remove this edge fringe, the foreground layer is selected (in this example, Layer 1); then, from the main toolbar, choose Layers > Matting > Defringe. An option dialog box will appear to offer a choice of how many pixels to use for Defringing. I accept the default value of 1. (I haven’t noticed any marked difference in using higher values on any images that I’ve worked with, but that shouldn’t deter you from experimenting on your own with other values.) Figure 1c shows a close-up comparison of the mountain ridge before and after the Defringe tool has been used. Figure 1d is the completed composited image after defringing.

This Article Features Photo Zoom

Expand Selection
To illustrate this method, I selected an early-morning image of the Garden Wall in Glacier National Park (Figure 2a). The sky in this image is uninteresting, so I’d like to add a more exciting background. Again, I made a composited image as in the previous example (Figure 2b). Once more, upon close inspection, it’s apparent that there’s a significant amount of edge fringing or halo along the mountain edge.

To get rid of the halo this time, highlight Layer 1 in the Layers palette and then, from the main toolbar, choose Select > Load Selection. The Load Selection dialog box will appear—check the Invert box and click OK, accepting the default Source and Channel options. You should now see marching ants around the outside of the fringe on the original selection.

Here’s where the fix comes in—Select > Modify > Expand. Another dialog box appears, allowing the number of pixels by which the selection can be expanded to be entered. Generally, a value of 1 or 2 will be more than enough—but again, you may need to experiment. In this example, I used a value of 2. Hit OK, and the marching ants will move from the edge into the image by the number of pixels chosen. If there’s still fringe showing inside the line of marching ants, repeat the process in small increments until it looks right. If you feel that you’ve gone too far, simply back up a step using the History palette or the shortcut Cmd/Ctrl + Z.

Once you’re happy with the expanded selection, hit the Delete key to remove the fringe band. Lastly, Select > Deselect (Cmd/Ctrl + D) to get rid of the marching ants and you’re done. In Figure 2c, the upper image shows a close-up of the edge fringe before any corrections are made, and the bottom image illustrates the result of a 2-pixel edge expansion. The final corrected image is depicted in Figure 2d.

This Article Features Photo Zoom

Burn Tool
Using the Burn tool from the Tool palette is another option for dealing with edge fringing. Although this method can be used to remove fringing from all selection edges, it’s best for dealing with smaller highly detailed areas. To illustrate this example, I’m using an interesting early-morning shot of Glacier National Park’s famous red buses.

The exposure difference between the foreground and sky was such as to render the sky totally blown out (Figure 3a). In order to incorporate a more pleasing sky, I used the Expand Selection method as a first step, as in the previous example. However, in this instance, I used the Lasso tool from the Tools palette to remove part of the selection around the tree on the right (Figure 3b). Then I proceeded to remove the halo along the mountain ridge by expanding the selection—in this case, 2 pixels.

The Burn tool now is used to eliminate the halo effect from the tree leaves and the small portion of remaining mountain ridge adjacent to them. Select the Burn tool from the Tools palette, and set the range for Highlights.

Move the cursor over the area you want to darken and left-click your mouse. Repeat this process as necessary—the trick is not to paint a continuous stroke, but to move the cursor around and left-click one or more times over each area where fringing occurs until it disappears.

One good thing about the Burn tool is that the effects are cumulative with each mouse click even when set at 100% opacity. Keep in mind, the Burn tool basically is used to darken areas, so you may want to turn down the opacity, at least initially, until you have a feel for how dark the area under the brush becomes; otherwise, too much darkening may result. Working with a small brush size and low opacity (around 25%) will allow you to gradually dial in the desired result. Each image is different and will require some experimentation to find out what works best.

Figure 3c shows a close-up before-and-after comparison of the effect using the Burn tool. Figure 3d is the final image after removal of edge fringing.

This Article Features Photo Zoom

Clone Stamp Tool
The Clone Stamp tool is one of my favorite fixes and works extremely well with complex selections. This method is fairly straightforward, and to illustrate it, I’ve chosen a photo of a sleepy cove in St. Thomas with a washed-out sky (Figure 4a).

The first step here is to “lock transparent pixels” on the layer with the fringe (Figure 4b), otherwise you’ll end up with cloned patterns beyond the edges you’re trying to fix. Select the Clone Stamp tool from the Tools palette. To start, I pick an anchor point to act as a source from where I’d like to clone. Do this by holding down the Opt/Alt key while clicking the left mouse button—then let up on the Opt/Alt key, move the cursor to the fringed edges and click away. The halo disappears and is replaced with the multihued leaf pattern from the source.

Figure 4c is a close-up screenshot of the results of this technique. For the detailed tree area, I’ve unchecked the tool’s Aligned box to keep the cloning source confined to a relatively small area. Conversely, I checked the Aligned box to attack the line along the hilltop and horizon—that way the source changes so that the tone along the corrected edge will closely mimic the adjacent area. Some experimentation may be in order here, depending on the image you’re working with. It’s always best to start with a low opacity setting, which will let you gradually darken the edge. I worked with the Layer Blend mode set to Normal in this case; however, the Darken mode may be more appropriate in other instances—experiment to see what’s best for your particular application.

Figure 4d shows the completed composited image after all halos have been removed with the Clone Stamp tool.

I’ve presented a number of techniques that I use for dealing with annoying edge fringe. Some of these procedures may work better for you than others because each image is different, as are your own requirements. Don’t be afraid to experiment and try multiple fixes on the same image if one solution doesn’t quite cut it.

To see more of Rick Sheremeta’s photography and learn about upcoming photo workshops, visit his website at