RAW vs JPEG – Which Image Format is Better and Why

Tips & Techniques

The topic of RAW vs JPEG image format is one of the never-ending debates in photography. Some photographers say shoot in RAW, while others say shoot in JPEG. What is the RAW format in digital photography and what are its advantages and disadvantages when compared to JPEG? Having a thorough understanding of file formats and their differences is essential for photographers in order to make the right choices when going through camera settings.

This photograph was shot in RAW format, then converted to JPEG using Lightroom. Using a RAW image allowed me to preserve as much highlight and shadow detail as possible, which would not have been possible with JPEG
Fujifilm X-T20 + XC16-50mmF3.5-5.6 OIS II @ 16.7mm, ISO 200, 1/6, f/8.0

I remember my first time going through my camera options and reading the manual, wondering about what RAW does and why I should consider using it. JPEG is a no-brainer – it’s the default image format that is used in most smartphones and point-and-shoot cameras, so we know what to expect from it. But when I came across the RAW image format, I wanted to find out how it affects images immediately, as the word “raw” by itself sounded intriguing to me. So I went ahead and changed my camera settings to RAW and tried to take a picture. The first thing I noticed, was how small all of a sudden my memory card became. “Wait a second, how come the number of pictures went down from several thousand to less than 500?” is what went through my head. The image looked exactly the same on the LCD and yet it consumed more than three times more storage. Bummer. Then, I took the memory card and inserted it into my laptop. To my surprise, I couldn’t even see or open the darn thing! “Worthless”, I exclaimed, then changed my camera settings back to JPEG.

Sounds familiar? If you are in a similar situation, do not make the mistake of abandoning RAW as I once did and read on. You truly need to understand all the advantages and disadvantages of both formats before making this important decision, because you might be sorry that you didn’t later.

Table of Contents

1. What is a RAW Image?

A RAW image (also known as a “digital negative”) is an image file that contains unprocessed or minimally processed data from a digital camera’s sensor. Similar to raw food ingredients that need to be prepared and cooked before consumption, a RAW image also needs to be post-processed in software before it is ready to be printed, shared or shown on a display device. Unlike JPEG files that can be easily opened, viewed and printed by most image-viewing / editing programs, RAW is a proprietary format that is tied to a specific camera model. Therefore, in order for software to be able to work with a RAW file, it must be compatible with the particular camera the RAW image was captured with. Post-processing RAW images can yield greater dynamic range (with better highlight and shadow recovery options), superior colors and in some cases can even provide more detail when compared to JPEG images.

RAW files typically consist of three main parts: the actual RAW data from the image sensor, a camera-processed full size JPEG preview + thumbnail, and all relevant header and metadata information. For cameras to be able to display the recorded image on the rear LCD or on the electronic viewfinder, the camera-processed JPEG preview is used. The image header, as well as parts of the metadata are used for interpreting sensor image data by RAW conversion software, while other metadata information such as exposure settings, camera and lens model, date / time, etc. can be used for filtering, sorting and cataloguing images.

This image from San Juan Mountains of Colorado was photographed in RAW, then converted to JPEG using Lightroom.
Colorado Fall Colors Road, Post-Processed in Lightroom from a 14-bit RAW image.

