Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

Behind the scenes

Tone Mapping HDR images in Paint by Zaweba

The six tone mapping methods in Paint by Zaweba, from Reinhard to STRESS, and how to choose one for an HDR merge or a high contrast photo.

Tone Mapping HDR images in Paint by Zaweba

High dynamic range pictures hold far more brightness than a screen or a print can show. A bracketed sunset merged into one 32-bit image might have a sun thousands of times brighter than the shadows under a tree. Tone mapping is the step that squeezes that range into something you can display while keeping detail at both ends.

Paint by Zaweba puts its tone mapping under Image > Adjustments > Tone Mapping, and it works at 32-bit as well as on ordinary images. Rather than one method with a lot of sliders, it gives you six different methods, each with its own character.

The six methods

Reinhard global applies the same curve to every pixel based on its brightness. It is the calmest of the methods: it compresses highlights gracefully, never creates halos, and gives a natural, photographic look. The trade-off is that local contrast in very bright or very dark areas can look flat.

Reinhard local adjusts that curve for each area according to the brightness around it. Shadows in one corner and highlights in another can both keep their detail. It is a good middle ground when global looks too flat.

Gradient domain works on the changes in brightness rather than brightness itself. It shrinks large gradients, such as the jump from a dark room to a bright window, while keeping the small ones that carry texture. The result can show a lot of detail everywhere, which suits architecture and interiors.

Contrast domain is related, but works on contrast across several scales, trying to keep the perceived contrast of the scene. It tends to look more natural than gradient domain on landscapes.

Multi-scale Retinex comes from models of how the eye adapts to light. It separates illumination from surface detail at several scales and evens out the illumination. It is strong at rescuing deep shadows and can also correct uneven lighting in ordinary photos.

STRESS estimates the local range of brightness around each pixel by sampling its neighbourhood, then stretches each pixel within that range. It gives a bold, detailed result and is worth trying when the others look too gentle.

Choosing between them

Start with Reinhard global. If the picture looks right, stop there, because the simplest method is the least likely to create artefacts. If shadows or highlights look muddy, try Reinhard local or Contrast domain. Use Gradient domain or STRESS when you want to show every bit of detail, accepting a more illustrative look. Reach for Retinex when the main problem is lighting that is too uneven.

Look for halos along strong edges such as rooflines against a bright sky, and for skies that turn grey. Those are the usual signs that a local method has gone too far.

Where the 32-bit image comes from

The obvious source is Merge to HDR under File > Automate, which combines bracketed exposures with ghost removal and can save .hdr or .exr files. You can also work on a 32-bit document you have built yourself. Tone mapping then turns that into a picture ready to finish at a lower bit depth.

Tone mapping is not only for true HDR. A single photo with harsh contrast, like a backlit portrait or a room with a window, can benefit from Retinex or Reinhard local, used gently, to open up the shadows.

Finishing after tone mapping

Tone mapping is rarely the last step. Afterwards you will usually want to set final contrast with Curves or Levels, adjust saturation, which some methods leave a little muted, and sharpen for the output size. Clarity is useful too, though go lightly after one of the more detailed methods or the picture will look over-processed.

Paint by Zaweba keeps all of this on your own computer with no online services, so large HDR files never have to be uploaded anywhere. Work on a duplicate, compare a couple of methods side by side, and keep the one that looks like the scene felt rather than the one with the most detail.