How to Make a High Dynamic Range (HDR) Photo in GIMP

The human eye is a wonderful device that is capable of showing us the world in stunning detail and precision, so when you first start out in the world of photography, camera sensors can seem a bit limited by comparison. 

Fortunately, our giant human brains have come up with an interesting solution to this problem. By combining multiple different photos together, it’s possible to expand the dynamic range of your image to more closely match what the human eye sees using a process known as high dynamic range (HDR) photography. 

HDR photos combine multiple images with different exposure settings into a single image, allowing you to see details in bright and dark areas that would normally be over-exposed or under-exposed. 

Here’s how you can use GIMP to make HDR photos! 

Exposure Bracketing With Your Camera

To create an HDR image, you need at least two images of the same scene with different exposure values, but most people prefer to use a minimum of three images for better tone representation. 

Using two images allows you to set one exposure for bright areas and one for dark areas, while using three images allows you to expose one image for shadow areas, one for mid-tone areas, and another for highlight areas. 

Some cameras can automatically create up to nine different exposures in sequence by holding down the shutter button in bracketing mode, but this is a bit extreme and unnecessary for most casual photographers. 

Every camera is a little bit different, so check your camera’s documentation for how to use the bracketing feature or use your camera’s manual settings to adjust your exposure settings to create your bracketed images. 

Be sure to use a tripod when shooting bracketed images, or they may not align properly during the HDR merge process! 

Making HDR Images with a GIMP Script

The best way to make a high-dynamic range photo in GIMP is to let the computer do all the hard work. This kind of computational problem is exactly the sort of project that computers excel at – that’s why we call them computers, after all. 

GIMP doesn’t have a built-in system for creating HDR photos, but you can add the feature using a free script. It takes a bit of time and effort to download and install, and it’s getting a bit out of date by modern HDR standards since it hasn’t been updated since 2009, but it’s the only automated HDR method I know of that actually runs within GIMP itself. 

If you don’t want to bother spending time on this outdated method, I recommend that you skip ahead to the “Alternative Options for HDR Photography” section below to check out some other free and open-source options for making HDR imagery

Both of the recommended apps can be used alongside GIMP as part of an HDR editing workflow, but they’re really standalone programs and not plugins, so you won’t really be making your HDR images with GIMP if you choose to use them.  

If you want/need to stick to a purely GIMP-based HDR workflow, here’s how you can download, install, and use the Exposure Blend script from a backup copy of the now-defunct GIMP Plugin Repository that’s hosted on GitHub. 

(If you want to read the short sad story of why the repository was shut down, there’s a quick note here on the official GIMP website.) 

Step 1: Copy the Exposure Blend Script

This is an unusual method of adding a GIMP script, but it works. Visit the URL for the Exposure Blend plugin here, and then copy and paste the entire contents of the file into a basic text editor. If you’re on Windows, Notepad is the best choice. 

With the Exposure Blend script open in your web browser, press Ctrl + A (use Command + A on a Mac) to select the entire script contents, and then press Ctrl + V / Command + V to paste it into a blank text file in your text editor. 

Save the file, and give it a descriptive name, but make sure you add the file extension “.scm” at the end of the file name. This will ensure that GIMP knows that the file is a GIMP script. 

For Windows users using Notepad, be sure to change the Save as type setting to All files (as shown above), or Notepad will “helpfully” add a second “.txt” file extension to the file name, and GIMP will ignore it since it appears to be a simple text file. 

Still with me? The hardest part is over, and that wasn’t so bad, was it?

Step 2: Install the Script

Next, the ExposureBlend.scm file needs to be placed in GIMP’s Scripts folder. Depending on your operating system, this can be located in several different places, but you can locate it easily using GIMP’s Preferences window. 

On a PC, open the Edit menu and click Preferences.

On a Mac, open the GIMP application menu and click Preferences

In the left pane of the Preferences window, select the Folders entry and click the small + sign in the name to expand the section. 

Scroll down and select the Scripts folder. This page will display all the locations that GIMP checks for script files. 

Select the Folder entry that has your user name in it, and then click the small file cabinet icon in the top right corner of the window to open that location in your file browser. 

Paste the ExposureBlend.scm file into the Scripts folder and then close the GIMP Preferences window. 

Step 3: Refresh GIMP Scripts

GIMP usually only checks for new scripts when it launches, but you can make it recheck the scripts folder easily.

Open the Filters menu, select the Script-Fu submenu, and click Refresh Scripts

GIMP will check all its script folders for new files and load any that it finds. 

You will probably get an error message from GIMP like the one shown below, but from what I can tell, it doesn’t seem to get in the way of actually using the script at all. 

That said, this is another good reason to explore one of the alternative options for HDR in the next section.

Step 4: Run the Exposure Blend Script

Assuming that the first three steps were completed successfully, GIMP should have a new entry in the Filters menu.

Open the Filters menu, select the new Exposure Blend submenu, and click Blend.

To select each image for compositing, click each of the None buttons and browse to select the appropriate files.

You can adjust the Dark Mask Grayscale and Bright Mask Grayscale settings to get some basic control over how the luminosity masks for each image are created, but this plugin is definitely showing its age compared to modern HDR methods. 

For the first time using the plugin, you can leave the default settings as they are, and click OK. 

GIMP will spend some time working on your images and create a composite using your three images as individual layers in a single document. 

Depending on the quality of your source images and the exposure values of each image, you may be unhappy with the results. You can try experimenting with different values in the Blend dialog window to tweak the results, but I strongly recommend that you use one of the free open-source apps listed below that have more modern approaches to HDR compositing. 

Alternative Options for HDR Photography

If you’re serious about working with HDR images, you will quickly run into the limitations of using GIMP with the method described above. 

To get the best image quality from your HDR images, you should set your camera to shoot RAW images. RAW images contain unprocessed data from the camera sensor, and this gives you unparalleled flexibility when it comes to the editing process – but GIMP can’t open RAW files natively without help from another app.

Fortunately, there are two free and open-source apps available for RAW image processing, and both of them also allow you to make HDR photos with ease. 

Darktable can be downloaded from the official developer’s website.

RawTherapee can also be downloaded from the official developer’s website

Both of these options are excellent methods for creating HDR photos, and they both offer much more advanced features and functionality than you’ll find in GIMP, such as auto-alignment for your bracketed images, custom tone-mapping, and full 32-bit color support. 

A Final Word

That covers everything you need to know to make a high-dynamic range photo in GIMP! GIMP is a great app, but after you try using it to make HDR images, you’ll probably agree with me that it’s not the best choice. 

RawTherapee and darktable are great apps, they’re both free and open source, and they give you much better options for compositing your HDR images. 

Personally, I’m not a big fan of HDR photography since most HDR photographers go overboard with the HDR effects and create something that looks completely unnatural to me, but every image editor has their own unique creative vision. 

That said, it’s also a great way to create stunning sunrise and sunset photos, as long as you’re careful about how you combine your images. 

Enjoy your newly-expanded dynamic range!

About Thomas Boldt
I’ve been working with digital images since the year 2000 or so, when I got my first digital camera. I've tried many image editing programs. GIMP is a free and powerful software, but not exactly user-friendly until you get comfortable with it, and I wanted to make the learning process easier for you here.

Leave a Reply

Your email address will not be published. Required fields are marked *