Tech

JPEG vs RAW: Image File Formats Explained

JPEG vs RAW: Image File Formats Explained

(Editor’s Note: This story on JPEG vs RAW file formats is by photographer Patrick McNair. You can find out more about him on his website. He has previously written about the basics of White Balance for Digital Photo.)

When you take a photo, the image is converted into a file which is stored on a digital memory card (usually an SD card) that you put in your camera. The default setting on your camera is typically for a JPEG file but another common option is to choose a RAW image file format. I will explain what both of these terms mean in this basics of photography article.

JPEG Files

As mentioned, the default file format setting for many cameras, including most so-called point-and-shoots, is JPEG, which stands for Joint Photographic Experts Group. That is simply the name of the group of people who came up with this standard image format. Of course, when I say “point and shoot” I mean compact cameras that can be operated easily, most of which don’t have interchangeable lenses or manual focus.

Photo of Nikon W150

There is a reason why most use JPEG format and it has primarily to do with storage space. A JPEG image is compressed to make it smaller and that means you can store more JPEG images on the SD card. When you open the image using software, the photo is decompressed again allowing you to view it.

While it may sound great to have the ability to store more files on your memory card, there is a downside to JPEGs. The type of compression that JPEG files use is called “lossy compression” and, as you may have gathered from the name, in order to get the size of the file down, some of the image quality information is lost.

Whatever information has been discarded doesn’t prevent you from seeing and using the image. For example, the preview you see on the screen on the back of your camera is a JPEG image. The camera applies some minor corrections to JPEG images so that they look good on the camera screen.

Photo of Sony A7 rear screen

DSLR and mirrorless cameras can also save image files as JPEGs. For the serious photographer, this loss in image quality means that we don’t have a lot of information in the file that we can manipulate later in post-production.

Take a look at the following diagram which shows the histogram of a JPEG file before I started to process it in Photoshop and then after some post-processing had been done on it.

Photo of JPEG before processing

Photo of JPEG after processing

The gaps that appear in the histogram for the JPEG image during post-processing indicate the image detail that would normally be present to fill those areas has been lost during the compression process.

RAW Files

Your DSLR or Mirrorless camera is also capable of saving your image in another format called RAW. Each camera manufacturer has their own equivalent of the RAW file, but they all work in the same way. The following table shows the common manufacturer file extensions used for RAW files.

Photo of Raw file formats table

Advertisement

A RAW file contains so much more image information and detail than a JPEG including information about the size of your camera sensor, your exposure settings, aperture, lens information, white balance etc.

A RAW file also contains a full-size JPEG photo that is used to create that preview for the screen on the back of your camera. It is also used to create the preview of the image you see in your post-production software.

So RAW files are basically unprocessed images with no corrections applied to them by the camera. To see the results of a RAW image file you need to post-process it using software such as Adobe Photoshop or Adobe Lightroom. It’s a bit like the old film days where you have the images on the film but can’t actually see them properly unless you develop the film and produce prints.

Because they contain all this information and are not compressed, RAW files are larger than JPEGs and so your memory card will store fewer RAW files than JPEG files.

Some cameras have the capability to save your images in both JPEG and RAW format at the same time. My Nikon D7200, for example, has two SD card slots (which is one of the reasons I like this camera). One of the options that I have is to have the camera save JPEGs of the scene I’m shooting to one SD card and the RAW version of the scene to the other SD card. I have to admit though that I tend to shoot only in RAW.

Photo of camera card slots

Advertisement

So now that we know the benefits of shooting in RAW, how do we actually tell the camera that RAW is the format that we want to use? If your camera is capable of shooting in RAW then there will be a menu option that allows you to set it to RAW.

On my Nikon camera that menu option lies under the Photo Shooting Menu and is called ‘Image Quality’.

Photo of Nikon menu

On my Sony A7 the menu option lies under Menu > Camera Settings > Quality.

Photo of Sony camera menu

In an earlier article on Digital Photo, I discussed white balance and I mentioned, in this article, that white balance is one of the pieces of information that is captured when you shoot in RAW.

This means that, when you photograph using RAW format, all of the white balance information in the scene you were shooting was captured by the camera and stored in the RAW file. Having this information means that you have the ability to manipulate the white balance in post-processing without any loss to the quality of the image.

If you are serious about photography or you want to take your camera and processing skills to the next level, I highly suggest you set the image quality you are photographing in to RAW and experiment with processing the in software to get the photo exactly how you want it. However, if all you want to do is create a photo that you can simply send to someone straight off the bat with no further processing then JPEG is the best option for you.

Published at Wed, 26 May 2021 19:47:17 +0000