You may be photographing in raw rather than jpeg because you know that raw files contain more information and because they are unprocessed, giving you more flexibility. But how do they contain more information? Among other things, digital photography raw files are captured at a higher bit depth — depending on the camera, 12, 14 or 16 bit, compared to 8 bit for jpegs. Whether 12, 14 or 16, these higher bit-depth files potentially contain much more information than 8 bit files.
So what is bit depth?
For each pixel in your image, the tonal value or brightness of the scene you are photographing is stored in the image file on your memory card, along with the color. Computer files store information in zeros and ones. Bit depth refers to how many digits the tonal information for each pixel is stored in. Imagine if your camera used a bit-depth of one: you would have one digit to store how dark each piece of the scene was, the only possible values would be 0 and 1, and the only two tones that could be represented are black and white:
This image of course has very little detail, since it contains no shades of gray.
If the file had a bit depth of two, there would be two digits, and the four values of 00, 01, 10, and 11 would be possible, so the image could have black, dark gray, light gray, and white:
Notice that we have gained some detail, but that the image is still very choppy. In the histogram for this image, below, we see huge gaps between the tones, confirming the choppiness or posterization. (The histogram is a graph of the tones in an image, going from pure black on the left side to pure white on the right side.)
Let’s jump to a file with a bit depth of 5, which allows 2 to the 5th, or 32 possible values from 00000 to 11111:
We gain alot of detail, but there is still obvious posterization in the sky (click on the image to see it larger). The histogram supports this:
Now let’s jump to 8, which allows 2 to the 8th, or 256 values, and is what a jpeg supports:
This image shows the full detail of the scene with no visible posterization, even when viewed at full size, and the histogram looks much better. (If you see any posterization, it is not real, but rather just the result of my blog save process.) So why not stop here, with 8 bits and 256 tones?
The problem is that as soon as you start enhancing your image, you start compressing and expanding the tonal range. This creates choppiness in the histogram and potentially, visible posterization in your image. To show this, I took this 8 bit image into Photoshop, and added contrast and darkened it:
Notice how this pulled apart the histogram:
The more heavy-handed your adjustments, the more and wider gaps you will end up with in your histogram, and the greater possibility that you will see posterization in your image. 256 tones is often not enough for the fine detail in the image to hold together.
12 bit files have over 4,000 tones, and 14 bit files have over 16,000. This is vastly better, and with almost any work you could do to an image, it would hold together. Here is the histogram from the 12 bit version of the above image, with the darkening and increased contrast:
To have this additional “editing headroom”, you have to capture a high bit-depth image, i.e. a raw file, and you have to enhance it as a high-bit depth file. It does no good to convert a raw file into 8 bit as you move into Photoshop to work it. While you are working in Lightroom or Camera Raw, your work on your raw file is in 16 bit (standardized to accomodate 12, 14 and 16). When you move a file from Lightroom or ACR to Photoshop, you need to ensure that the Photoshop file stays in 16 bit. In Lightroom, go to Edit or Lightroom>Preferences>External Editing, and set your PSD or TIFF preference to 16 bit. In ACR, click on the workflow options at the bottom of the screen and do the same.
Higher bit depth files also potentially have a much larger number of colors: an 8-bit jpeg can represent around 16 million colors, whereas a high bit-depth file can represent over 28 billion. Perhaps we could make do with 16 million, but if your photography is important to you, why not start out and work with the best quality image possible?
The downside to higher bit-depth is larger image files — all else equal, a 16 bit image file is twice as big as an 8 bit image file. But large memory cards and hard drives are so much cheaper these days than they used to be.