Plugin for darktable - available to test

I have created a plug-in for darktable that provides easy access to HDRMerge capabilities right from the lighttable view. I did all my testing in Windows 10, but in theory it should be cross-platform compatible. Let me know if you run in to issues on Linux or MacOS though.

The plugin supports:
Single or Batch Mode
Ability to control all HDRMerge options (except masks):
Bits [16, 24, 32]
Preview Size [Half, Full, None]
Gap [1 - 60 seconds]

If not running in batch mode it will auto-import the newly generated DNG and apply the additional options upon import:
Copy Tag [copies tags from first file in the selection]
Additional tags [these are added regardless of your selection on “Copy Tags”]

All of these controls (aside from the two batch operators) can have their default values set via the “settings > lua options” dialog box. This way the module can load up with your most used settings by default.

I hope others find this useful! With the high FPS of cameras these days the vast majority of my bracketed shots are handheld, so the alignment provided by HDRMerge is very handy compared to dt’s built in HDR tool.




Once it’s tested you should open a PR to have it added to darktable’s Lua script repo. :slight_smile:

Test it on Linux. I have HDRMerge installed manually in user folder. It works fine from command line. Pointed out DT to this binary in lua options for HDRMerge but still getting error “HDRMerge is not found”

Thanks for trying it out. I will take a look and see if I can figure out what’s going on. I’ll post here when there is an update.

I just ran it on linux, letting the plugin find hdrmerge and selecting hdrmerge using the lua options and it ran fine both times.

Benja1972, did you select the folder where the executable was located, or the executable itself? Using the lua options, you need to select the executable.

Hope this helps,


1 Like

Thank you reply. I will try one more time. It seems that i have selected executable itself. I will check and report

It was executable itself. So it doesn’t work for me

Ok, I’ll merge in some lines to help us debug the issue. I’m wondering if it has to do with the location it is installed at on your PC. I’ll let you know when the code is updated.

Pardon my ignorance and lack of experience but when I go to GH all i see are a .lua and a .md file, i don’t see any windows executable. So what’s the basic procedure, i download these two files and then what, do I open DT and point it to them? many thanks in advance

Right, the .lua file is the one you care about. Here are the directions for installing plugins to darktable:

If that does not answer your question, then let me know and I can provide you even more detailed instructions.

Improvements of the reader are always welcome. Just send a pull request and I’ll merge it.

1 Like

All, I have made some changes based feedback that this was not working well on Linux. I believe it should now work, but would appreciate it if someone could verify.

Similarly, I did run in to some issues on one of my windows machines and these changes resolved that issue. So if you tried it before and had trouble, please try again.


Thank you Kevin! It works now. I have only two question:

  1. When I select two files RAW and DNG previously created, HDRMerge starts and never finish. Just progress bar stopped in the middle. Probably DNG files are not supported, but error message was not returned to DT.
  2. What is purpose of batch mode? What is gap in batch mode? Could you describe typical scenario when it can be applied?
    Thanks for your work

Glad it works now!

Just to make sure I understand your failure mode:

  1. Select RAW1 and RAW2, then run HDRMerge to create DNG_MERGED1
  2. Select RAW1 and RAW2 and DNG_MERGED1, then attempt to run HDRMerge again and it fails? (this failure causes the plugin status bar to hang and does not return as a failure)

Confirm I am understanding correctly and then I’ll make an issue for it on the GitHub page.

Regarding Batch mode:
You can select many, many sets of bracket exposures. HDRMerge will automatically group them based on their timestamps. Any pictures where there is a separation in time of at least the specified “gap” amount will be grouped into a new grouping. So,
Sequence1 [taken at 12:00:00]
twenty seconds later
Sequence2 [taken at 12:00:20]
You could select all images from sequence 1 and 2 at the same time, and HDRMerge would automatically split them as two separate sequences as long as “gap” is set to less than 20 seconds.

Take a look at the bottom of the page on HDRMerge’s user manual.

Hope that helps.

Do note that when running in batch mode the plugin does NOT auto-import the results like it does in single mode. You’ll need to go through dt’s normal import process to bring those in.

1 Like

Also, thanks for testing it out and reporting back, I appreciate it!

If any MacOS users can test it out that would be much appreciated. More work may be needed to get that working, I am not sure.

Thank you Kevin for explanation! Nice feature in batch mode. Good to know.

About failure, it is like that in fact:

  1. Select RAW1 and RAW2, then run HDRMerge to create DNG_MERGED1
  2. Select RAW and only DNG_MERGED1, then attempt to run HDRMerge again and it fails – and yes, “this failure causes the plugin status bar to hang and does not return as a failure”

More precisely for second step I selected one RAW and one DNG randomly, both was already in my folder, and run HDRMerge just for fool test to know if it it is possible to merge two arbitrary selected files.

Ahh, ok. I’ll do some testing around that to fix the error handling.

I do know it is possible to merge two shots of very different scenes, I did it and you get funky results. Probably it was not happy that there were two different file types. The documentation for HDRMerge does stipulate that the source images need to be taken with the same camera (so its probably expecting identical file type and pixel dimensions)

Have downloaded the plugin, however I’m unsure about what I need to add to the ~/.config/darktable/luarc file?


go to your lua directory (.config/darktable/lua) and make a downloads directory. Put the script in there and then edit the luarc file and add

require “downloads/hdrmerge”

1 Like