Raw Files – Why You Should Care To Know More

By YaopeyBlog

Assuming I’m a complete beginner, how would you explain to me if I were to ask you what a Raw file is?

(You have 10 seconds...)

Blank?

That's ok because I was like that just a few hours ago.

Everyone tells us to shoot Raw and all the benefits that come with it. But do you actually know what a Raw file is, apart from the file format you download from a memory card?

Sometimes we take information for granted. But when you take a step back, you realize you actually don’t know much about it and you’re just doing what everyone else is doing.

In this post, I’m going to get down into the nitty-gritty of Raw files. At the end of this, you’ll know more than the average photographers, become more confident in exposure and know how to tease out the hidden data stored in Raw images.

What Are Raw Files?

raw files format symbol

Raw is the file format that stores all the data captured by the digital image sensor. It holds three information: mosaic image, metadata and a decoder ring. (all will be explained as we go along) It’s called Raw because the data is not manipulated in any way.

It’s a general term for a variety of proprietary file formats. This means every camera manufacturer has its own format of Raw file. For example, .CR2 for Canon, .NEF for Nikon, .ORF for Olympus and so on. Although these are all Raw files but the file extension is different and specific to each manufacturer.

Why must they be different?

Because the image sensor in each camera is different and therefore encodes data differently. We’ll go into that in a bit more detail later on.

The Big Bang

The subtitle makes me sound like a school teacher in a science class. Despite the irony, it helps to paint the mental picture.

You’re likely to have an image of the big bang in your head by now. (see how I just used my Jedi power?)

That’s more or less what happens when light hits the image sensor. But instead of a galactic rock the size of a planet, it’s photons.

What is photon?

I’m not a physicist, but in my understanding and in the simplest form, photon is an elementary particle that makes up light.

In A Nutshell

This post is not about the physics behind how a digital image is form. But I do believe knowing the magic that happens at the level of the image sensor will help you appreciate Raw editing more.

The digital image sensor consists of an array - structure that contains a group of elements. Each element is a photosensitive detector that is either a CMOS or a CCD sensor and contributes to one pixel in the image.

digital image sensor workflow

Above the array is color filters where each filter allows only a single color to pass through to the element (red, green or blue). The filters are typically arranged in Bayer pattern. Having said that, there are color filters that use different colors or arranged them in other ways.

When light hits the image sensor, it gets filtered by the color filter and captured in the photosensitive detectors which then create electric signals. The strength of the signal in each element is determined by the intensity of the light.

Imagine if you can view the image at this point, it will consist of varying luminance of red, green and blue, called a mosaic pattern image.

What Is In Raw Files?

I’ve just told you one - the mosaic image.

Plus, the metadata of the image (information about how the image is captured, i.e. shutter speed, ISO, aperture, etc.) and a decoder ring which contains information on how the color filters are arranged and what color is in each pixel. Raw converters use this to interpolate color information to create the image.

Any image adjustments (white balance, contrast, saturation, sharpening, etc.) set in your camera will only be attached as an appendage and does not affect the Raw file itself.

These image settings only applied when you shoot JPEG. Your camera will discard any data that it sees as useless and apply image adjustments for you. You’ll not be able to recover the lost data or undo adjustments that have applied.

Raw Conversion

This term really confused me when I first started because it kind of implied I need to convert my images in some way before I can view or edit them. It turns out, all I need is a software that can read Raw files and convert them into a viewable format. (I was already using Lightroom at the time)

Or, maybe it was just me!

I’m sure you know this already. You can’t simply double click a Raw file hoping it will open up in your default image viewer. You need a software that supports Raw file. Lucky for us, most image editing software today are Raw converters and Raw conversion is basically a process that runs in the background when you load your images.

What Happens During Raw Conversion?

These processes run automatically when you load Raw files in a software that supports Raw images.

1. Demosaicing

Raw converters use the information stored in Raw files to fill in the “missing data” in the mosaic image. The process involves interpolation, which means using the decoder ring and the pixels to generate what it believes is the color in the image.

2. Colorimetric Interpretation

Raw converters have to define what each color means by assigning the data to a color space, typically the CIE XYZ color space. This is because color perception is subjective depending on individual, assigning it to a defined color space helps to standardize the color in each pixel.

3. White Balance

Your image will be tagged to the white balance you’ve set in the camera to shoot your image. Usually, you can choose another while balance from a drop down menu or customize it. However, you won’t be able to do so in a JPEG.

4. Gamma Correction

