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.
You will need specialised software to do anything with RAW images. A lot of image software won’t open them at all. I use Photoshop, which does. The files are usually named the same as their JPEG versions, but with a different file extension indicating the format. Not all RAW formats are the same, and not all extensions are the same. For example, RAW pictures taken with Samsung and HTC phones have .dng file names. While those taken with Panasonic cameras have .rw2 file names.
So, how different are the original and the processed versions? As I keep saying, it depends on the camera. Here is a shot I took using the Panasonic Lumix DC-GH5 (pictured at top) earlier this year, cropped way down so you can see how sharp it was. The left side is from the RAW image. The right from the JPEG image that camera made from that. Not a whole lot of difference. The camera has applied a little sharpening or detail enhancement. The colours have shifted a little, although that doesn’t show up all that clearly because the RAW image actually used a different colour profile, and when I pasted one image into the other, the same profile was required for both.
Still, all in all, the differences are subtle.
Now let’s repeat that with the Samsung Galaxy S7 which, I stress, has one of the better phone cameras around. Here’s the RAW version:
And here’s what you get on the exact, same picture when it’s processed by the phone and saved as JPEG: