Blending exposures in GIMP and G’MIC

posted in: GIMP, Tutorial | 2

Professional landscape photographer Ian Hex (website, Flickr) has an excellent video on Youtube showing how to blend two landscape photos to produce an HDR image:

It’s well worth a watch if you’re interested if you’re interested in that sort of thing, but to say you having to re-watch it step-by-step, I have written out the steps that Ian goes through to produce the final image, along with a few of my own comments:

  1. Open your two photos as layers in GIMP. Move the underexposed photo (good sky, dark landscape) on top of the overexposed photo (exposed for darker foreground). Make sure they are aligned; if not, you may have to shift one image by a couple of pixels to get a better alignment.
  2. Duplicate the overexposed photo layer (creating a third layer), select this new layer, and apply “Colors>Desaturate” and desaturate by luminosity.
  3. Apply a bilateral blur to this desaturated layer via G’MIC: “Filters>G’MIC” and in the pop-up select “Repair>Smooth [Bilateral]”. Zoom in to the edge between the light and dark exposures in the preview window and then bump the value variance up until just before that edge starts to blur.
  4. Click and drag this desaturated+smoothed layer over to the Channels tab and drop it into the empty pane below the text that says “Lock”. Click on the eye to make it invisible.
  5. Go back to the layers tab and select the upper (underexposed) photo of the sky. Right click and select “Add Layer Mask”. In the pop-up window choose the “Channel” option and select the desaturated+blurred channel that you just created.
  6. You should now see the initial results of the blended images (make sure that the desaturated+blurred layer is also invisible – click on the eye next to it).
  7. Zoom into the edge where the two photos meet (the sky to land transition) and inspect it). You may see slightly jagged edges where the blending has not been perfect. To get rid of this, select the mask (make sure you click on the mask to avoid applying this to the whole layer) and go to “Filters>Blur>Gaussian Blur”. Select a radius of 1-2 pixels and hit apply. You may have to Undo this step and reapply to find the optimal setting for your image. If you need a really high radius to get rid if the edges, your images may be misaligned (see step 1) or too dissimilar (use a tripod and take exposures within a few seconds of each other).
  8. If the foreground is darker in the blended result, you will need to darken the upper layers mask in those areas (remember that black areas in the mask are 100% transparent, and become more opaque as they get lighter). To do this, make sure that the mask is still selected and select the lasso tool (make sure that you are using the “Add to current selection” option). Roughly select whole foreground area, making sure to stay away from the sky.
  9. With the foreground selected, go to “Select>Feather selection” and pick a value. Ian suggests using the longest dimension of the picture in pixels divided by 6, but this is somewhat arbitrary. More on this in step 11.
  10. Select the bucket fill tool (i.e. the paint bucket) and make sure that it is set to black (i.e. a black square should be over a white one), and that “FG color fill” is selected in the tool’s options. Then press Cntrl+comma simultaneously to fill in the mask.
  11. You may have to undo steps 9 and 10 and play around with the feathering radius to get a version that works for your image.

Now go and make great pictures!


Want to read more tutorials like this? You can get new tutorials from FreeThatPhoto.com delivered straight to your inbox:

2 Responses

  1. Dick Lapierre

    Thanks for the elaborate tutorial, very informative. Why would you go through the effort of applying a bilateral blur to a large area and then black it all out? How about doing your feathered selection first, apply the black, and not bother to blur? You don’t need it because there’s so little detail, but you could quickly do such a small area with the hand tool. Also, why did you pick 2048/6 for feathering? You mumbled as you did so and I couldn’t hear any reason. Thanks again.

    • freethatphoto

      Hi Dick

      First things first, the video is not by me, but by a photographer called Ian Hex.

      To answer your other points:
      1) The blacking out is not the final image – just masks (and layers).
      2) You could do a feathered selection, but this method is much quicker, especially if the boundary between light and dark is more complex.
      3) I don’t believe Ian had a particular reason for 2048/6, except that it seemed to work!

      Let me know if you have any other questions.

Leave a Reply