Every enthusiastic photographer knows that shooting in RAW is better than JPEG. The reason is that the RAW format can contain more information than JPEG, which means higher quality and more flexibility in the post-processing. How much more? Well, a JPEG is an 8-bit image, which means that it uses 8 bits per color channel. There are 3 color channels, which means that a JPEG can contain up to (2^8)^3 = 256*256*256 = 16777216 different colors. So a JPEG can contain about 16.8 million colors.
My Sony camera has a 14-bit sensor. That means that one photo can represent (2^14)^3 = 4.4 trillion different colors. That is way and way more than that of a JPEG. And that is why RAW is better than JPEG in terms of color representation. Note that not all 14 bits might be saved to the RAW file. My Sony camera creates lossy compressed RAW files, which means that some information of the 14-bit output of the sensor is lost again but by far not as much as in case of the JPEG format.
So far, so good. Up to now this is probably clear to most of you. But now: how to process the RAW files in Photoshop? Did you ever think of which color mode to use in Photoshop? Most of you will probably use 8 bits per color channel. But did you know that in doing so you partially undo the advantage of the RAW format? Remember that RAW contains more than 8 bits per color channel. Using the 8 bit mode in Photoshop means that you lose information. What is the effect of this on your image quality? Well continue reading to learn more about it.
Photo used as example in this tutorial, unprocessed
Let us do an experiment on the photo shown above. First we create two versions of the photo: one version in 16-bit color mode and one version in 8-bit mode. The mode can be set in the Photoshop menu via Image > Mode. See the image below for the two versions arranged above each other. There seems to be no difference in these two versions. Well... that seems... Actually, there is a difference but that cannot be seen.
Let us change the levels of these images by pressing CTRL + L (Windows) or Command + L (Mac). We set the output levels from 110 to 130 for both images. The results are shown below. What we have done now is basically squeeze all tones into a narrow output band. Normally you would maybe not make such a big adjustment, but for the sake of clarity we do so in this tutorial. Again there seems no difference between the two color modes.
Let's now undo this output squeezing by pressing CTRL + L (Windows) or Command + L (Mac) again. We now set the input levels from 110 to 130 for both images to undo the output level squeezing. And look at the results below: the 16-bits version still looks good. The 8-bits version however, shows tremendous color banding.
Removing color banding is something that is often addressed in Photoshop tutorials, but did you know that color banding can occur by working an 8-bit color mode? And that you could maybe prevent it by working in 16-bit mode?
This example is maybe extreme in the sense that normally you don't change the levels this much. However, if you work in 8-bit mode and make multiple adjustments, you might end up with a severe quality degradation. And you might even think the problem is your camera. But the problem is that by working in 8-bit color mode, you lose information captured in the RAW file that uses more than 8 bits per color channel.
In summary: try to use the 16-bit color mode of Photoshop. 16-bit is normally sufficient for current cameras, i.e. there is no use to go to the 32-bit color mode that is also available in Photoshop. The disadvantage is that files get larger when using 16-bit color mode instead of the 8-bit mode and your computer has to work harder. Also certain filters are not available in 16-bit mode. If your files exceed the maximum files size, you can save the file in 8-bit mode. But try to work as long as possible in 16-bit mode for maximum quality. You can say that 8-bit color mode is basically for editing JPEGs, but is not the best for editing RAW files.
Note: maybe in your case 8-bit mode might be sufficient. It depends on how much you edit your photos and also how you edit them. But my experience is that for my photos in combination with strong adjustments in colors and contrasts, I sometimes do see quality degradation in 8-bit mode. Below an example of a photo that I processed in 16-bit color mode. This photo doesn't show color banding.