1.1. Advantages of RAW Format

  1. Far more shades of color. Compared to an 8-bit JPEG image that can only contain up to 16.8 million colors (256 tonal values for Red, Green and Blue channels), a 12-bit RAW image can contain up to 68.7 billion colors (4,096 tonal values per color channel). Stepping up to 14-bit RAW images increases RGB tonal values significantly to 16,384, which boosts the potential to 4.4 trillion colors. And some high-end cameras are even capable of recording 16-bit RAW images, which results in 65,536 tonal values per color channel, resulting in mind-boggling 281 trillion colors. If you are wondering about the difference between this number vs JPEG, that’s 16.8 million times larger!
  2. Wider dynamic range and color gamut. A RAW image contains wider dynamic range and color gamut compared to a JPEG image. For highlight and shadow recovery when an image or parts of an image are underexposed or overexposed, a RAW image provides far better recovery potential compared to JPEG.
  3. Finer control and adjustment potential. When a RAW image is generated, all camera settings, including camera-specific and manufacturer-specific information (also known as image metadata), are added into the file, along with the RAW data from the image sensor. The metadata is then used for demosaicing and RAW conversion process, which is what converts an otherwise black and white RAW image to color and applies particular gamma correction, white balance, brightness, contrast and other adjustments. This means that the RAW image itself remains unmodified or “non-destructive” – you can make changes to the image later in post-processing applications like Lightroom and Photoshop.
  4. Can adjust color space after image capture. Similar to white balance, color space (such as sRGB or Adobe RGB) is not saved into RAW images either, which means that you can change it to any color space later on.
  5. RAW images are lossless. Unlike JPEG, RAW images typically utilize lossless compression (unless specific “lossy” RAW compression is selected), meaning they do not suffer from image-compression artifacts.
  6. Better sharpening potential. No image-sharpening is performed on RAW images, which means that you can use better and more complex sharpening algorithms for your photos.
  7. Can be used to convert to other RAW formats. When using RAW image format, images can be merged together to create HDR or panoramic images in DNG file format when using Adobe Photoshop Lightroom. This opens up opportunities to edit images just like RAW files, with maximum editing potential and recovery options.
  8. Proof of ownership and authenticity. Unlike JPEG images that can be easily manipulated, RAW images can be used as evidence of your ownership and authenticity of the photograph. If you saw an alien and have a RAW image to prove it, nobody would be able to argue that you manipulated the image in Photoshop 🙂

1.2. Disadvantages of RAW format

  1. Must be post-processed. RAW files require post-processing and conversion to a format like JPEG before they can be normally viewed, which adds time to your photography workflow.
  2. Requires more storage. RAW images take up much more storage space than JPEG images. This means that your memory cards can store fewer images and your camera buffer can quickly fill up, causing the camera frame rate to drop down significantly. You will also need more storage space on your computer and other storage devices to keep all the RAW images you capture.
  3. RAW format compatibility. RAW files are not standardized across different manufacturers. For example, Nikon software cannot read Canon RAW files and vice-versa. In addition, not all image-viewers and editors can open all the RAW files. If you have a brand new camera that just got released, you might need to wait for a while for software companies to catch up and update their software so that your RAW files can be opened and worked on.
  4. Sharing issues. You will have to convert RAW files to a compatible format like JPEG or TIFF before you can give them to your friends and clients, as they might not have the proper tools to view them.
  5. More files to manage. Because RAW files cannot be modified by third party software, your settings will have to be stored in a separate sidecar (XMP) file. In addition, you will most likely be storing post-processed JPEG images as well, which translates to more files to manage.
  6. Longer backups. Due to larger file sizes of RAW images, the backup procedure takes much more time.
This image was captured in RAW and then converted to JPEG using Adobe Photoshop Lightroom
Bedouin with his camels. This image was captured in RAW and converted to JPEG after applying highlight recovery
NIKON Z 7 + NIKKOR Z 24-70mm f/4 S @ 70mm, ISO 100, 1/2000, f/8.0

2. What is a JPEG Image?

JPEG is an image format that utilizes lossy compression for storing and displaying digital images. Thanks to its high compression efficiency, it is the most popular and the most adopted image format today, with most display devices and software having built-in capabilities to read and display JPEG images. Different levels of quality (typically in percentage) can be applied to compress JPEG images, which impacts the overall quality and the final size of the image. Lower quality conversion results in higher compression rates, smaller files and compression artifacts, while images saved with a higher quality setting will reduce the potential for compression artifacts at the cost of increased storage needs.

