Fixing incorrect exposure in RAW vs JPG files:
One of the amazing abilities of a raw file
is just how much extra information is hiding in the shadows (and to a lesser extent, the highlights) of the photo, enabling you to recover a photo that you accidentally over or under exposed. Let's work from the below set of seven different raw photos (I saved jpg versions also), ranging from -3 stops underexposed (below left) through correct exposure (below middle) and +3 stops overexposed (below right).
Fixing underexposed images:
Let's see how well we can save the underexposed images (the left ones above) in post-production, by lifting the exposure. Below we can see the raw file that was originally underexposed by 3 stops (below left) compared to how well we've managed to recover it in post-production by increasing its exposure by 3 stops (below right):
Amazing! In this case, we're able to recover an image that was underexposed by a whopping 3 stops (though I'd usually say you're only safe to recover from -2 underexposed - it does depend on the scene). As we can see below, the 'recovered' raw image (below right) has a little extra noise in it than the one that was taken correctly (below left), but this noise too can be reduced in post-production to some extent.
Now for jpg - lets see how well we can recover a -3 stops underexposed jpg file (below left) by adding +3 exposure in Lightroom (result below right). Nothing like as recoverable.
Fixing overexposed images:
Overexposed images are also recoverable, although not to the same extent as underexposed ones, perhaps to somewhere between +1 and +2 overexposed. This is basically because once a certain threshold brightness in the scene is saved as 'white' (ie fully maxed-out in terms of brightness) in the image (be it raw or jpg), anything that should be brighter than this in the scene can still only be saved as 'white', and so we say that anything brighter than that threshold becomes 'clipped' – it's all saved as the same thing - 'white'. So, even if we try and darken the photo later on in post-production, there is no way to separate out the areas that have become 'clipped', and you're left with patches with no detail. You can see this below, where we have the raw photo that was shot +3 overexposed (below left) and our 'attempted recovery' of it (below right) where I've dropped the exposure by 3 stops in post-production. No good. Later you can see a fairly successful recovery of a +2 overexposed raw file though.
Recovering overexposed jpg files is even harder. In my examples, +3 overexposed jpg was entirely useless, so instead let's compare an attempted recovery of a +2 overexposed jpg (below left), beside a fairly successful recovery of a +2 overexposed raw file (below right). Not only are the effects of 'clipping' visible in the jpg, but the colours are also terrible, due to the lack of tonal range saved by jpg files. The raw file though, is almost usable.
This is why it's generally safer to underexpose rather than overexpose your photos, especially if there's a lot of brightness range you'd like to try and recover later.