a visual experiment.

a visual experiment.

Wednesday 9 April 2014

RAW vs JPG: What do I shoot with?

You have probably heard your friends tell you to shoot your photos in RAW. They are bigger in size and are therefore 'better' than JPEGs. But just how much better is RAW compared to JPEG? This post aims to examine the benefits of shooting RAW vs JPEG by looking at real life comparisons.

1. What is RAW?

A digital RAW file, as the name implies, is a file containing the unprocessed raw data as captured by a camera's digital sensor. Each camera manufacturer uses a proprietary RAW format with the exception of Adobe's DNG. A RAW file does not contain a finished photograph. For those who have shot film, a RAW file is best described as a 'digital negative'. A final image can only be obtained through post-processing in a RAW conversion software, just like how one would spend time in the darkroom printing an image from a negative.

--

2. The Advantage of RAW.

When compared to JPEGs, RAW files have a significant advantage over the latter:

i. NO LOST DATA. 

JPEGs are convenient to work with due to its small file size. In order to obtain it's small file size, a compression algorithm is applied to the image causing a certain amount of data in a JPEG file to be truncated. As such, JPEG files are 'lossy' files, the more the file is compressed, the more detail it loses.


Rollover to see the difference between JPEG compressions.

It is useful to note that although a JPEG may look fine the first time it is opened, it starts to show degradation in quality if it is opened and saved repetitively. The picture below shows the degradation process after repetitive saves using JPEG Medium.



Degradation starts from the first save. By the 5th save, degradation is significant.

The RAW file on the other hand is not compressed and does not lose data. When photographers work with RAW, they often save their images as a TIFF or a PSD (Adobe Photoshop) file. These formats preserve image quality and lose no data irrespective of the number of times they are opened and saved. As such, we call them 'loss-less' formats.

---

ii. CONTROL OF DATA.

When shooting in the JPEG format, an in-camera software programmed to convert raw data from the sensor into an image according the existing settings when the picture is made. During this process, the in-camera software, not the photographer, applies picture settings such as exposure, contrast, sharpening, saturation, white balance, etc. in an attempt to create a picture that is deemed 'acceptable' by the software. The original raw data captured by the sensor is altered, and is no longer available.

In a RAW file, camera settings for color space, sharpness, saturation, and white balance are not applied to the image. Instead, they are tags which accompany the RAW file through the conversion process, allowing the photographer to process all of the original data on a desktop or laptop computer which has considerably more speed and power than the camera software. This allows for more flexibility in post-processing and to a certain degree, exposure, just as though as making those changes while taking the picture. Furthermore, the raw data is converted on the photographers' computer where they can view these changes real time.

Also, the photographer is always free to return to the RAW file to change settings and process the photo differently if an occasion rises because the raw data is untouched and does not alter underlying data.

Adobe Camera Raw importing an image into Photoshop.

(Insert image comparing post processing in RAW and JPG changing the white balance.)


---

iii. BIT DEPTH

To understand the advantage of RAW over JPEG, it is good to have a grasp of bit depth. Without going into too much detail, a bit is the smallest unit of data. It can be either 0 or 1, black or white, on or off. A byte is comprised of 8 bits and therefore can represent 256 different states (2^8). In summary, the higher the bit rate, the higher the number of possible states can be represented.

So how does bit depth correlate with RAW and JPEG files? The answer is simple.

JPEGs are 8 bit files, and most RAW files are 12 or 14 bit. An 8 bit file can measure 256 tonal values in each of the three color channels, or a total of 16.7 million possible colors per pixel. A 12 bit RAW file, however, can measure 4,096 tonal values per channel, or a total of 68.7 billion possible colors per pixel.

A JPEG file, therefore, records much less tonal data than a RAW. Consequently, the tonal gradations in a JPEG file are sometimes not smooth, a condition referred to as "posterization". It often occurs in areas of the sky where the change in tones is very gradual and subtle. Tonal transitions are much smoother, and image detail is more accurate in RAW files which discern many more color tones per pixel than a JPEG.

(Insert example of posterization)

When processing a RAW file, it is recommended to save in a TIFF or Photoshop PSD or any file format that supports 16 bit. This way, all the data will not be lost even when opened, closed, or compressed.

---

3. Conclusion.

The choice of shooting JPEG and RAW is ultimately decided by you as a photographer and what you wish to do with your images. If you are doing snapshots to email to your friends or posting on Facebook and Instagram, the smaller file size offered by a JPEG might be ideal.

At this juncture, it is useful to note that despite the advantages of RAW, an image captured with JPEG in the maximum quality, a good color print can be obtained, assuming that all color settings and exposure was done right in the camera.

On the other hand, if you are a working photographer or just enjoy post-processing your photos, the flexibility of what a RAW file offers is definitely appealing. RAW files are larger than JPEGs and thus take up more space on the hard drive, but their advantage can be significant.

If you are after valuable hard to find images, or if you want to reproduce your work in the highest possible quality, then the RAW format would almost be mandatory. The RAW file records so many more colors and tonal variations than a JPEG. As a result, prints reveal more detail, have smoother tonal gradations, and avoid "posterization" which is sometimes found in JPEGs.

When in doubt to which file format to shoot with, most modern cameras allow the photographer to record both in JPEG and RAW simultaneously. With a little more file space, one can have the best of both worlds.