2.1. Advantages of JPEG format

  1. Already processed. JPEG images are fully processed in camera and all settings such as White Balance, Color Saturation, Tone Curve, Sharpening and Color Space are already “baked in”, or applied to the image. So you do not need to spend any time on post-processing the image, it is basically ready to use.
  2. Small footprint. JPEG images are much smaller in size than RAW images and therefore consume a lot less computer and other storage.
  3. Compatibility. Most modern devices and software support JPEG images, making the format extremely compatible and practical.
  4. No camera slowdown. Due to the smaller size, cameras can write JPEG files much faster compared to RAW files, which increases the number of pictures that can fit in the temporary camera buffer. This means that compared to RAW, you can potentially shoot at higher frames per second and for longer periods of time without slowing down your camera.
  5. Choice of compression. Digital cameras and post-processing software provide different compression levels for saving JPEG images, giving you the flexibility and choice over image quality vs size. Some software like JPEGmini is able to compress JPEG images automatically without any visible loss of quality, which further decreases storage footprint.
  6. Faster backups. Smaller size also translates to faster and more efficient backups.

2.2. Disadvantages of JPEG format

  1. Lossy compression. The “lossy” image compression algorithm means that you will lose some data from your photographs. This loss of detail, especially in highly compressed files, might result in posterization issues, as well as visible “artifacts” around subjects that might be visible to the naked eye.
  2. JPEG is 8-bit. The JPEG image format is limited to 8-bits, which puts a hard limitation of 16.8 million possible colors. This means that all those other colors that your camera is capable of recording are essentially discarded when the image is converted to JPEG format.
  3. Limited recovery options. JPEG images contain far less data, which significantly limits their dynamic range and recovery potential. This means that if you manage to overexpose or underexpose an image, it will be very difficult, if not impossible, to recover that data.
  4. Camera settings impact JPEG images. Since cameras fully process JPEG images, any camera setting that can damage the resulting image will be irreversible. For example, if you apply too much sharpening to your images, you will not be able to “unsharpen” them later.

3. Should You Use RAW or JPEG?

Let’s now move on to the most important question – should you be using RAW or JPEG for your photography?

For me, shooting in RAW far outweighs the advantages of using JPEG. Storage is cheap nowadays and the file size does not bother me, even for backups. Since I already spend a considerable amount of time taking pictures, I do not mind spending a little more time and effort working on them in the digital darkroom. True, if I was required to post-process every image one at a time, I would have certainly abandoned RAW altogether, because I wouldn’t have the time to go through tens of thousands of pictures. However, thanks to all the image culling, cataloguing and post-processing software that lets me pick and choose what to edit, with the ability to go through images in batches, I do not have to worry about wasting time and only concentrate my efforts on images that matter.

On top of that, my time and storage considerations are relatively small issues when compared to the amazing ability to recover information from RAW photos. Like many other photographers, I have been in situations where I managed to take a badly exposed image or mess up my white balance on a photograph that was too important to discard, such as a photograph from a wedding or a paid corporate shoot. If I shot only in JPEG, I would not be able to do much to save the image. But thanks to RAW and its recovery potential, exposure and white balance errors are relatively easy to correct (as long as exposure errors are not too extreme). RAW can make a huge difference in such situations, especially when photographing rare, special moments that cannot be reproduced ever again.

3.1. RAW vs JPEG: Underexposed Image Example

How much difference is there when trying to recover data from a RAW image compared to JPEG? Let’s take a look at the first example:

A heavily underexposed image is very difficult to recover when shooting JPEG, which is why it is best to use the RAW file format.
Heavily underexposed image

My camera shutter speed was still from the previous location where it was much brighter and I didn’t notice the issue until after the fact. Gladly, I shot in RAW and I was able to almost fully recover the details that otherwise would have been lost. It was a first look and the best image of the groom’s face, which I did not want to lose. Take a look at below image on the left, which was recovered by 5 stops from the RAW file, while the image on the right was recovered the same way from a JPEG image:

