RAW vs JPEG: Compare the Differences

with No Comments

If you are a photographer, you will be acquainted with RAW formats and the JPEG format. Usually, you convert the RAW format to a JPEG format for more general use. But the question is, why should you convert, when should you convert, and is it worth it?

This article covers the pros and cons of each format and why you should use each one.


raw vs jpeg

RAW vs JPEG Quick Comparison

The table below lists the major differences between the two file types. A further explanation is provided afterward.

JPEG vs RAW ComparisonRAWJPEG
Image qualityPerfect image quality with complete sensor data contained.Very good, but not perfect image quality.
File SizeLarger filesSmaller files
CompressionUncompressed 14 bit file. Over 4 trillion possible colors. Various levels of 8 bit compressed file. Around 16.7 million possible colors. 
SupportSupported by photo editing software.Widely supported on almost all devices and apps.
Suitability for EditingIdeal editing capabilities. It provides the most highlight and shadow recovery.Limited editing capabilities due to compression. 
Can You Save Edits to the Original File?NoYes

What is a RAW File?

A RAW file is basically all the data the sensor of your camera creates, dumped in a file to be further processed. In essence the RAW file isn’t an image yet, but a chunk of data that needs to be processed to get an image out of it.

Of course, your camera or post processing will show you a preview, and sometimes it will have a preview JPEG file baked in the RAW file for easier management, but the RAW file itself technically isn’t actually an image until it is processed.

Every camera manufacturer has its own RAW file format. Canon uses .CR2 and .CR3, Nikon uses .NEF, while Sony uses .ARW. They are all RAW files, however. Usually, they are 14 bit, meaning that they store up to 16,384 shades of color per channel, or in total more than 4 trillion possible color hues.

The amount of data the RAW file stores makes the file size significantly larger.

raw photo example
Unprocessed RAW file, 5095×3397 pixels, 20.9 MB
See Full Resolution Image
(Image by Dzvonko Petrovski)

Camera manufacturers allow the photographers to use RAW files because that allows them to get the most out of their cameras in post-processing.

In order to get an image out of a RAW file, software that processes RAW files is necessary. Photoshop, Lightroom, Capture One, Luminar Neo, or any other RAW processor will do the job.

Pros:

  • Retains all the data. You get the most out of your camera sensor. There is no compression.
  • You can recover some of the lost highlights and shadows.
  • You can significantly change the white balance without any losses.
  • You can not damage the file when editing. It can not be changed by the most common editing software.

Cons:

  • You can’t use it everywhere straight out of the camera. You need to convert the RAW file to another more common file type like JPEG for ease of use.
  • Significantly larger file size than JPEG.
  • You might need to wait for a couple of weeks for your editing software to support the RAW file if you purchase your camera right after it is released.

What is a JPEG File?

JPEG is the most common and the most supported digital image file format. The name is an acronym for the Joint Photographic Experts Group, and it was established 30 years ago. It quickly became the go-to file format for displaying and sharing digital images.

The JPEG file format isn’t lossless, meaning that it has varying levels of compression. When you are saving a JPEG image, you can choose the level of compression also represented as quality, ranging from 100 to 1. Setting the quality level to 100 will produce the least compression and thus larger file size. 

20-100 jpeg quality
Notice the banding and artifacts in the clouds and mountains present on the left side, while the same being absent on the right side. That is a product of compression.
(Image by Dzvonko Petrovski)
jpeg quality
A crop of the above shows the blocky compression in the clouds and mountain on the left.
(Image by Dzvonko Petrovski)

Often a quality setting between 90 and 70 works best where the file size is reduced significantly, but visually there isn’t that much quality loss.

Due to the small file size with decent image quality, it can be viewed on pretty much every device you can think of. Starting with your smartphone, PC/Mac, or tablet, to web content and various desktop and mobile apps.

processed jpeg
Edited JPG image, 5095×3397 pixels, Quality set to 100 – 11.4MB
See Full Resolution Image
(Image by Dzvonko Petrovski)

Websites most often use JPEG due to the file size and the option to stream the photo down in passes, each one increasing the quality. This is a neat option for users with slower or unstable internet connections.

For document scanning, a JPEG file is quite effective since there aren’t many variations in the colors. It can store a lot of data within a small file. Of course, it won’t be smaller than a text document, but it will be significantly smaller than any other image format.

Pros:

  • Widespread compatibility: it is supported by pretty much any device, browser, or app.
  • Small file size: JPEGs have a decent compression where you get a significant reduction in file size without losing too much image quality.

Cons:

  • Loss of quality: due to the compression, a JPEG image is not lossless. Depending on the amount of compression, there is a loss of quality and detail. 
  • Limited editing capabilities: with JPEG, you can’t recover highlights and shadows a lot, sometimes at all. This is dependent on the compression as well.

What should I convert my RAW files to, and why?

Since you can’t really use RAW files for anything else besides editing them, you have no choice except to convert them down to a more usable file format.

Most of the time, you will be converting to JPEG since it is the best general-purpose digital image file format.

However, bear in mind that JPEG is limited in bits per channel and has compression. Therefore if you intend to do a high-quality print of your photo, you might need to use TIFF.


When should I convert my files to JPEG?

When you edit your RAW files and you need to export them for web use and for a low or medium quality print, you can safely use JPEG.

In other words, you should use JPEG export of your edited RAW files if you want to use your photos for social media, send them via email, use them for the web (websites, apps, and so forth), or use them in display devices like digital photo frames or digital advertising banners, or for low-quality prints (small prints like 4×6 inch prints). Essentially, everywhere where smaller file size is necessary.

In other scenarios, where utmost image quality is necessary, image formats like TIFF are a better choice.


JPEG vs RAW for Highlight and Shadow recovery

As previously mentioned, the RAW file holds all the data that the sensor can capture, thus providing a significant amount of recovery in both highlights and shadows when compared to JPEG.

However, without an example, the amount of recovery available isn’t easily comprehensible.

So let’s see how much a JPG file holds up to a RAW file when it comes to recovery.

raw file for conversion to jpeg
This is the original file in JPG format. A difficult scene with a significant difference between the highlights and the shadows.
(Image by Dzvonko Petrovski)

In situations with a high dynamic range, JPEG falls apart really quickly if you try to recover lost detail. As you can see, the sky is almost all blown out, and the trees are pitch black.

RAW-vs-JPEG-highlight-recovery
Same photo, slightly cropped in for better visibility, with highlights recovered to -100 and shadows recovered to +30.
(Image by Dzvonko Petrovski)

As you can see, there is not much detail recovered in the JPEG photo since there is no data there to be recovered due to compression.

jpg vs raw
In this animation you can better observe the loss of details in both highlights and shadows.
(Image by Dzvonko Petrovski)

With the limited recovery and editing capabilities, it is obvious that JPEG is more suitable as a file format for the end result instead of it being the starting point of your edit. The RAW file is intended to be the starting point, thus offering the most editing leeway.


Read More:

TIFF vs RAW

TIFF vs JPEG

DNG vs TIFF

DNG vs JPEG

Follow Dzvonko Petrovski:

I'm a photographer who loves challenging and experimental photography and loves sharing my knowledge about it.

Free Downloads for Lightroom and Ph...

Leave a Reply