Raw or JPEG?
JPEG images are composed of pixels that consist of three primary colors: red, green, and blue (RGB). Each primary channel is represented by one byte or 8 binary bits. With 8 bits, or a bit depth of 8, we can count from
00000000 to 11111111
or from 0 to 255 for a total of 256 possible shades for each primary color. Advanced cameras can also save Raw files that contain sensor data. Raw files typically have a bit depth of 12–14 bits. For example, with 12 bits we can count from
000000000000 to 111111111111
or from 0 to 4095 for a total of 4096 possible shades for each primary color. For normal images 256 shades is sufficient. For IR photography the extra resolution provided by 4096 shades is a definite advantage. The following illustration compares JPEG and Raw infrared images.
- The first JPEG image taken with Auto white balance. It has a strong red cast and this is understandable since infrared lies just beyond red in the visible spectrum.
- Before this image was taken the camera was white balanced on the green grass. The red cast is gone and the grass, trees, and sky are represented by different colors.
- The previous image was processed in Photoshop to enhance the colors. Red and blue channels were swapped and adjustments made to improve image brightness, contrast, and saturation.
- The same scene but based on a Raw file. Red and blue channels were swapped and adjustments made to improve image brightness, contrast, and saturation.
- A 100% crop of the sky from the Raw image.
- A 100% crop of the sky from the JPEG image.
Comparing images #5 and #6 we see that the JPEG image is breaking up while the Raw image has smooth gradations. Image #1, with a strong red cast, illustrates the problem. We want to tease apart the limited tonal values so that the patch in the sky is blue, the grass is white, and the trees are tan. While this can be done with JPEG's 256 shades for each primary color, it can be done much better with Raw's 4096 shades.