Thom's Quick & Dirty Guide to RAW


99% of what you need to know in 1% of the space.

Original: 10/16/2007 with minor edits

  • Raw files aren't processed by the camera. The image processor (EXPEED, Digic, etc.) isn't involved in interpreting the data. The data in a raw file is essentially a digital count of the analog value of light received by each sensor location. But...
    • Raw files contain embedded JPEG images (some older Nikons used TIFFs). That embedded JPEG image is used for the preview image on the camera's LCD and for histogram calculation. That latter point is important: if you're using histograms to judge exposure, then the camera setting values should closely mimic both the actual conditions (white balance) and your eventual post processing choices (sharpening, etc.). If you use mismatching settings, the histograms will lie to you, which can cause you problems when converting, especially if you accidentally blow out a channel.
    • Some cameras have a bit of processing done in the ADC and data acquisition circuitry. The original Nikon D1 made pixel changes due to white balance, and most current Nikons apply a median filter to data coming off the sensor with long exposures (the D3 and D300 are exceptions). This makes these cameras less useful for some types of work, such as astronomical photography.
  • Raw files do not store color. A photosite (individual unit in the sensor) collects light photons and converts them into electrons. The number of electrons that get collected this way are an analog value (as in "I've converted 62,138 photons into electrons"). This analog value is made into a digital value by an ADC. However, that value is simply a count of electrons. The "color" comes about because each individual photosite has one of three different color filters over it. But...
    • Different cameras use different Bayer filtration. Nikon's choices for Bayer dyes and Canon's appear to be different, which is just one reason why the same converter algorithm can produce different color from raw files from two different makers.
    • Different converters use different demosaicing. A raw converter has to invent two of the colors at every light collection location, and the technique used to do so varies from converter to converter.
  • The biggest advantage of raw files is a larger bit storage. JPEGs by definition are only 8-bit in size. Even though most cameras now internally use a larger bit size during creation of those images (most modern Nikons have used 12 bits, the D3 and D300 use 16 bits internally), what you end up with is still an 8-bit value for each pixel. With raw you end up with 12 or 14 bit values (usually stored in the upper bits of a 16 bit value). But...
    • 8 bits is not enough. If you make any post processing change with an 8-bit file, you're going to have to carefully watch your shadow area, as you'll likely having multiple stops of exposure being handled by only two or three of bits worth of data. That leads to muddy shadows, noise, and posterization of tonal ramps. Even the simple act of sharpening such a file can lead to posterization.
    • 12 bits is still not necessarily enough. The difference in tonal values for each channel is 256 for 8-bit, 4096 for 12-bit. That still may mean that you have multiple stops of information in only a handful of bits. For example, the bottom two stops of your exposure are probably recorded using only 6 bits (64 possible values). A 14-bit raw file would give you 16,384 possible values per pixel, and those bottom two stops may now have 256 or perhaps 512 possible values.
    • Nikon's Compressed NEF compromises highlight bits slightly. Nikon claims that the old Compressed NEF format (the D3 and D300 now support another, lossless, form of compression) is visually lossless. Basically, they play off the ability of our eye's inability to resolve small differences in bright areas by throwing away some information. If you can't distinguish between a value of 14,230 and 14,238, why store values of 14,231 through 14,237? In practice, this works without penalty unless you make large changes to highlight data. Where I see small, resolvable differences is in something like a wedding dress detail after large amounts of post processing and sharpening are applied. But in general, you can shoot Compressed NEF without worry.
    • Thus: the more bits the raw file has, the better. You can make more subtle processing changes with 14 bits than you can with 12 bits.
  • Camera settings are stored in EXIF data in the raw file, not in the image data. A raw file is really just an extended form of TIFF (Tagged Image File Format). Essentially, the raw file consists of a series of pointers and data storage components. Each pointer leads to a different data storage container (file info, image data, EXIF data, etc.). But...
    • Not every raw converter understands and/or uses every piece of data. The classic case is camera settings, such as sharpening, tone, and white balance. Some converters apply these by default (e.g. Capture NX applies all Nikon camera body settings by default), some apply only some of these (e.g. Adobe Photoshop uses the camera's white balance setting to get the overall color balance), and some don't even apply any camera setting. It's important to know what your converter does.
    • Even if a converter understands a setting it may interpret it differently. I find Adobe's interpretation of Nikon's white balance information still enough different that I usually end up having to correct it in ACR or Lightroom.
  • There's no need to shoot RAW+JPEG. Two points: If you're shooting a Nikon you've already got a JPEG file embedded in the raw file, all you need is the extraction software to get it; and most good software allows you to quickly batch out JPEGs from your raw files. Someone using Aperture, Lightroom, or Photoshop in their workflow really shouldn't worry about having a JPEG copy of the photo around. But...
    • They're handy for client preview. It's always nice to be able to hand a client preview or for-position-only images immediately after the shoot.
    • They do give you a target. If you're new to raw file conversion, seeing a JPEG that was shot with the correct camera settings gives you a baseline to look at for your conversion.
  • All raw converters are not equal. Until the recent update to ACR, I never really liked the Adobe conversion for Nikon raw files (though I did like it for my Canon raw files; go figure, most of the Adobe team shoots Canon ;~). The latest version is much better, but still not as good as Capture NX is, in my opinion. Bibble has a different look than both those two, which some prefer. As do CaptureOne and DxO. But...
    • Converters are a moving target. In the six years I've been seriously shooting digital, I've gone through five iterations of Capture, four iterations of ACR, and multiple iterations of every other converter. The good news is that each generation seems to do a better job, even with the files I shot years ago. The bad news is that "the best converter" isn't a stationary value. See my converter comparison article for more of the current state.
    • Converters are doing more than conversion. The craze in the past year or so has been to add noise reduction algorithms to raw converters. A setting of 0 for noise reduction doesn't always mean that no noise reduction is being applied! Likewise, many converters now allow you to "correct" for chromatic aberration, linear distortion, and vignetting. Just remember that you move away from your original data values with most of these tools, and are really then manipulating the conversion. Few are doing the correction during the demosaic, meaning that this is nothing more than just another post processing trick. See my comment about bits, above. Tools that apply after the demosaic to bit-limited data (e.g. in the shadows) have a way of making for visible artifacts.
  • Raw files do not have a Color Space. You need to set one on your camera, but Color Spaces are arbitrary and smaller-than-what-is-captured definitions of the available colors with which to paint pixels. Your digital camera only captures light as it is, which has no restrictions. (True, the Bayer dyes may impart some small device-specific differences, but in practice these are miniscule compared to the Color Space definitions we tend to use.) Lightroom and Aperture made the wise choice to ignore the camera set Color Space and use much larger Color Spaces in which to do their calculations (e.g. ProPhoto RGB). Using a larger Color Space helps with all those rounding and posterization and data errors that happen when you make post processing choices. But...
    • Color Spaces have to be set for your output device. If your output is for the Web or many print labs, you eventually have to convert your image to sRGB, the lowest common denominator Color Space.
    • Color Spaces and color management are one of the most misunderstood aspects of digital imaging. It's easy to set things wrong. It's easy to put images into the wrong Color Space. It's easy to have device differences that aren't controlled by ICC profiles (essentially deviation charts from the Color Space definition). Don't blame your raw files for not having the right color. Remember, they don't store color and are neutral in all this. And your camera is better at capturing color than sRGB and AdobeRGB can render. Thus, color issues you see in your output mean you did something wrong at some point in the chain from conversion to output.
  • Fujifilm S3 and S5 Pro shooters using extended D-RANGE should consider overexposing their RAFs. The SuperCCD SR used in those cameras has two light detection mechanisms, and modest overexposure is easily recovered in the latest Adobe products. Basically you can't overexpose more than one channel by two stops or one channel by more than three. Experiment to find what you're comfortable with. If you only use the Fujifilm converter, you're much more restricted, as it only allows you to pull back one stop worth of exposure.

Thom's Quick Recommendations (all your really need to know):

  1. Shoot RAW whenever possible. It's the best possible data your camera can capture. Converting raw images is relatively painless these days.
  2. Don't worry about compression. NEF compression can make a visible difference in extreme cases, but in practice most people can't see it.
  3. Set your camera correctly for the conditions. The preview image and histograms are calculated based upon the embedded JPEG, which uses camera settings. If you value the information those provide, set the camera right!
  4. Use the biggest Color Space. Lightroom has it correct: if quality is your goal, use ProPhoto RGB with your raw files. Even AdobeRGB is smaller than what your camera captured. Yes, this means you have to convert down to a smaller Color Space for most output. It's still worth it.
  5. Stay in 16-bit during post-processing. All the converters pack their 12-bit or 14-bit data into a 16-bit value if it's passed to Photoshop or another program (and you can usually save as 16-bit TIFF). Only reduce to 8-bit after all processing is done. The only thing you should do in 8-bit is add an output-specific sharpening.
  6. Try multiple converters. Most have a free demo you can try. Different workflows work well for different people. Find the one you like, not the one I recommend.
  7. Own multiple converters. I often use Lightroom for quick conversions due to the ease with which that can be done and the ability to batch process very fast. But for troublesome images or ones that I'm trying to tweak to their best, I use Capture NX, simply because I believe I can get better final results out of it.
  8. Keep up with the state of the art. Converters change every year. Capture, ACR, Bibble, and the others have gotten better with each iteration. Thus, if ultimate quality is your goal, you need to resample converters every year or two.
 

bythom.com | Nikon | Gadgets | Writing | imho | Travel | Privacy statement | contact Thom at thom_hogan@msn.com


All material on www.bythom.com is Copyright 2007 Thom Hogan. All rights reserved.
Unauthorized use of writing or photos published on this site is illegal, not to mention a bit of an ethical lapse. Please respect my rights.