As you can see, the difference between the two is very noticeable and significant. Recovering the image by 5 stops in Lightroom was a bit extreme in this case and I certainly ended up with more noise in the resulting image, but it was still perfectly usable. Now if I had shot the same image in JPEG and underexposed it by that much, there would have been no way to recover all that data, and I would not have been able to deliver this image to my clients.

It is hard to believe that such recovery is possible with a RAW image until you try it yourself. Go ahead and set your camera to RAW + JPEG, then underexpose an image by a few stops and see how much more recovery potential you have with the RAW image vs JPEG. You will be amazed by what you see and experience a similar result as above.

3.2. RAW vs JPEG: Recovering a Long Exposure Image

Now let’s take a look at another underexposed image, which I took at night using a very long exposure of 262 seconds. My camera battery was about to run out, so I stopped the exposure to swap the battery out and start another one:

Underexposed image captured in RAW format. The image is very dark, but still has the potential to be recovered in post-processing software.
A heavily underexposed long exposure image
NIKON Z 7 + NIKKOR Z 35mm f/1.8 S @ 35mm, ISO 64, 262 seconds, f/4.0

Unfortunately, my next exposure did not work out at all, because it got much brighter at dawn and the stars disappeared from the sky. I thought I would not be able to recover the image, but after dialing +4.5 on the exposure slider in Lightroom, I was able to bring out all the details of the image, which was incredible! I then adjusted a few settings of the image such as Highlights, Shadows, Whites and Contrast, and here is what I was able to get as a result:

This image is fully recovered by 4.5 stops from the original RAW image. If I had shot the same image in JPEG, it would have been impossible to recover it fully.
Fully recovered image after +4.5 exposure and other adjustments in Lightroom

Now if you are wondering what I would have been able to do with the image if I had shot it in JPEG, here is the result:

This image was recovered by 5 stops from JPEG image - as you can see, RAW vs JPEG makes a big difference in the way the image appears in the end.
A failed attempt at recovering a JPEG image – it is completely unusable.

Yikes! I wasn’t able to make both images look remotely similar, even after dialing +5 exposure and -100 highlights for the JPEG image. As you can see, the image is completely unusable!

3.3. RAW vs JPEG: Post-processing RAW vs JPEG Images

The next example involves an image that has an overexposed sky. Here is the original RAW image without any post-processing applied to it:

Overexposed RAW Image
An image with an overexposed sky
X-H1 + XF35mmF2 R WR @ 35mm, ISO 200, 1/10, f/5.6

The image on the left below is the RAW image that had the sky recovered and other adjustments made to the image using Adobe Photoshop Lightroom. The image on the right went through exactly the same post-processing steps, except the original was a JPEG:

As you can see, the source JPEG image contained almost no data to be able to recover highlights in the sky, which is why it looks gray. Much of the cloud on the top right, as well as all the clouds on the left were also overexposed and I could not recover any of those highlights. In addition to all this, if you look closely, you will also find subtle differences in other areas of the image where changes in white balance did not go in favor of the JPEG image.

3.4. RAW vs JPEG: Dynamic Range Comparison

If you are wondering how much more dynamic range one can pull out of a RAW file vs JPEG, take a look at my article that compares dynamic range between Nikon and Canon DSLRs. I gave two examples in that article that show what a 14-bit RAW file can do compared to a JPEG file when recovered in post-processing. Take a look at the below images (Left: RAW +5 Stop Recovery, Right: JPEG +5 Stop Recovery):

Nikon D800E +5 EV Nikon D800E JPEG +5 EV

That’s a drastic difference in the ability to recover colors and details!

Anyway, here is my conclusion on the RAW vs JPEG debate: if you are serious about your photography, you should always shoot in RAW format. If you are just taking pictures of your family for fun, and you are OK with not taking advantage of the capabilities of your camera, then by all means shoot in JPEG.

Please let me know if you have any questions or feedback in the comments section below.

Subscribe to Our Newsletter

If you liked this article, please subscribe below to our weekly email to get more great content like this!

Products You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × five =