Most digital cameras enable you to choose between different image formats (also called file types) to save your pictures in – RAW, JPEG and now HEIF (introduced with the EOS-1D X Mark III in 2020). What are the differences between these formats, and which should you choose?
CAMERA FEATURES
Image formats (RAW, JPEG, HEIF) and compression
RAW files
A RAW file is what the name suggests: raw, unprocessed data. It contains the image data exactly as captured on your camera sensor. Any white balance, Picture Style or other settings that you might have applied are only appended to the image file. This means they can be changed later using RAW processing software such as Canon's Digital Photo Professional (DPP) or Adobe® Photoshop® (with up-to-date Adobe Camera Raw plug-in), among others.
A RAW file is often referred to as "digital negative" because the data can be processed and printed in different ways to produce different results, just like the negative from a film camera. Also like a film negative, the RAW file never changes. When you open a RAW file in a software application, process and edit it and then save it, this creates a new file on your computer (usually your choice of a JPEG or TIFF). The original RAW file is unchanged, and can be opened again at any time and worked on to produce a completely different result.
The letters RAW do not stand for anything – it's just a convention that RAW is usually written in capital letters – and the names of RAW files from Canon cameras do not end in .RAW. Instead, until the DIGIC 8 processor was introduced with the EOS M50, Canon cameras saved RAW files in the .CR2 format. Some cameras also offered the option of smaller, lower-resolution "medium" (M-RAW) and "small" (S-RAW) files. These two types of files have most of the advantages of a RAW file but because they are lower resolution they take up less storage space.
The DIGIC 8 processor enabled a .CR3 file format, with a C-RAW option that captures the same resolution but produces 35–55% smaller files, saving storage space on your memory card. (To do this, however, C-RAW uses lossy compression – that is, it discards some image information. More about this shortly.)
The RAW files from different camera models are not exactly the same, even if they are the same file format (CR2 or CR3). For this reason, RAW processing software such as DPP is regularly updated to support new camera models, so if you have a new camera, do check for updates to DPP and download the latest version.
A number of EOS cameras give you the option of processing RAW images in-camera, which is great if you want JPEGs to share and prefer to customise settings such as white balance, brightness and noise reduction yourself rather than just using your camera's built-in JPEG settings. Processing RAW files on your computer instead of in-camera, though, gives you the advantages of a larger screen and greater processing power.
Advantages of RAW
- Maximum editing flexibility
- Wide range of settings can be modified after capture
- 14-bit file – records widest range of colours and tones
Disadvantages of RAW
- Larger file size
- Needs processing (usually on a computer)
JPEG files
JPEG stands for Joint Photographic Experts Group, the body that initially defined the JPEG standard. All JPEGs are the same universal standard format, whatever their size and quality.
If you set your camera to save your shots as JPEGs, the camera processes the image information it has captured and saves a compressed file. It can be saved at different image sizes (Large, Medium or Small) and quality settings (levels of compression) to give different file sizes – selecting Large and Fine Quality produces the best quality JPEGs, while using Small and Normal produces the smallest files, so you can fit more shots on your memory card. However, even if you choose highest quality JPEG, the camera actually discards most of the data it initially captured.
When it processes the image, the camera also applies the camera parameters, Picture Style and other settings. Once the JPEG has been saved, these settings cannot be changed – they are "baked in". You can of course open a JPEG in your image editing software and adjust colour, exposure and so on, but JPEGs are 8-bit files – that is, there is less information there than in the 10-bit, 12-bit or 14-bit files offered by EOS digital cameras – which means you have less editing headroom. More about this shortly.
This may not be a problem if you are making relatively minor edits and printing at sizes up to A4, but it might be significant if you want to make larger changes or bigger prints. Also, a JPEG file is recompressed each time it is edited and saved, meaning it can lose some data each time.
Advantages of JPEG
- Smaller file sizes – more images can be stored on a memory card
- Universal format – no special software is needed to read them
- Images are easy to view, share and print
Disadvantages of JPEG
- 8-bit – reduced colour depth and resolution
- Reduced post-processing flexibility
- Lower quality settings can result in degradation of image quality, artifacts, etc
HEIF files
HEIF stands for High Efficiency Image File Format. It's a format introduced with the EOS-1D X Mark III in 2020 and also available in the EOS R5 and EOS R6, released in the same year. The format can be used to contain data for several different types of media, including images. As in a JPEG, the effects of camera settings such as white balance and Picture Style are "baked in", but Canon HEIF files are 10-bit, meaning they contain four times more colour and tonal information than JPEGs, which are 8-bit. As well as giving you more headroom for editing, this makes HEIF images a good option for high-res images you want to view on an HDR-standard monitor, such as a 4K reference display. (More about bit-depth shortly.)
Despite containing four times the colour data, HEIF files are typically about the same size as JPEGs, because HEIF compression is 50% more effective than JPEG (hence the "high efficiency" part of their name). The compression algorithms are also more modern than those used in JPEGs, which should prevent the artifacts and colour banding common in highly-compressed JPEGs.
Advantages of HEIF
- 10-bit – more tonal and colour information than JPEG
- More post-processing and editing flexibility
- Small file sizes despite containing much more information than JPEG, and less image degradation
Disadvantages of HEIF
- No perceptible difference from good quality JPEG on most monitors
- Printer support not yet universal – photo printing kiosks, for example
Bit depth
Bit depth is literally a measure of how many bits (ones and zeroes) are allocated to store the data in a digital file. So an 8-bit file can contain up to 256 (28) levels of information for each colour channel (red, green and blue). This means that each pixel in an 8-bit JPEG can have any of up to 16.8 million (256x256x256) colours.
HEIF files are 10-bit files, which means they can contain up to 1,024 shades per colour channel, giving a potential 1.07 billion colours.
RAW files are 14-bit files, which gives them the potential for up to 16,385 tones per channel, or up to 4 trillion colours.
Clearly, higher bit depths are better because of the greater number of possible colours, which means that the file can record finer variations in tone, subtler transitions in colour and smoother gradients, but often it's not possible to discern the difference, especially when viewing images on an ordinary monitor. The real benefit comes when you edit files with subtle gradations. Files with greater bit depth can withstand more adjustment without unwanted colour shifts or banding being introduced.
Compression – to compress or not to compress?
Other things being equal, files with higher bit depths are larger than those with lower bit depths, and require more storage space. That's not true in the case of HEIF files, though, which are typically no larger than JPEGs even though they are 10-bit files and JPEGs are 8-bit. That's because of differences in image compression.
The most widely used type of image compression is JPEG. In simple terms, the compression algorithm looks for areas in the image where pixels have similar colour and brightness. It records the full data for the first pixel and then writes the digital equivalent of "same" for matching adjacent pixels. This takes up less space than recording full details for every pixel. When the image file is opened for viewing, the algorithm uses the data from the first pixel to re-create the additional pixels.
Different degrees of JPEG compression are possible. At maximum compression levels, the file size can be as little as 1/100th of the size of the original file. However, as the level of compression increases, the algorithm starts to batch pixels that are less close in colour and brightness. When the file is opened again, the re-created pixels are less close to their original brightness and colour values. This leads to loss of detail and tonal range, banding in areas that should have smooth gradients of tones or colours, and compression artifacts (mottling or blockiness).
It is important to realise that once a file is compressed using this kind of compression, some of the image data is lost and cannot be recovered. As with resolution settings, you should never use a compression level that takes the file below the quality you need in the final image.
Also, data is lost every time a modified file is compressed. If you open a JPEG file, make changes and then re-save it as a JPEG, additional data will disappear.
HEIF files use a more modern and sophisticated form of compression than JPEG, which results in less of this kind of image degradation.
Lossless and lossy compression
File compression algorithms that discard some of the original image data are called "lossy". However, "lossless" compression is also available. This kind of compression uses mathematical algorithms to encode the image information and pack all the data into less space. This is fully reversible, so that when the file is opened, all the data is still there. This means that there is no reduction in image quality.
Lossless compression is used by Canon digital cameras when the highest resolution image is stored as a RAW file, except when C-RAW is selected.
Lossless compression cannot achieve the file size reductions offered by lossy compression methods such as JPEG or HEIF compression, but standard Canon RAW format files can often be saved at a quarter of the size of an uncompressed file (the actual file size is affected by the subject and the ISO setting). If you select the C-RAW option, some lossy compression is applied so that C-RAW files are smaller than standard CR3 files.
File sizes
While using the highest resolution settings with the lowest compression settings produces the highest quality images, they are also the largest files, which not only fill up storage space but also take longer to save, because data can be saved to storage media at a specific speed according to the media type. Sometimes it may be more important to fit more files on your memory card or to enable the camera to save shots more quickly when shooting continuously. For this reason, Canon cameras offer a number of image size and compression options.
The table below shows the impact of the various settings available on the EOS R5.
Which is best?
There is no simple answer to this. It depends on several factors, and what you need at one time may not be suitable in other circumstances. But here are a few pointers to help you decide.
If you want the maximum image quality, shoot at maximum resolution with low JPEG/HEIF compression (best quality, large files), or preferably in RAW format. However, this not only takes up more memory card space, but also reduces the number of shots you can take in a burst before your camera's buffer fills up, and it increases the time it takes to transfer the images later. This won't always matter, but is important if you want to shoot rapid sequences at sports events or share images with others quickly.
Also, if you plan to do a lot of post-capture processing or need to produce very large (poster-size or even larger) prints, then it’s usually best to capture the highest quality RAW files with the least compression, to give you the most image data to work with.
On the other hand, if you want rapid access to your images, shooting compressed JPEG files allows you to read the files directly from the memory card. Don't assume that JPEG means poor image quality. Unless you select the lowest quality, you are in effect just letting the camera do the processing for you, carrying out a preset RAW conversion using optimised standard settings. The results will be fine for on-screen viewing or prints up to A4 size or so.
If you want JPEGs to share quickly but also the option to edit your shots later with maximum flexibility, and speed and memory card space are not an issue, don't overlook the option of RAW+JPEG, which saves each image in both formats simultaneously.
If your camera offers the option of HEIF, give it a try. It promises the best of both worlds, and is now being supported in most editing software.
The best way to find what works for you is to shoot the same subject in different file formats, at different combinations of resolution and compression, and take a look at the images on a computer screen. You should also print images from the smallest and largest files and see what differences, if any, you can discern. You might be surprised to discover that reducing resolution can have less perceptible effect than you imagine.
Related articles
-
FOTOTÖÖTLUS / JÄRELTÖÖTLUS
RAW-fotode töötlemine DPP-s
Vaadake, kuidas saate oma RAW-fotosid Canoni tarkvaras Digital Photo Professional töödelda, muuta ja täiustada.
-
TECHNIQUES
7 ways to get the best from your images using DPP
Discover the benefits of Canon's RAW processing and photo editing software and its new Neural Network Image Processing Tool.
-
CAMERA FEATURES
File numbering and naming
Our Infobank article explains the file numbering and naming options that are available on Canon EOS cameras and using compatible software.
-
CAMERA FEATURES
Viewfinder vs LCD Display
Viewfinder or LCD screen? Discover the differences on DSLR and mirrorless cameras, and find out more about electronic and optical viewfinders.
Related products
-
Peeglita kaamerad
EOS R6
Vahet ei ole, mida või kuidas te jäädvustate – EOS R6 võimaldab teil olla loominguline viisidel, mida te kunagi võimalikuks ei pidanud. -
Peeglita kaamerad
EOS R5
Unustage kõik, mida teate peeglita kaameratest. Kaamera EOS R5 kompromissitu jõudlus viib teie fotod ja filmid täiesti uuele tasemele. -
Digipeegelkaamerad
EOS-1D X Mark III
Elu on täis kordumatuid hetki. Jäädvustage neid koos kaameraga EOS-1D X Mark III ja jagage oma visuaalset lugu kogu maailmaga.