I’ve discussed how to use the darktable shadows and highlights module on this blog before.
However, as I mentioned then, it can suffer from edge effects. Because the module looks at a region surrounding each pixel, you can get “halos” in regions that have a high contrast transition from light to dark.
I struggled with this problem recently while editing a photo that I took on New Year’s Eve of Admiralty Arch in London. The sun was behind the Arch, so I ended up with a bright, backlit sky, and a dark, shadowy building.
The shadows and highlights module did a good job of recovering both parts of the picture, but I was left with a pretty nasty halo:
I left the module on, but turned down the highlight recovery, and switched to the contrast brightness saturation module. There I knocked down the brightness to recover the sky.
Unfortunately, this module affects the whole image, not just the sky. To selectively apply the module, we ned to go down to the “blend” option and choose “drawn and parametric mask”. I drew a box around the sky, and find tuned the selection parametrically with the “L” (luminosity) slider.
This created a very sharp selection at the edge of the sky. The mask is shown in yellow in this image:
The result is:
This principle is essentially the same as that used to blend multiple exposures in GIMP.
This is the final photo: