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:
- Compressed – by default, “compressed” means that some of the data in the RAW image is thrown away, so we can also label it as “Lossy Compressed”. Depending on how lossy compression is performed by the camera, you might be losing 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 – as the name implies, lossless compression means that a RAW file is compressed like an archive file without any loss of data. Once a losslessly compressed image is processed by post-processing software, the data is first decompressed, similar to what happens to archived data contained in a ZIP file. 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 12-bit RAW, which translates to 4,096 tones per channel (red, green and blue) per pixel. If you do the math (4096 x 4096 x 4096), this equals roughly 68.72 billion tones per pixel. When bit-depth is increased to 14-bit, the number of tones per channel quadruples to 16,384, totaling 4.39 trillion colors per pixel. And although most digital cameras today don’t even have an option for 16-bit RAW files, if it became available, 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:
Canon RAW File Options
Unfortunately, Canon does not provide options in its camera menu to pick between different bit depths or RAW file compression levels, so you will need to refer to the camera manual to find out what bit depth and compression level your camera shoots in. Most of Canon’s entry-level cameras shoot in 12-bit lossless compressed RAW, whereas most of the higher-end models will shoot in 14-bit lossless compressed RAW.
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, all current 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. To date, Sony has not added an option for Lossless Compressed RAW images on any of its cameras.