It seems as if more contradictory information about RAW vs. JPEG camera file formats exists than with any other digital photography topic. The arguments for shooting in RAW format versus JPEG seem to be never ending at times, with everyone having their own opinion as to which format is better. The truth is that, although RAW files are undoubtedly superior in image quality, both formats have their place.
Learn how to decide the RAW vs. JPEG debate here.
What is RAW?
A RAW file format is essentially the uncompressed, unprocessed data file captured by your digital camera's image sensor, with minimal in-camera processing applied. It is the digital equivalent of an exposed but unprocessed film negative.
When you take a digital photograph, the imaging chip inside your camera (known as a CCD or CMOS chip) simply records the amount of light that has hit each pixel (hence why more information can be captured with a greater number of megapixels). Your camera records either 12 or 14 bits of data at this stage, depending on the model. If you shot your image in RAW mode, and later converted it into a TIFF or .PSD file, then you can export it in 16-bit mode. This allows the 12 or 14 bits recorded by the camera to be spread across the whole 16-bit workspace. A JPEG, in comparison, is converted by the camera's software to 8-bit mode.
Pro photographers tend to utilize RAW as an option to ensure the camera does not perform any in-camera processing to their images, as they prefer to do that themselves in post production.
Saving a RAW File
When you save a RAW file, you'll see that your image has metadata attached to it. This is essentially a file that contains all of the camera settings, such as sharpening level, color temperature, and white balance. Your camera creates a header file for this information, which the camera tags onto the RAW image data. At no point do these settings change your image. The camera then saves this entire combined file onto your memory card. Some cameras compress these files and others don't, but any compression is very minor, thereby preserving image quality.
The image editing software reads -- but does not change -- the RAW file's metadata, then displays the image. At this point, you can manually adjust the settings using your software to see the effect on the RAW data.
Saving a JPEG File
When you save a JPEG file, all the information that a RAW file would keep separately in a header file is saved as part of the JPEG file (and is therefore unchangeable).
The camera applies the JPEG settings automatically, and, in some cases, its settings are limited. For instance, cameras usually only have between one and three sharpening settings, such as "unsharp masking," where the camera finds the edges between light and dark areas and enhances the contrast. With limited sharpening abilities, high levels of sharpening can produce visible halos around these edges. Consequently, if the levels are set too low then the sharpening may prove insufficient.
You also have to remember that, by itself, no sensor can record color. Most imaging chips use what is called a Bayer Matrix or a Color Filter Array in order to record color. In layman's terms, this means that red, green, and blue filters are placed over each pixel and, through a very complex algorithm, comparisons between the values recorded by each pixel and its neighbors derive the color information.
The problems arise as, when saving a JPEG, the camera converts the file from a higher data quality (12- or 14-bit mode) to a lower one (8-bit mode). Eight-bit mode only allows the camera to capture 256 shades of color per pixel (compared to RAW's ability to capture 4,096 shades). Suddenly, a huge amount of potential color information is lost. On top of this, the JPEG file format applies compression to images, so as to create smaller file sizes, but which inevitably means discarding some data. If compression can be set to a low level (such as 2:1), very little data will be lost. At higher compression levels, though, the data loss will be immediately obvious.
So Why Would You Ever Shoot JPEG?
JPEG's primary advantage is that the compression creates smaller files, which means you can save more of them onto a memory card. Transmitting these small files online is easier, too, which is important for many amateur photographers. You also need a huge buffering zone in the camera to shoot RAW files continuously and quickly, whereas JPEG allows you to fire your camera rapidly. Most importantly for amateurs, you don't have to post-process all your files with JPEG. (Believe me, processing RAW files can take a long time.)
In addition, many of the generic conversion programs bundled with camera software only offer a limited number of settings for adjustments. Professional editing software doesn't come cheap. The two main processing programs are Capture One and Adobe Bridge (which is contained within Photoshop, Compare Prices). Even the most basic of these costs around $70.
RAW Vs. JPEG: Final Word
RAW files not only capture more data in the first place, they also allow conversions on a more sophisticated platform. By then saving the converted files as TIFFs, full image quality is preserved. With a JPEG file, you are committing yourself at the time of exposure to several of the most important aspects of image quality (such as white balance, overall contrast, and color saturation). Because of this, it's important to keep these aspects within a limited range, or the deterioration of image quality will be easily visible.
If you're looking for the best possible image quality, then, obviously, shooting RAW is the answer. For many situations, though, shooting JPEG is perfectly adequate. Are you going to see any loss of quality with JPEG if you're just shooting snapshots for the family album? Not really, and, in fact, you'd need to start printing at at least A4 sizes before you'd notice even the slightest deterioration from JPEG.
In the RAW vs. JPEG debate, both formats have their place.