This can be a complex topic depending on how much you want to know. For practical purpose, cameras see light differently compared to the human eye.

linear gamma dstribution

Source: Wikimedia Commons

We see light as non-linear (if you double the intensity of the light, you’ll see it brighter but not twice as bright) whereas cameras see light as linear (if you double the intensity of the light, the camera records it as twice the intensity). To make sure an image is displayed with the correct brightness, a tone curve needs to be applied and this is called Gamma correction.

5. Anti-aliasing, Noise Reduction and Sharpening

One of the drawbacks of interpolation is that when there isn’t enough data to interpolate, artefacts can appear on the image. This happens when very small detail is only captured by a single pixel (e.g. only red-sensing pixel or only green-sensing pixel). Raw converters avoid color artefacts by applying a combination of anti-aliasing, noise reduction and sharpening.

What Does All That Mean For You?

There isn’t any point of knowing all this if it doesn’t help you change or improve what you’re already doing.

So, what can you do better now that you know the nitty-gritty behind the creation of Raw files?

1. Room For Tonal Adjustment

Raw files contains all the information from the image sensor. Even when there is clipping in the highlights or shadows (provided not too severe), you can still recover details by shifting either end of the histogram towards the middle.

Having said that, there are some caveat:

  1. Not all clippings can be recovered. If you find the highlights/shadows remain at both ends when you have max out the adjustment slider, that means there is no data to recover.
  2. Know your camera’s usable dynamic range. Recovered shadow details are almost always outside the usable dynamic range. This means these areas will have image noise even though the histogram appears to be within the dynamic range.

Learn more: How to apply tonal adjustment with luminosity mask.

2. Less Likely To Posterize

Posterization or color banding occurs when the color depth is insufficient to accurately sample a continuous gradation of color tone (definition sourced from Wikipedia). As a result, you see abrupt changes in color (banding) instead of a smooth transition.

posterization

Similar to tones, Raw images have more room to manipulate colors without posterization. It gives you extra confidence when trying to push the limits applying color adjustments.

Learn more: A practical guide to color theory for photographers.

3. Changing White Balance Effortlessly

I’ve mentioned this briefly earlier. Any white balance you’ve selected to shoot your image will only be tagged to the Raw file without causing any permanent changes like in JPEG. This means you have the freedom to change the white balance later with a Raw converter if you wish.

To translate that into practical terms, setting a 100% accurate white balance during shooting is not as important compared to the old days. You can spend more time on other things that matters more and decide on the white balance during post-processing.

4. Absolute Control

You get the Raw image as it is directly from the image sensor. Your camera doesn’t apply any adjustments for you and it’s up to you how you want it to look eventually. Remember, the in-camera image settings are for JPEG only and doesn’t apply to Raw files.

5. Insight On Your Style

We’ve focused entirely on the image itself so far, what about the other two component of Raw files? Although we can’t do much with the decoder ring, we can extract insightful information from the metadata.

Metadata essentially means data of data. It contains information on the digital document which includes the EXIF data (EXchangeable Image File format). EXIF data has all the information on the camera settings when we shoot the image.

When you have a library of images (I’m pretty sure most of us do), checking the collective metadata can give you some insight into your shooting style. You might even surprise yourself or inspired to try something new.

Here’s a screenshot of my collective metadata since 2016 in Adobe Lightroom. It tells me I shot most of my images with my Canon 16-35mm f/2.8 lens, which is my default lens on my Canon 5D Mark II. But what’s interesting is that I use the 50mm f/1.8 the least.

raw files metadata adobe lightroom

The thing is, I have this lens as frequent as having the others in my bag. So, why didn’t I use it as much? Did I not like using prime lens? Maybe I should get out of my comfort zone and explore it more often to see what opportunity it brings me.

Final Message: Always Shoot Raw

I didn’t expect this post to be so long. I started writing it as a way to document what I’ve revised about Raw files. Then I thought why not present it in a way that could benefit the readers.

Bravo to you, you now officially know more about Raw files than the average person on the street with a digital camera!

Do you have any tips or tricks on Raw editing? Let’s share it in the comment below!


  • I haven’t shot RAW in forever – I’ve been too stuck on that JPEG life, but reading this is really making me reconsider and miss the flexibility that raw provides. Thanks for bringing me closer to the light 😉

    • Thanks! I used to shoot JPEG too until I went on an epic trip and realize it was a huge mistake…I still regret it to this day!

      It’s never too hate to shoot Raw and I’m glad you found this article helpful 🙂