Compositing Bracketed Photos (Part two)

By Barry Haynes Back to


The image Ship Rock Fire Sunset, on the cover of my book Photoshop CS Artistry, is a composite of two bracketed photos created from one original 120 film 6×4.5 shot. In the first of this two-part article ( PT, March/April 2008), I showed you how to create and work with both digital- and film-bracketed images, and how to line up several images. Here I’ll cover exactly how this Ship Rock image was created, how to create masks from channels, and how to separately adjust the colors from each image that went into Ship Rock Fire Sunset.

The following steps are common to working with many bracketing processes. You can get two versions of the same image by shooting two different exposures in the first place, or scanning a single film exposure twice using different settings, or creating two different Raw interpretations of a single camera Raw file. Another way to end up with two versions of the same image—which is what I did for Ship Rock Fire Sunset—is to make two different initial adjustments to one image to get different sections of the image ready for final compositing and adjustment. Whatever your situation, these next few steps show you how the two images can be combined and improved with Photoshop layers.

The Ship Rock image

Let’s take a look at the Ship Rock image on the first page of this article. First we’ll examine my final layered file for this image, which you can see in Figure 1.

The layers named Foreground Spotted and Sky Spotted originally came from the same 16-bit scan of Fuji Velvia film and a 6×4.5 Mamiya 120 camera. This image was originally created using Photoshop 7, which supported 16-bit files but not 16-bit layers. To create the Foreground Spotted and Sky Spotted layers (let’s just call them Foreground and Sky) in Photoshop 7, it was necessary to open two copies of the original scan, then process each of those copies using a Levels adjustment followed by a Curves adjustment. The adjustments to the Foreground image were done to open up the details in front of the rock and on the rock itself. The adjustments to the Sky image focused on getting the optimal sky values from that original scan and didn’t worry about what those adjustments would do to the details in the foreground areas. Those details were going to come from the Foreground image. After making the adjustments, I converted each of those images to 8-bits per channel using Image > Mode > 8 Bits > Channel. I then combined them into one Photoshop layered file and added the adjustment layers you see in this ShipRockLayers file.

If I were to create this image using Photoshop CS, CS2, or CS3, the Levels and Curves adjustments I made to the two versions of the original 16-bit image would be done as 16-bit adjustment layers, and the ShipRockLayers file would still be in 16-bit mode, preserving all the information. With 32,000 possible tonal values per pixel per color versus 256 in 8-bit mode, 16- bit images have a big advantage, especially when you need to do fairly radical color or contrast adjustments to the images. Being able to stay in 16-bit layers is a big advantage in these later versions of Photoshop. You should always work on 16-bit files because digital Raw files and today’s scanners allow you to work with all this extra detail. When you shoot JPEGs instead of Raw, you usually throw all that extra detail away. You can do this technique in 16-bit mode with any version of the Photoshop since CS. Those three Photoshop versions have minor differences in the way the Layers palette and Curves diagrams look, but they all work the same way.

Combining the two files

We need to move both the Foreground and Sky images into one file, with one image on top of the other. Either one could actually be on top, but in this case I put the Sky image on top. As you go through these steps, you might want to try the process with two of your own bracketed images.

• I used Photoshop’s Window menu to first select the Foreground image, and then the Sky image, which I then placed on top.

To enable you to see both of them at the same time, these images should not be in Full Screen mode. Hitting the F key toggles the screen mode until you can see all the windows. The top window needs to be small enough for you to see the bottom Foreground image sticking out behind it.

• I typed a V to switch to the Move tool and held down the Shift key while clicking in the Sky image area. I then dragged the cursor, with the mouse button still down, so it was on top of some part of the Foreground image area (Figure 2) and then released the mouse button first, leaving the Shift key down for a moment. This caused the Sky image to be copied on top of the Foreground image as a new layer in that Foreground image file.

Holding the Shift key down as you drag and drop the Sky layer forces that layer to be centered in the new document. Since both these documents are exactly the same size in pixels, the two layers are lined up perfectly. Doing this without holding the Shift key down or letting up on the Shift key before the mouse button could cause the Sky layer not to be centered over the lower layer.

• The default name for the new layer would be Layer 1, but I double-clicked on the word Layer 1 and typed the word Sky to rename that layer (Figure 2). Next, I clicked the Layer Lock Position icon at the top of the layers palette to make sure that this layer would not be accidentally moved. I used the Window menu to switch back to the Sky image and then closed it. This brought me back to the Foreground image that now contained both versions of the image as different layers.

Creating the Sky/Foreground mask

