Raw vs. jpg             10/08
Canon 5D, 17-40mm f/4, 1/400s at f/8:   jpg     blown whites  
Tough exposure: mouse over tags to see blown whites (in red).
 
For the unfamiliar, raw is a generic term for unprocessed image data straight from the camera. The formats are proprietary, with extensions like CR2 for Canon or NEF for Nikon. With raw, all the image information of the original capture is retained, including especially lights and darks not visible while looking at a minimally-processed image rendered from the file.
Jpg, in contrast, is a standardized format. A jpg image is created from the raw data in-camera—based on automatic or user-set white balance, sharpness, color saturation, etc. The settings are “baked in”, the file is compressed, and the raw data discarded. Jpgs save a good deal of disk space and processing time. My Canon 5D, for example, gets about 240 raw files, but over 600 jpgs, on a 4GB card. And jpgs are ubiquitous. Digital images generally—especially on the web—are jpgs.
Raw files are a sort of digital negative. The “hidden” information can be revealed or enhanced via digital darkroom “recipes” in software like Adobe Lightroom, Apple Aperture or the camera manufacturer’s convertor. Raw is particularly useful to recover from a bad exposure, or to better deal with high contrast light. A couple of examples illustrate, with images plucked from Lightroom 2 screen captures.
The food image aboard the kayak mothership Home Shore was photographed in raw plus jpg, a tough (and incorrect) exposure with large areas of blown whites in the jpg. In the first image, if you run the mouse over the “blown whites” tab of the jpg, you’ll reveal red areas that indicate the blown highlights. This loss is mostly unrecoverable from the jpg file.
Developed (optimized) in Lightroom:     From jpg    From raw  
Whites in sauce are blown out in jpg; recovered in raw.
 
The second image was shot in a sea cave, exposed for sunlight, leaving the dark areas of the cave to fall to black. Again shooting raw plus jpg, the original jpg file has huge black areas. Processing both raw and jpg, I found it useful to fully push up the luminosity sliders of the reds (ie making the reds selectively brighter), very helpful for the raw file because there was red in the dark areas of the kayak. In the jpg, these red areas had mostly been baked to black. Looking at the 100% detail by mousing over the tabs, there's enough information rescued from the raw for me to have a usable image; in the jpg, the kayak and kayaker are difficult to discern, with huge areas lost to black.
Inside a sea cave, exposed for sunlit outside.  jpg     jpg blacks  
High contrast. Kayaker and kayak barely visible.
Mouse over jpg blacks tag to see lost blacks (in blue)
Canon 5D, 17-40mm f/4 at f/5.6, 1/640s, iso200
 
Post-process, 100% pixel crop:     From jpg     From raw   Full image:  From raw  
raw has many recoverable areas; note especially the dark reds
jpg lacks information in the blacks; almost nothing to recover, and increased contrast.
 
Thanks to Home Shore kayak guide Benson Isley for posing for the first image.
Gary
Also see FAQ for on-the-water advice.