If you are just starting out in photography — or if you have used been shooting JPEG exclusively — and wondered just what shooting in RAW means, here’s a primer on it.
Understanding RAW File Format
When you take a picture in JPEG file format with your digital camera, a couple of things happen before the image is even saved to memory card:
- The image sensor gathers the information from its photosites, converts it from analog to digital, and holds it for further processing. At this stage, the image data captured can be thought of as being “unprocessed” — or, RAW data.
- If you have specified white balance, sharpening, contrast, saturation, filter effects, etc., these are applied to the RAW data.
- If you have specified image quality and size, these are also applied to the RAW data.
- The resulting image is a JPEG image, processed (“in-camera process”), and compressed, which is then written to your memory card.
After you have transferred the image from your memory card to your PC, you may decide to further process it (“post-processing”) in an image editing software, such as Photoshop. Most photographers will usually adjust levels and sharpen the image a bit.
Theoretically speaking, RAW file format is the uncompressed, unprocessed data file captured by the camera’s image sensor, before any in-camera processing has been applied.
In practice, however, depending on the camera manufacturer, some minimal in-camera processing and compression may/will have been applied to the RAW data.
If you are familiar with film photography, an image saved in the RAW file format can be thought of as the digital equivalent of the exposed (but as yet unprocessed) film negative.
In fact, the camera will ignore your white balance, sharpening, contrast and saturation settings. Instead of applying them to the RAW data, it will save those settings in a separate header associated with the RAW data.
The fascination with RAW is that it seems to magically give you the ability to “correct your exposure mistakes” after the fact. Is your picture under-exposed? You can usually adjust exposure by as much as -5 to +5 stops (or more). Is the light artificial? Play with white balance until you get the right color balance. How is that possible?
Remember that when you save an image in RAW, your image settings are ignored as far as applying them to the image, and are instead saved in a header.
When you open the RAW data in your image editing software (with the appropriate RAW plug-in installed, since every manufacturer encodes RAW a little differently), that header is read and used to display an image of the RAW data in JPEG.
Notice that we say, display — the actual RAW data is never affected.
You may now manually adjust the settings and see the effect on the RAW data — seemingly giving you the ability to magically “correct your mistakes.” When you are happy with the adjustments, you would then save a copy of the processed image as JPEG (again with the original RAW data file unaffected).
RAW is therefore a powerful option that most advanced digital cameras make available to photographers who do not want the camera to apply any in-camera processing to the captured RAW data — preferring to do that themselves in post-processing.
You always want your picture to be correctly exposed, whether you are using RAW or not. You cannot take a grossly underexposed or overexposed picture in RAW and expect to always be able to “correct your mistakes.”
To explain how RAW allows you to correct mistakes, we need to get a bit technical: While JPEG captures 8 bits of colour per pixel or 256 shades of colour per pixel (16.7 million colours), RAW captures 12 bits of colour per pixel, translating to 4096 shades of colour per pixel (68.7 billion colours).
This great amount of information (extra pixel depth going from RAW to JPEG) is what allows the exposure to be corrected up or down by a number of stops.
Applying this exposure compensation and adjusting the other settings to your RAW data in post-processing may be enough to salvage an otherwise ruined image (as far as exposure and white balance are concerned).
Here is a picture that is underexposed and taken with the wrong white balance. If I had shot this in JPEG only, I may be able to coax back the exposure and color temperature to what they should be, though I will probably lose some image quality in the process. Fortunately, I shot it in RAW+JPEG and can now use the RAW data to correct the underexposure and select an appropriate color temperature that will bring out the real colors.[I shot this on a FUJIFILM X-Pro1 and used RAW CONVERTER EX to process the RAW file.]
As you can see, the picture above is about -2EV underexposed and Auto White Balance gives a warm tint. In the RAW converter software, I simply adjusted exposure to give a +2EV bias and played with the Color Temperature setting until I found one that faithfully reproduced the original colors (in this case, 3000K).
Depending on your RAW converter software, there may be many more adjustments you could bring to your picture.
When To Use RAW
To maintain good relations, we are told never to discuss politics or religion. For photographers, add the debate concerning “JPEG vs RAW.” Don’t get caught in that debate, or allow yourself to be intimidated by either camp.
If you have no intention in post-processing, there is no point in shooting RAW.
If you are a beginner/enthusiast photographer and are still learning about exposure, composition and the many other techniques that will make you a better photographer, you may choose to concentrate on mastering these techniques first and postpone shooting in RAW to a later date.
Shooting RAW gives you the most flexibility to adjust your photos in post-processing. It also allows you to “rescue” a photo if you used the wrong in-camera settings.
RAW + JPEG
Many photographers are finding that they do want the control that RAW gives them and but find the post-processing tedious. Especially when only one picture out of a dozen or so might require any further exposure adjustments.
To address this issue, digital cameras that offer RAW file format also offers a RAW+JPEG option. You get the advantage of the camera having already done the processing for you in-camera (using the exposure settings you selected) and saving a JPEG image in addition to the RAW file. If you correctly selected the exposure settings, you can simply use the JPEG images; if you made some mistakes or want to further adjust an image using the latitude that RAW offers, you have the RAW file to use. You get the best of both worlds.
Remember that it may take ever so slightly longer to write both the RAW file and JPEG image to memory card. You will also require extra storage to save the JPEG file and the RAW file (which is usually very large).
Shooting Important Events
Here is a more dramatic example of how shooting in RAW can allow you to rescue a photo.
I shot the first picture in RAW+JPEG and it is grossly underexposed, so much that the JPEG version appears almost completely black. If I had shot only in JPEG, I am toast:
But since I shot in RAW+JPEG, I simply post-processed the RAW data file, adjusted the exposure (in this case, by +5 EV) and presto, it’s like magic:
So, if you are shooting an important event, switch to RAW+JPEG (and also don’t forget to also use a high-capacity memory card, for RAW will take much more space to save).
So, should you use JPEG or RAW?
For many of us, shooting in JPEG is more than adequate, even when we may want to do some post-processing (e.g. sharpening) to the JPEG image.
For ultimate control over white balance, saturation, contrast and sharpening, and/or if you know ahead of time that you intend to play with the exposure settings, RAW file format (or, RAW + JPEG) is the ultimate answer. For many professional photographers who cannot afford wrongly exposed shots, there is no substitute to shooting RAW.
For a more technical (and practical) explanation of RAW, including a typical workflow, consult The Art of RAW Conversion.
An interesting essay on Nuts & Bolts JPEGS vs. RAW.[Editor’s note: Thanks to Steve Smith, Stevens Noyes, Mark Wickens and Rick Sidwell for their constructive feedback, which I have incorporated into this article.]