When you composite bracketed photos, a mask usually determines which portion of each photo is visible in the composited image. When there are only two images, you want only one mask because that simplifies the editing needed to get the two images to fit together seamlessly. This type of horizon mask is difficult to do seamlessly because the sky has a considerably different contrast adjustment than the rest of the image, and the edge between the two is very sharp. Here we will make a copy of one of the channels and use it to make this mask. We want to find the channel that already has the most contrast between the sky and the rest of the image. In this case we have six channels to choose from—three from the Sky and three from the Background layer. I used Window > Channels to bring up the Channels palette. The Sky layer was still active, so I clicked right on top of the word Red in the Channels palette.

(Turn off the Eye icons for the Green and Blue channels if necessary.) This Red channel has a lot of contrast between the sky and everything else (Figure 4a).

  • I compared this to the Green channel by clicking the word Green, and looked finally at the Blue channel by clicking the word Blue. The Blue channel (Figure 4b) was the best candidate in this layer because it has the most contrast along the horizon where we want the mask to be.
  • Now I clicked back on the letters RGB in the Channels palette, then clicked the word Background in the Layers palette, and turned off the Eye icon for the Sky layer. I’m now just looking at Photoshop’s Background layer, the bottom layer, (which actually contains the Foreground image in this composite). I clicked the word Red in the Channels palette, then Green, then Blue, and saw that the Red channel was the best candidate in this layer, because it had the most distinct contrast between sky and foreground along the horizon. Still, after checking all six channels, I determined that the best channel to use for this mask was the Blue channel in the Sky layer.
  • I clicked the word Sky in the Layers palette, turned the Eye icon back on for the Sky layer, and clicked the word Blue in the Channels palette. Next, I clicked- and-dragged the word Blue down to the Copy icon, just to the left of the Trash icon, at the bottom of the Channels palette. This made a copy of the Blue channel, called Blue copy, which I turned into a mask.

Mask using Levels adjustments

I picked the Blue channel over the Red one from the Background layer because there’s a gap between the darker and lighter areas of the histogram. This is usually a sign that the mask will be easier to create.

• I chose Image > Adjustments > Levels (Command-L) to run Levels on this Blue channel copy (Figure 5). Within Levels, using the top set of sliders, I moved the rightmost Highlight slider to the left and the leftmost Shadow slider to the right until I got a mask that had a clean separation between the sky and the rest of the image. The sky area was white, the foreground area black (Figure 6).

Once you get the basic mask, it’s easy to notice how subtle adjustments in each of the three Levels sliders affect the edge of a mask. Mask edges often have a few gray pixels in them (which create a blend). Getting this edge just right is the key to saving you hours of work later tweaking the mask by hand. One helpful technique is to turn the Preview check box off and then on again to compare the mask to the original channel to make sure you have the best match. You’ll often have to adjust a few areas with a brush after you leave Levels.

• Once the mask was the best I could get from Levels, I chose OK from Levels, then typed B for the Paintbrush tool, and set both the Opacity and Flow to 100%. I chose a 75-pixel brush with its hardness set to 80%. I then typed a D (default colors), followed by an X (exchange) to set the brush color to Black. I pressed Tab to get rid of all my Photoshop palettes, then Command-0 to fill the screen with the image. I painted-in any white holes in the black part of the mask, then typed X to switch back to White as the foreground color, and fixed any areas on either end of the horizon where some non-white pixels extend into the sky.

To be more exact, one can use Command (Control)-Spacebar-Click to zoom into those areas on either side of the horizon and then use the left or right bracket keys to change the size of the brush. I don’t worry about doing a perfect job now, as I’ll have to do final horizon cleanup once I put the two images together and adjust the color and contrast of each of them.

• I pressed the Tab key to bring my palettes back, then Command (Control)-clicked the words Blue copy in the Channels palette to load this mask as a selection. Next, I clicked the letters RGB at the top of the Channels palette, and I was ready to add this mask to the Sky layer. To do that, I chose Layer > Layer Mask > Reveal Selection to add to the Sky layer a layer mask that shows only the sky parts of this layer where the mask is white. The non-sky parts of this layer were blocked by the black parts of the mask, revealing the rest of the composite image coming from the Foreground image layer below.

Fine-tuning the two parts

Once an initial mask is made, I’ve found it’s better to fine-tune the color and contrast of the rest of the image before trying to make this mask perfect. When you add contrast or saturation, or burn and dodge, it can change how well the mask blends the parts. You don’t want to have to make difficult edits to the mask more than once.

