Digital Camera File Formats: Raw and Jpeg

June 04, 2009 | | Comments 3

If you are seeking the ultimate in image quality then your photograph’s long journey from the camera to a polished gallery print must begin with the right starting point. Beginning with the best starting point means shooting with a high-quality digital camera and top-quality lenses. It means paying attention to concepts like aperture, shutter speed, and exposure when you are out in the field shooting. The “best possible starting point” also means capturing your original image using your camera’s most powerful file format.

Most modern digital SLR cameras can record new images either as unprocessed
raw files
or as processed jpeg images. Raw files from a Canon brand camera use the .cr2 file extension. Raw files from a Nikon brand camera are tagged with the .nef extension. Olympus digital cameras save their raw data in the .oly format.

The list of camera specific file extensions goes on and on because each different manufacturer has their own style of raw sensor data. All jpeg images, on the other hand, use the common .jpg extension. Unlike the camera specific formats jpeg is a universal standard.

The differences between the two formats is far more significant than just the .xxx extension. Jpeg images are not the unaltered sensor data. The jpeg file format cannot store the kind of high-bit unprocessed information that a modern digital camera creates. All jpeg images have undergone some in-camera processing and some level of color compression. Simply put modern digital cameras create far more photographic information than the jpeg file format can handle.

jpeg vs. raw diagram

In camera treatment of a jpeg vs. a raw file diagram.


Bit depth is a technical term used to measure the diversity of information that a digital file can contain. For photographer’s, bit depth is a mathematical measure of the range of colors, or tones, that an image can display. Color digital images are made from a mix of red, green, and blue light. Mixing red and green light together produces yellow light. Combining red and blue light creates magenta light. In a digital image all of the colors in the rainbow are created through some combination of a red value, a green value, and a blue value.

8-bit vs. 16-bit Color

Illustration of the difference in color variation between an 8-bit and a 16-bit digital image.

When the imaging experts of the 1980s established the rules for the jpeg file format they restricted this format’s bit-depth to just 8-bits of color information per RGB channel. This 8-bits of information per color channel restriction means that a jpeg image can contain a maximum of 16.7 million colors. 16.7 million colors sounds like a lot of color diversity until you compare it to the 4 trillion colors that a 16-bit file can contain! The larger bit-depth allows us to utilize a much wider range of colors. This expanded range of color is the primary reason why raw files are always the superior starting point for serious digital photographers.

Not only will the higher bit depth make raw files more colorful it also makes them more flexible in post-processing. Converting a color image into a black and white is a perfect example of a post-processing scenario where we will need that extra flexibility. When a full-color digital image is converted into a black and white photograph it goes from having three color channels down to using just one. When an 8-bit color image is converted into a black and white it can display only 256 shades of gray. The whole tonal range is reduced to just 256 levels of brightness.

8-bit vs. 16-bit black and white

Illustration of the difference in tonal variation between an 8-bit and a 16-bit black and white digital image.

Working with a 16-bit black and white digital image, on the other hand, gives us 65,536 shades of gray. There is a huge visual difference here. Creating realistic shadows in a black and white digital image require thousands of shades of gray. A jpeg file simply cannot contain enough information for good looking post-capture black and white conversion. To create great black and white digital images we need that wider range of tones, and the expanded flexibility, that only a raw file can provide.

Post-Processing Required

There is a catch to this advice. Working with digital camera raw files requires sophisticated image processing software. The math that the image processing software must execute is really complicated and performing these calculations requires good computer hardware. If your goal is to create top-quality photographs then you will eventually need to master powerful image enhancement software like Adobe Photoshop Lightroom and you will need to invest in a powerful computer.

If superior image quality is your ultimate goal then these investments are totally worth it. There is a learning curve and it takes time to build up your image processing skills. But once you master the technology, once the tools make sense, then the whole digital photography process becomes more fun, and more rewarding, if you start with a well-exposed and well-composed raw file.


Filed Under: (12) Digital Capture AdviceAdobe Photoshop Lightroom Tutorials


About the Author: David Marx teaches digital photography workshops and Adobe Photoshop Lightroom training classes. David is an Adobe Certified Expert in Photoshop Lightroom and in Adobe Photoshop. David has lead workshops and seminars for the Rocky Mountain School of Photography, the American Society of Media Photographers, FirstLight Photography Workshops, and he teaches annually at the world-famous Blackberry Farm Resort. For more information on his Photoshop Lightroom training seminars and digital photography field workshops please visit You can also follow daily updates and see new images from David on Google+.