It seems like deciding on jpg vs. raw formats for our images is a problem for some photographers. I’m not sure why. Maybe it is lack of knowledge or maybe because it is sometimes discussed in almost mythological terms. Jpg and raw are just 2 ways of saving our images. Each is good for some things but there are tradeoffs to consider. It is just technology, not magic.
When you take an image on your digital camera, each manufacturer has their own proprietary magic they do on the bits coming off the sensor. This lets them tune their image to meet their goals. If you shot the same scene with different cameras you would notice subtle differences – slight color balance differences, slight variations is tonal contrast, different handling of shadows and highlights, etc. These are usually small, but they give a camera it’s unique character.
But we need to consume these pixels in our image processing software. So there needs to be standardized ways of storing the images and reading them in our computer. These are file formats. There are 2 main choices.
Jpg is an industry standard format. The format is very widely understood and used. All images, once converted to jpg, are compatible.
What we call raw files are really proprietary file formats created by different camera manufacturers. Image processing software, like Adobe Lightroom, has taken the responsibility to be able to read the files written by virtually all camera manufacturers. For instance, I shoot Nikon, so the images LIghtroom reads and handles have the “.nef” extension. Lightroom knows how to interpret this and convert it to editable pixels.
The key thing here is that these raw files all contain roughly the same information, but are not directly compatible. Thankfully our software handles the differences gracefully.
Technical details – jpg
The term jpg, more precisely “jpeg” is derived from a standard created by the Joint Photographic Experts Group. The name jpg is an abbreviated acronym.
The problem was that digital files are very large, this made them consume lots of disk space back when disks were small. It also used up lots of bandwidth transmitting them back when internet was slow and much more expensive (anyone remember dial up modems?).
The jpg standard is based on some brilliant insights on human perception to allow encoding image files so they look good but are much smaller. The underlying principle is that humans are more sensitive to variations of tone (luminance) than they are to color (chrominance). The jpg processing reduces the luminance information and greatly reduces the chrominace data to acheive reductions of about 10x typically.
In general, transforming an image to jpg is a multi step process. It involves a transformation where the luminance and chrominance information is separated. Then the chrominance information is downsampled, or reduced. Then there is a grouping of data into blocks and a process called discrete cosine transform is applied to the data blocks. This transformed information is quantitized and encoded. Finally the data is written out in a defined format as a jpg file. It is not at all necessary to know these details, just that the data in a jpg file is far removed from the original pixels that came from the camera.
It is a lossy compression technique. Yes, it throws away a lot of data. This is one of the big tradeoff points of jpg. But a fringe benefit is that the image is made to look “nice”. The result is pleasing to most people without further processing
Technical details – raw
These files are called “raw” because they contain minimally processed data from the camera sensor. They are absolutely not ready to be viewed or processed. Some people describe it as a digital negative. Conceptually this is pretty good way to help us think about it, but it is not a valid description. The data is not negative and it is not viewable. It might be better to think of it as exposed but unprocessed film.
To follow this metaphor, a raw image processor like Lightroom “develops” the image and makes it viewable and editable.
Why raw? It captures and beings into the computer all the data that the camera sensor was able to record. It has the full range of color and tones. Nothing has been eliminated yet.
In addition, the raw format has not had any lossy compression applied. Nothing is thrown away or reduced. Because of these things an image from a raw file requires manual editing to complete it. Sometimes a lot of editing.
So jpg is made small as possible and generally nice looking as soon as you see it. You can immediately look at it or send it to someone or post it to your social media. Yes, some information has been intentionally eliminated, but that is not important to most people. If you don’t notice it then it must not matter.
On the other hand, if you want to make a large print of a jpg you may see noisy patterns that are euphemistically called “artifacts”. This might be mitigated with clever software, but your mileage may vary.
And there is an editing danger you need to be aware of: every time you save a jpg file it goes through the transform process to reduce data. So every time you edit it and save it you lose information and introduce more artifacts. If you want to edit a jpg always save the edited file in a lossless format, like psd or tif.
The raw files are usually very large. On my current main camera a typical raw file is 50-70 MBytes. A high quality jpg of the same resolution is around 4-5 MBytes. So, 10 to 1 or greater differential. And the raw files require an investment of time and training and tools to process them into a respectable state.
But, and this makes up for everything, the raw file preserves every bit of information that we can wring out of the sensor. A modern sensor is marvelous and enables very aggressive processing. The raw format contains the full resolution of the pixels. It is not limited to 8 bit data like jpg. I often do things with the image data that I could not have envisioned when I took the original photo.
When would you want to use one vs. the other? Well, if I was shooting a wedding I would probably use jpg. Say I come away with 3000 images. I would want to be able to scan through and see good views of all of them so I can quickly pick the 100-200 best to share with the client. If I did my job well the images should not need much editing. I would not have time to process this many raw files.
Also, if I am shooting snaps of my family that is a time for jpgs. And if I was on vacation and just shooting travel photos for memories that is good jpg territory. I guess if my memory card was nearly full and I didn’t have a spare I might switch to jpg to keep shooting a few more frames. I try to prevent that from happening.
For me, any other time requires raw files. It is my go-to choice. I know I want to process the images heavily. I am not afraid of the techniques. Given the choice I will always want to retain the maximum information and resolution possible. This given me the flexibility to make massive changes or change my mind and go back to re-process the image for a different look
I tried to present a very neutral view of the tradeoffs of the 2 formats. I can sympathize that the choice is hard for some people. For me, it is straightforward. Use jpg if I am taking shots of people and I am confident it will need little processing. Otherwise, definitely raw.
The image with this article is a jpg. It looks fine for this application.