Why shoot in RAW, and not JPEG?

Should you set your camera to record RAW digital images or JPEG images?

The short answer is, that the the RAW file is like the negative in the old film days. As long as you have the negative you can develop your image in different ways to make a photograph that has all the characteristics that you want.

Continuing the film-days theme, a JPEG file is like a half developed print. Someone has begun the processing, and then said “Take it or leave it”. You can accept the development they’ve done, or do more, but you cannot undo what they have done. The changes made to the file before you got it are ‘baked in’.

If you want control over your final image, and the opportunity to start all over again if you want, shoot and save RAW camera files.

Now to the longer answer!

A RAW image file contains all the information your camera’s sensor ‘saw’ when you pressed the shutter. RAW files contain a lot of data. In his book, The Digital Negative, Jeff Schewe describes it as the ‘cookie dough’.

A JPEG file is a ‘compressed’ file that is engineered to decrease file size by eliminating ‘redundant’ data. But that isn’t all. JPEG files that are created by software in the camera, are not only compressed, but they have certain image characteristics ‘baked in’ (as Jeff Schewe says) reflecting the preferences of the engineers who created the software. Decisions that you might want to have made, have been made for you. Once those changes have been made and ‘baked-in’ you can’t unbake them because data has been discarded.

One of the aspects of the ‘baking’ that is done when a RAW file is converted to JPEG is to change the tonal distribution in the file. A RAW file has what is called a ‘linear gamma’. Basically what that means is that if you double the number of photons hitting the sensor you will double the output of the sensor. Change the light level, and the sensor output changes proportionately. In a JPEG file, a different ‘gamma’ is encoded — usually to make an image file that has more obvious contrast but also in recognition that human vision does not respond to tonal changes linearly. In itself, that change doesn’t sound like a bad thing, but part of the process is to compress the highlight areas of the image where RAW file manipulation can potentially extract a lot of image detail. Early conversion to JPEG eliminates that possibility.

Yet another issue that arises is related to the accuracy of the data that is recorded.

Digital camera sensors record image data in “12-bit” data files.  What that means is that every pixel can record 4096 discrete tones between black and white.  Subtle shades of colour can be recorded.

But JPEG files are “8-bit” files.  In an 8-bit data file each pixel can record only 256 discrete tones between black and white .  The distinction between different tones is more ‘chunky’. This has bad effects if you are trying to edit parts of a photograph where there are subtle tonal gradients, but even worse implications for shadow detail.

A digital camera records about 8 stops of light. That means, from the maximum light level recordable at a sensor pixel you can halve the light level 8 times before you reach a level too low to be recorded.

stops and levels 12 bit

A typical digital camera records light on a 12-bit sensor which can record 4096 different levels. You can see from the picture that the three darkest stops are recordable on a total of 64+32+16=112 signal levels. (If the picture’s too small, click on it).

stops and levels 8 bit

But an 8-bit system has, effectively, only 256 switches to capture all 8 stops of light. In that system, only 1+2+4=7 signal levels are available to record the final 3 stops of light.

In other words, an image file that has been converted to an 8-bit JPEG file is incapable of discriminating light levels in the darkest regions.

The same is true for the brightest levels. A RAW file can discriminate 2048 different levels of light in the brightest half of the tonal distribution. An 8-bit JPEG can discriminate only 128 levels there.

The effect of these limitations is most keenly felt when you are using a program like Photoshop to make subtle tonal shifts. Fewer available levels means ‘step’ shifts that can result in posterisation’ in images (like obvious boundaries of colour or tone in subtle skies, for example.)

The more data you have to adjust and print with, the better.

Recording in RAW is best.

JPEG files made ‘in camera’ constrain your options.

The final straw for JPEG files is their propensity to destroy image quality. This is because JPEG is a compressed file format. It was invented to save data space when computer storage was expensive. Roughly speaking, JPEG files save space by abandoning ‘redundant’ information when the file is saved. Even if you are saving at ‘100%’ quality, if you have changed the image since it was last saved. the save process will identify and discard ‘redundant’ information. This process eventually loses so much information that image quality noticeably deteriorates. And, of course, you can never get back to square one.

Further reading

The material on this is page is adapted, with permission, from the FAQs on ‘From Camera to Print’  which contains good background material for digital photographers.

This discussion thread: 16 Bit RAW vs 8 bit SRGB JPEG – A detailed Comparison shows convincingly the advantages of shooting in RAW rather than JPEG in real photography.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s