• I double-clicked the Background layer and renamed it Foreground, since this layer does represent the foreground of the Ship Rock image. I clicked the Lock Position icon to stop this layer from accidentally being moved, which it could be now that it was no longer a Photoshop Background layer. By choosing Layer > New Adjustment Layer, I was now in the correct position to start adding adjustment layers that only modified the way the Foreground of this image looks.

So far I’ve laid out the steps required to take two separate image files and put them together as separate layers into one Photoshop file. In this case, we used one channel of one of these layers to make an initial mask to separate the two versions of this image. This is one of the main ways to make a mask to join two versions of the same image. There are other ways to make this initial mask, depending on the two images involved. Instead of actually doing all the rest of the color-correction changes to this image, we’re going to study the changes I did to the original image. That way we can cover several types of images and masking situations while we go through this article. (While going through this, you can try these types of changes on your own composite image.)

Figure 1 displays the final layers palette from the ShipRockLayers image on my Photoshop Artistry DVD. The first ForeGrnd Curve 1 adjustment layer (Figure 7a), second from the bot- tom of the palette, makes all the foreground values brighter and more contrasty. Since this adjustment layer is below the Sky layer, these adjustments do not affect the Sky layer. The next adjustment layer up, Add Selective Contrast (Figure 7b), doesn’t affect the Sky layer for the same reason. In Photoshop, adjustment layers are added above the currently active layer by choosing Layer > New Adjustment Layer, then choosing the layer type.

The next layer in the Layers palette for this final image is the Sky layer. Adjustment layers usually influence the cumulative effect of all the layers below them. So normally, the adjustment layers above the Sky layer would influence both the Sky layer and the Foreground layer at the bottom of the palette. But notice that the Sky Curve layer directly above the Sky layer is indented. This indentation means that this Sky Curve layer is bonded to the Sky layer and the Sky layer’s mask, so the Sky Curve layer also shares that mask attached to the Sky layer. The Sky Curve adjustment layer only affects areas where the Sky layer’s mask (Figure 7c) isn’t black.

When you choose Layer > New Adjustment Layer > Curves, there is an option in the New Layer dialogue named “Use Previous Layer to Create Clipping Mask.” Checking this option indents that new layer and makes it share the mask of the layer below. This is what I chose in the Sky Curve layer to make it indented in the Layers palette. Whatever I do with this curve will not affect the foreground area, which is black in the Sky mask. This Sky Curve (Figure8) is just a subtle S- curve to add more drama to the sky.

The next layer, Overall Hue/Sat Tweak, is simply a 12% Master Saturation boost. Notice that since this layer is not indented and its mask is white, it affects all of both parts of the image below it.

Tweaking the mask

The adjustment layers discussed in the previous section made the color adjustments needed in the two sections of this image. Now comes the trickiest part of this composite—I have to tweak this hard-edge mask between a contrasty foreground and sky. When compositing images, you often have to tweak the mask after you make color and contrast adjustments to the components.

The Merged Spotted layer, above the Overall Hue/Sat Tweak layer, was a new solution I came up with when working on this image. I found that no amount of mask-tweaking was making the transition between the Sky and the Foreground totally transparent.

Normally, to improve this transition, you’d use a small brush to paint black in the sky mask in the areas where too much sky is showing; you’d paint white where too much fore- ground was showing. Along this transition area, the change between foreground image and sky image is only a few pixels wide. If the pixels of this transition in the Foreground layer do not match exactly the pixels of this transition in the Sky layer, one cannot make a perfect mask between the two.

Even though the two layers are lined up exactly, the 16-bit color adjustments I made to the Sky layer made that entire layer much darker, especially the foreground parts of that layer. The adjustments I made to the Foreground layer made that entire layer much lighter, especially the sky.

If the mask is not perfect, and the pixels along that border don’t line up and match the mask exactly, then we’ll see a dark line below the horizon and a light line above the horizon (Figure 9).

Creating a merged edge

Instead of editing this mask forever, I created a new layer, just along this edge, where I could set all the pixels just the way I wanted. That is what the Merged Spotted layer is. This type of solution is only required when either side of a really sharp and contrasty edge has been adjusted quite differently.

• To make the Merged Spotted layer, I Command-clicked the Sky mask thumbnail to load its mask as a selection. I then chose Select > Modify > Border and used a value of 10. That gave me a selection that spanned both sides of the horizon defined by the Sky mask. I then chose View > Fit on Screen, or Command (Control)-0, so I could see the entire image. This border extended around the top of the sky, so I typed L for the Lasso tool, then held down the Option key to delete from this selection. I wanted only the part of the selection that spanned the horizon. I clicked in the middle of the sky, then held the mouse button down while moving the mouse to one end of the horizon, all the way around the top edges of the image, back to the other side of the horizon, then back to where I started. Finally, I released the mouse button followed by the Option (Alt) key.

