Many photographers prefer to work with RAW files – but what are they, how do you work with them, and why are they so much better than regular in-camera JPEGs?
What RAW files are
Digital cameras capture images in a series of stages:
- Sensors use a color filter array (CFA) to capture analog red, green or blue light values at each photo site. This creates a kind of color ‘mosaic’ that still needs to be turned into regular color data.
- Next, the camera’s A/D converter (analog/digital converter) turns these analog values into digital data. The A/D converter will also handle ISO amplification and noise reduction (this is why ISO is not something you can adjust later in RAW software).
Now you have a RAW file. It’s digital data rather than analog light values, but it’s still in a ‘mosaic’ of red, green and blue pixels and has yet to be ‘demosaiced’. This is what’s saved by the camera for you to process later if you choose the RAW setting.
There are two different ways to process this RAW data into an image. You can either let the camera do it to produce a regular JPEG image, or you can process the RAW file on a computer. The processing steps are the same, whichever you choose.
- The data is ‘demosaiced’ to produce full color data for each pixels. Cameras and raw processing applications have their own proprietary demosaicing processes.
- The white balance setting and any in-camera picture styles are applied, any spare data is discarded and a processed JPEG image is produced.
The difference is that the camera will process the RAW data according to the camera settings and any picture style you’ve chosen, whereas with RAW software you can start from scratch and process the RAW data how you like – and as many times as you like.
RAW file types
Every camera produces its own proprietary RAW format, and sometimes you have to wait a couple of weeks for software to be updated to support a new camera – important cameras often get RAW support very quickly.
Each brand has its own characteristic RAW filename extensions. Nikon cameras, for example, produce .NEF files, Fujifilm cameras produce .RAF files and Sony cameras product .ARW files.
A few cameras use Adobe’s generic DNG (Digital NeGative) format, though this has not really caught on much outside the Adobe software ecosystem.
RAW bit depth and compression settings
RAW files have a higher bit-depth than regular JPEGs, which is where a lot of their additional quality comes from. JPEGs are 8-bit images (8 bits of data are used to describe the red, green and blue color components for each pixel), but cameras typically capture 14-bit RAW files. Some capture 12-bit RAW files instead, while more advanced medium format cameras may capture 16-bit RAW files.
The exact bit depth is not crucial – the key thing is that shooting RAW is the only way to get a 16-bit TIFF file, which is the best quality for editing and offers the least degradation even with heavy manipulation.
More and more programs today can ‘edit’ RAW files directly, such as Lightroom and Capture One, though this is ‘non-destructive’ editing which doesn’t change the original file – and you still have to ‘export’ a processed JPEG or TIFF to produce a shareable image.
RAW files can also be ‘compressed’ or ‘uncompressed’. In fact, you typically have three choices:
- Uncompressed RAW: these files are the largest but may be quicker to edit
- Lossless compressed RAW: the name says it all – the file sizes are smaller but there’s no quality loss.
- Compressed RAW: or ‘lossy compressed’, if you like. These are the smallest RAW files but there may (or may not) be some detectable difference in quality.
|Typical RAW settings options|
|Lossless compressed||Lossless compressed|
Many cameras will offer a choice of both bit depth and compression settings – but even 12-bit compressed RAW files offer such a leap in potential quality compared to JPEGs, that you may decide smaller RAW files are well worth any theoretical effect on quality.
RAW files and picture styles
Many cameras come with a selection of picture styles or creative effects, specially designed for portraits, for example, or black and white photography. Fujifilm includes classic film simulations with its cameras to replicate the look of Velvia film, for example.
All of these styles and effect are created by processing the RAW image data in-camera, but it’s important to be aware of the different outcomes with JPEG and RAW files.
- If you use the JPEG setting, the picture style will be ‘baked into’ the image. The image you get is exactly what you would expect.
- If you choose the RAW setting, the camera may still show the image with the effect applied, but in fact it has stored the full RAW data and is merely previewing the effect you chose.
If you process the RAW file in the camera maker’s own software, it will apply that picture style for you – but if you use third-party software, it will ignore the picture style chosen on the camera and default to its own generic profile.
This is why you can shoot in what you think is black and white, but then your RAW software opens up the image in color.