When you go through camera menu options, you might come across a number of different options that are related to the way your Raw images are saved. One of those options is typically the type of compression that is applied to Raw files. There are several reasons why camera manufacturers provide Raw file compression options, but the most basic one is to save space. Let’s take a look at file compression options and explore differences between compressed, uncompressed and lossless compressed Raw files in more detail.
Table of Contents
Why Compress Raw Files?
So why is there a need for Raw file compression? Isn’t compression for JPEG files only? Well, any file has a chance of having duplicates of information, and it does not matter if it is a JPEG or a Raw file in terms of compression potential. That’s why it is beneficial to have the option to compress Raw images in every camera, as there is direct potential in reduction of file sizes. And depending on whether you want to preserve all data (lossless), or parts of it (lossy), those space savings could be very significant. Below are the main reasons why manufacturers provide options for Raw compression:
- To Save Space – this is the main reason, as the primary benefit of any type of compression is, first and foremost, space savings. Since compression allows Raw images to be smaller in size, more images can fit into the same memory card. Keep in mind that reduction in space affects the whole photography workflow, because you will end up with smaller files on your computer and your photo storage, which in turn, also makes your backup workflow more efficient.
- To Write and Transfer Files Faster – when Raw images are physically smaller due to compression, your camera can write them faster to memory cards. In addition, the amount of time it takes to transfer those same images to your computer or your storage is also cut, sometimes significantly.
- To Increase Continuous Shooting Time – when files are smaller, they also take up less space in your camera’s buffer, which can potentially increase the length of time you can shoot continuously. However, this is not always the case. For example, on older cameras with slower processors, applying Raw compression actually slowed down the camera’s continuous shooting speed, because Raw compression is a processor-intensive task.
- To Reduce Resolution – some cameras have options to reduce the actual resolution of Raw images either through sensor cropping, or through image resizing / down-sampling (which is known as “Small Raw” or simple “sRAW”). While the former is not related to Raw compression, the latter is done with Raw compression in mind. In fact, as detailed in our sRAW Format Explained article, such compression levels can be rather extreme, resulting in significant losses of valuable data.
Compressed vs Lossless Compressed vs Uncompressed
Let’s take a look at a number of different Raw file compression options in detail. Depending on your camera’s make and model, you might have different options, but these are the most common choices available:
- Lossy Compressed means that some of the data in the Raw image is thrown away to make compression very efficient. With lossy compression, you might lose some valuable data that will limit your post-processing capabilities. For example, Sony cameras by default apply lossy compression to Raw images, which can result in artifacts appearing around objects, as seen below:
Unless you don’t mind losing some of the data in your images, it is often best to avoid lossy compression. - Lossless Compressed means that a Raw file is compressed like an ZIP archive file without any loss of data. Once a losslessly compressed image is processed by post-processing software, the data is first decompressed, and you work with the data as if there had never been any compression at all. Lossless compression is the ideal choice, because all the data is fully preserved and yet the image takes up much less space.
- Uncompressed – an uncompressed Raw file contains all the data, but without any sort of compression algorithm applied to it. Unless you do not have the Lossless Compressed option, you should always avoid selecting the Uncompressed option, as it results in huge image sizes.
On every camera I shoot with, I always default to Lossless Compression, because it is the most efficient way to store Raw images. There is no benefit of shooting Uncompressed Raw and Lossy Compression results in loss of potentially valuable data, which I might need to recover shadow / highlight details in images.
12-bit vs 14-bit vs 16-bit Raw
Along with different compression levels, Raw images have the potential to store varying levels of tones per channel, per pixel, which is known as “bit depth”. By default, most cameras shoot in 14-bit Raw, which translates to 16,384 tones per channel (red, green and blue) per pixel. If you do the math (16,384^3), this equals roughly 4.39 trillion tones per pixel. Older cameras sometimes shoot in 12-bit Raw.
Only a few cameras shoot in 16-bit Raw such as the Fujifilm GFX100 medium format camera. With this format, you would be pushing over 281 trillion tones per pixel. That’s a heck of a lot of data to work with – you can only imagine how big those Raw images would get without any compression!
Raw Compression: File Size Comparisons
Talking about file size, let’s take a look at a common Raw image shot with the Nikon D810 and see how big files get relative to bit depth and file compression options. Below is a table showing differences in file sizes:
Compression Level | File Size (12-bit) | Decrease in %1 | File Size (14-bit) | Difference in %1 |
---|---|---|---|---|
1Decrease in % is based on the Uncompressed 14-bit Raw file (76.982 MB) | ||||
Compressed | 30.066 MB | 60.9% | 37.055 MB | 51.9% |
Lossless Compressed | 32.820 MB | 57.4% | 41.829 MB | 45.7% |
Uncompressed | 58.795 MB | 23.6% | 76.982 MB | 0% |
As you can see, there can be a pretty dramatic difference in file sizes when choosing between 12-bit and 14-bit, as well as different compression levels. And these differences add up quickly when you take tens of thousands of images into consideration. With a 60.9% decrease in file size when shooting 12-bit compressed Raw, one might think that it is a good option to pick. However, it all depends on your shooting technique, what you shoot and how much information you typically recover from highlights and shadows when post-processing images.
For example, if I consistently exposed well when shooting portraits and my post-processing was very minimal, I would probably be just fine shooting 12-bit compressed Raw. However, if I wanted to maximize my highlight and shadow recovery options when doing landscapes or astrophotography, I would feel safer shooting 14-bit lossless compressed, since it would let me take a full advantage of my camera sensor and still produce files that are practically half in size. That extra 15% of file size reduction isn’t worth it in this case, especially if it limits any of my recovery options in post-processing. Keep this in mind when considering bit depth and different Raw compression levels!
Also, it is important to point out that some cameras don’t even give you the option to choose between different bit-depths and compression levels, typically defaulting to either 12-bit lossy compressed Raw (on most beginner-level cameras) or 14-bit losslessly compressed Raw (on more advanced camera models).
Let’s now go over some of the options when going through different camera brands.
Nikon Raw File Options
If you shoot a Nikon DSLR, bit depth and Raw compression options will vary depending on camera model. On most entry-level and enthusiast-level cameras, you will only have the option to choose between 12-bit and 14-bit depth with no Raw compression options. This means that these cameras always default to lossy compression. On high-end cameras, Nikon typically provides three options for Raw compression: Compressed, Lossless Compressed and Uncompressed, as seen below:
Nikon Z cameras have the option of 12-bit and 14-bit Raw, along with the three compression options as well.
Canon Raw File Options: Raw vs cRaw
Canon’s Raw file menus are a bit different. On Canon’s more recent cameras, you will find a menu that looks something like this:
Here, you cannot select the bit depth: all Raws are 14-bits. However, there are two options for the Raw format: Raw and cRaw format. The Raw format is what you’d expect: a 14-bit lossless compressed Raw file. The cRaw file is Canon’s latest lossly compression format that replaces some older formats like sRaw, and it results in a 25%-50% reduction in file size. Unlike some older compression algorithms, the cRaw format is a very good lossy compression format, and in the majority of real-world use cases, the cRaw format works very well.
Still, you may notice a slight amount of detail loss in extreme shadows, so for landscape photographers it is still better to shoot in Raw format, which will at the very least be more psychologically peaceful.
Fuji Raw File Options
While the first generation Fuji X-series cameras were limited to 12-bit, all modern X-trans cameras shoot in 14-bit by default. Fuji does not allow changing bit depth through the camera menu, but a lossless compressed option is provided on some camera models:
Sony Raw File Options
Unfortunately, many older Sony digital cameras are limited to lossy 11 + 7 bit delta compression by default. After many customer complaints, Sony added an option for Uncompressed Raw on some of its cameras such as the Sony A7R II, but that obviously results in huge Raw files, as explained above.
On the latest Sony cameras such as the Sony a7 IV and later, there is an option for lossless compressed Raw.
Conclusion
Even if you decide to shoot Raw, and you should, there are still a few different options for them. For most cameras, 14-bit lossless compressed Raw is an ideal option, but for some who don’t push their files to the edge, lossy compressed Raw is still much better than JPEG.