JPEG or RAW

Which file format is better – JPEG or RAW. Well, it depends….

Our digital cameras give us a choice of two file formats in which our images are stored – JPEG and RAW.  In fact, some digital cameras only store images in JPEG format.  What’s the difference and is one preferred over the other?  Let’s take a look at each.

But before we begin, I was curious what JPEG stands for, so I looked it up.  It’s pretty weird – Joint Photographic Experts Group.  Strange indeed.  But. be that as it may, JPEG is widely used.  Practically every image you see on the web is JPEG although you occasionally see other formats.  If you use a lab to print your photographs, there’s a good chance they will ask you to send them JPEG files.

Compression and File Size

Why is JPEG so popular?  Because the files are small compared to other formats.  They get that way by being compressed.  The amount of compression in JPEG files is greater than other compressed file formats and hence their smaller sizes.

There are basically two types of compression – ones that don’t lose any date (called ‘lossless’) and ones that do (called ‘lossy’).

JPEG compression is lossy. Pixels are removed before the file is saved.  When the file is reopened pixels are added although the added pixels won’t recreate the original image exactly.  Something is lost.  Later, when the file is saved, pixels are again removed but this time on a slightly degraded image.  The more the image is opened and saved, the more degraded it becomes.   

JPEG files let you control the amount of compression which directly relates to the quality of the compressed image.  To give you an example of how quality settings affect compression and file size, here are some numbers for my Canon 5D Mark IV with a roughly 30 M pixel sensor.

JPEG File
Sizes

Quality

Resolution

Number of
Pixels

File size
(MB)

L (large)

Fine

30 M

8.8

Normal

30 M

4.5

M (medium)

Fine

13 M

4.7

Normal

13 M

2.4

S1 (small 1)

Fine

7.5 M

3.0

Normal

7.5 M

1.5

S2 (small 2)

Fine

2.5 M

1.3

S3 (small 3)

Fine

0.3 M

0.3

 

With most digital cameras you can also shoot in RAW file format.  Unlike JPEG files that lose data when they are compressed, RAW files do not lose any data.  If they are compressed, a ‘lossless’ process is used.  Therefore, RAW files are much larger than JPEG.  Canon offers three RAW file sizes – RAW, M RAW (for medium size) and S RAW (for small size).  Here are the file sizes for my Canon 5D Mark IV.

RAW File
Size

Quality

Number of
Pixels

File Size
(MB)

RAW

30 M

36.8

M RAW

17 M

27.8

S RAW

7.5 M

18.9

 

The full-size RAW file is the highest quality your camera can deliver.  Because it’s not compressed, no data needs to be added when the image is displayed.   

The table below starts our comparison of the two file formats with the first two categories – image size and image quality.

 

JPEG

RAW

Small image size

X

 

High quality

 

X

 

Range of Colors

Continuing the comparison, we turn to the range of colors the different file formats can capture.  The range of colors is determined by three qualities – hue (the color itself), brightness of the color (luminosity) and the purity of the color (saturation).

The range of colors most file formats can support is determined by a color space.’  You can think of color spaces as boxes of Crayons of different sizes. A small color space is comparable to a small box of Crayons.  Larger color spaces have bigger boxes with more Crayons.

JPEG files use the sRGB color space. This is the standard color space for the internet and most monitors.  At 256 colors, it is the smallest color space.  This means that sRGB supports only 256 shades of colors.

RAW files are unique in that they are not associated with any color space.  The color range they capture is determined by the camera’s sensor and is literally in the millions of shades.  Therefore, RAW files have the best range of colors.

 

JPEG

RAW

Small image size

X

 

High quality

 

X

Range of colors

 

X

 

In-camera Processing

When a sensor captures an image each of the pixels sends an analog signal that is proportional in strength to the intensity of the light.  The processor in the camera converts these signals to discrete digital numbers that can then be stored on the memory card. 

With RAW files, other than converting the analog signals to digital data, the camera doesn’t do any image processing.  White balance which affects the color of the image actually doesn’t alter the image data in the RAW file.  All it does is store the white balance settings in the file’s metadata which, in turn, gets used by programs such as Lightroom to render the colors on the monitor.

JPEG files are different. There are controls in the camera that can be set to enhance JPEG images, controls like sharpness, contrast, saturation and color tone for color images and filter effects and toning effects for black and white images. 

The result is that JPEG files are pretty much ready to go but RAW files require post processing in an application like Lightroom.  So, in this regard, JPEG files are more convenient.  But the downside is that the camera makes the enhancement decisions, not the photographer.

 

JPEG

RAW

Small image size

X

 

High quality

 

X

Range of colors

 

X

In-camera processing

X

 

 

Ease of Use

JPEG files are ready to use.  They’re in a format that can be displayed on the internet including social media, emailed to friends, added to text messages and so on.  RAW files cannot be directly used for anything.  They must be converted to a usable file format such as JPEG, TIFF, etc.  Therefore, for pure ease of use, JPEG files are ready to go. 

On the other hand, since RAW files require post processing the result is what the photographer chooses what the image will look like, not the camera.  This gives the photographer full artistic control.

 

JPEG

RAW

Small image size

X

 

High quality

 

X

Range of colors

 

X

In-camera processing

X

 

Ready to use images

X

 

Total artistic control

 

X

 

Metadata

Both file formats contain metadata. For example, there is a lot of data about the camera and the settings used for the shot like lens focal length, ISO, f/stop, shutter speed and much more.  The metadata that these file formats can capture, while rather extensive, is fixed. You get what you get.

Who defines what metadata a RAW file can capture?  Each camera manufacturer has its own proprietary format.  Canon, Nikon, Pentax, Sony, Fuji and so on have their own proprietary RAW file formats.  And the manufacturers decide what metadata to include.

JPEG and proprietary RAW file formats, therefore, can capture fixed metadata.

Enter DNG, an open source RAW file format.  DNG stands for Digital Negative and open source means that the metadata it contains is not static, not fixed.  It can be added to.  For example, I’s possible to save all of your Lightroom adjustments in a DNG file. And to top it off, it’s generally smaller than the proprietary RAW files. 

When you import files into Lightroom you have the option of converting them to DNGs at the same time. The import takes longer but I prefer working with DNG files so it’s worth it.

 

JPEG

RAW

Small image size

X

 

High quality

 

X

Range of colors

 

X

In-camera processing

X

 

Ready to use images

X

 

Total artistic control

 

X

Metadata

 

DNG

 

Summing It Up

JPEG or RAW, what will it be? If you goal is to be able to take photographs you can share on social media or text to friends, then JPEG is ideal. It’s easy, the camera does most of the enhancements, and you can readily share your photos, especially when captured on a smart phone.  I should mention, however, that there are some excellent smart phone apps such as SnapSeed that allow you to further enhance your JPEG images.  But it’s all done on your phone and the images are ready to go in a matter of minutes.

If, on the other hand, photography is a personal expression of the world as you relate to and experience it, if image quality is important, if artistic control is essential then RAW files are the best way to go. They contain the maximum amount of information to work with and they give you complete creative control. 

But no matter which file format you choose, the important thing is that you are enjoying and getting satisfaction from your photography.  That’s really what it’s all about.

(93)

Author: doinlight

Ralph Nordstrom is an award-winning fine art landscape photographer and educator. He lives in Southern California and leads photography workshops throughout the Western United States.

2 thoughts on “JPEG or RAW”

We look forward to your comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.