Lightroom has been my go-to RAW processing software for many years. It’s simple, fast, and fairly powerful. The automatic adjustments usually got me most of the way to matching the camera’s JPG output, and from there I could use the sliders for highlights, whites, blacks, and shadows to fine tune the image for the look I wanted. Unfortunately Lightroom does not cooperate with Linux, so when I switched my computer’s operating system I needed something new. Before Lightroom I used digiKam, but the RAW processing options were very limited and it was more suited for photo management. I decided to try Darktable, one of the most popular FOSS RAW processors.
It didn’t work out very well. All my images came out much darker than the camera JPGs, and no amount of fiddling with Darktable’s ‘basic adjustments’ would fix them. So my RAW files sat unprocessed for months, until I dove back in for round two of learning how to use Darktable.
My first mistake, apparently, was trying to use the ‘basic adjustments’ module. Darktable has a very specific pipeline for taking RAW file data and producing a final image, but the options in ‘basic adjustments’ go against that order. It’s instead recommended to use the ‘base curve’ module along with a few other general modules.
This led to the next thing that made Darktable so intimidating, the number of modules. Not only does almost every different kind of adjustment have its own module, there are many adjustments that belong to multiple modules. For instance ‘basic adjustments’, ‘color balance’, and ‘contrast brightness saturation’ all have contrast settings, as well as there being ‘local contrast’, ‘color contrast’, and ‘contrast equalizer’ modules. With at least six different contrast controls, how do you decide which to use?
Luckily, once I understood the ‘base curve’ module, I realized that it was fairly powerful and would get me most of the way to a fully processed image. It essentially gives a mapping from the input brightness to the output brightness. A linear relationship makes the image look flat, while an s-curve gives the image more contrast and character. The curve can be easily adjusted by dragging the control points or creating new ones, and the scale of the axes could be changed for finer control over the darker tones.
There are presets for curves that approximate how various cameras internally process the sensor data to produce a JPG, which offer a good starting point. For example, I would start with the ‘nikon like’ preset, then tweak it until I’m happy with how it looks.
When it comes to modifying the curve, keeping it ‘smooth’ is important (in terms of being visually smooth, not infinitely differentiable), as well as avoiding flat sections. If part of the curve is flat, different sensor brightnesses will be mapped to the same image brightness, and there will be no contrast between the two.
The right image above has a flat section in its base curve, which loses contrast in the trees. The rest of the image is unaffected. This is also visible in the histogram (top right of each image), where the darks have been compressed in the right image and no longer continue to the edge of the histogram.
Once I was comfortable using the base curve, I returned to an image I had used the basic adjustments on and redid it:
The left image only uses the basic adjustments, while the left uses the base curve module. Everything looks less washed out in the new version, and the clouds look less smeared. There are many other modules to use, but for now I’ll keep it simple. As time goes on I’ll get better with the modules I’m using, branch out to other modules, and develop my own ‘style’ for processing images. This has already been a great lesson in how RAW processing is actually done, particularly inside a camera to output a JPG. To end, here are some before/after comparisons of the camera JPGs and the processed RAW files.