When I review phones and cameras, I often mention whether or not the device is capable of taking pictures in RAW format. So, what is RAW? Should you insist on having it as a feature? Should you use it? What advantages does it have, if any, over the good old JPEG files your camera and phone normally produce? And what disadvantages?

To help talk about these things I’m mostly going to use as an example a photo taken on a smart phone – a Samsung Galaxy S7. This has one of the best cameras around … for a smart phone. You will likely be startled by the differences between the RAW and JPEG format photos it produces. As we’ll see, the differences are less stark with standalone digital cameras. The better the camera, the smaller the difference.

Two sets of processing

There are two principal differences between JPEG and RAW photos. The latter is what you might call the raw material used by the processing in the camera to create the JPEG. If you save a RAW image, you are simply plucking the image out of an earlier stage in the picture creation process.

And you’re stopping the “lossy” JPEG compression process.

There are two main sets of image processing that go on inside your digital camera/phone camera. The first set is concerned with simply getting the raw image data in the first place. The output from the image sensor has to be adjusted so that it accurately tracks the brightness to darkness scales for each colour. That becomes the raw material. And if your device supports RAW photography, then that’s probably what will be saved.

But almost all photos then go through additional digital processing which is designed to improve the image. This involves things like tweaking the colour and contrast levels and enhancing picture detail. The better the basic optics and sensor, the less of this kind of processing that is required.

Finally, the image is compressed using JPEG. How much compression is a design decision. Too much can lead to visible compression artefacts. Too little can result in excessively large file sizes. It is, after all, to reduce the size of the files that JPEG compression is used at all.

Most cameras and phones which support RAW files will actually save two copies of the picture: one in RAW and one processed in the usual way and saved as JPEG. The photo I’m going to use here was 4.08MB in its JPEG form, and 23.8MB in RAW. In practice, JPEG files sizes tend to be all over the place in size because how effective JPEG compression is depends very much upon the content. The photos I on the same day as the example photo range in size from 2.90MB to 5.20MB in JPEG. In RAW they are all 23.8MB. The RAW file consists of the original photo, and possibly some metadata and a small JPEG preview. The Samsung Galaxy S7, for example, embeds a 504 by 376 pixel JPEG preview. This shows up in Windows Explorer, making it easier to manage these pictures because you can see what they are without having to open them in suitable image processing software.