The final selection is just 10-pixels wide, running along the horizon on the border between these two images (Figure 10).

• I then used Window > Channels to bring up the Channels palette, and clicked the Save Selection icon—the second icon from the left, at the bottom of the palette—to save this selection in a new channel named Alpha 1. Next, I clicked on the Alpha 1 channel to see that the selected area there was white. I chose Select/Deselect, or Command (Control)-D, to get rid of the selection, then chose Image > Adjustments > Invert, Command (Control)-I, to invert the mask so everything but this horizon area would be white. The edges of this mask weren’t smooth, so I chose Filter > Blur > Gaussian Blur and did a 2-pixel blur on this mask saved in a channel. That smoothed the edges of the mask, much like adding a feather to a selection. After that, I clicked back on the letters RGB at the top of the Channels palette.

• At this point in my process of color- correcting this image, the Overall Hue/Sat Tweak layer was at the top of the Layers palette and I clicked on it to activate it. While holding down the Option (Alt) key, I chose Merge Visible from the Layers palette pop-up menu. I held down the Option (Alt) key until Photoshop had finished creating the new layer. This created a new layer named Layer 1 atop the Layers palette and merged the results from all the layers below into it.

Without holding down the Option key, all the layers would have been merged into one. The Option key tells Photo- shop to leave the existing layers alone and create a new merged layer on top of the currently active layer. I renamed that new layer Merged.

Now I had merged everything from the layers below into this new layer. Photoshop CS2 and CS3 automatically create a new layer when you select Option (Alt)-Merge Visible. If you were doing this in Photoshop CS or an earlier Photoshop version, you’d have to first use Layer > New Layer to create the new layer above the Overall Hue/Sat Tweak layer, and then, while that new layer was active, choose Option (Alt)-Merge Visible.

• I now used the Clone Stamp tool to clean up the edge along the horizon on that new layer. I typed S to get the Clone Stamp tool, set the Opacity and Flow to 100%, and picked a 5-pixel brush with 80% hardness. To remove the white line along the horizon, I Option (Alt)-clicked in the sky directly above where I wanted to remove the white, then just clicked (without the Option (Alt) key) over the white area I wanted to remove. Again, I was using only the edge of the brush.

When you get a feel for this, you move along the line until all of the white edge is removed (Figure 11). If you go too far or mess up, use the History palette to go back a few steps. If you have areas with a black line toward the bottom, Option (Alt)-click in the foreground area just below that, and copy from there over the black line. This takes awhile but is sure to work. You can speed up this type of process by clicking in one spot with Clone Stamp and then Shift-clicking a little further along the horizon line. This creates a straight movement between those two spots. Only do this in small segments so it’s not obvious.

• When the horizon was finished, I used File > Save As to save this as ShipRock- LayersTemp. Next, I brought up the Channels palette and Command (Control)-clicked the Alpha 1 channel I made earlier. Since I inverted this earlier, the selection I saw was a selection of everything except the area along the horizon. I pressed the Delete key (Backspace on the PC, or choose Edit > Clear), to delete the majority of this Merged layer. The part that remained fixed the horizon. Finally I chose Command (Control)-D to delete the selection.

This type of solution allows you to later make small tweaks in the adjustment layers below this horizon-fixing Merged layer without (hopefully) having to redo this tedious layer.


In this article I have provided some tips on how to expose several images that you plan to combine later in Photoshop. You’ve seen how I created my Ship Rock image using a main mask to divide the two versions of the image and separate adjustment layers to custom tweak each part of the image. You learned how to set up an indented adjustment layer that inherits the layer mask from the layer below it so this adjustment layer will only adjust that previous layer and not the layers below. I’ve also outlined a technique to clean up the edges and transitions on even the most difficult mask. Finally, I’ve shown you how to line up two shots of the same scene even if they are from hand-held digital captures or from film scans. You can use these techniques any time you are compositing bracketed photos or any two images together.

About the Author

Barry Haynes
Barry Haynes is a photographer and author living in Gibsons, BC, Canada, just north of Vancouver, where he has his studio and photography gallery. See for info about his Outdoor Photography, Photoshop/Printmaking workshops,Photoshop books, images and gallery. His Photoshop Artistry: for Photographers using Photoshop CS2 and Beyond, from New Riders publishing, is the 8th edition of this series. See also