prophotolife dot com banner   
Custom Search


  

rss subscribe blue
starting a photo biz pdf
ppl video library
ppl discussion forum

tech: RAW vs. JPEG - the real story

April 29, 2008 – 12:30 am

In the “Keeping up with Joneses” Department: Apple just released this new iMac, 3.06 Ghz processor and all…


Apple Store


There are lots of great reader comments on the tech article pages (the camera meter / histogram video, the battle of the bulbs shootout, studio color management, etc.). A couple of times it’s been pointed out that shooting RAW files (instead of JPEG) is advantageous for everything from color balance to exposure. This is very true. So before tackling some of those specific questions, I’d like to back up a little and show graphic illustrations of the difference between RAW and JPEG (also called JPG). Understanding this will help with an understanding of why correct exposure and white balance in the camera are important.

My camera is set to shoot RAW about 95% of the time. The reasons are many, too many to point out in one article so let’s hit the big ones, as far as I’m concerned. Using a pretty standard DSLR like a Canon 20D/30D/40D:

1. Think of your camera as having two components, a picture capture device and a picture processing device. When you shoot a RAW file the camera takes the capture and then stops there, it doesn’t process the image out. It’s up to you to process the image out later in software. You may then process that image out to an original JPEG, TIFF, psd, whatever you like, choosing your settings at that point. Let’s say you mistakenly had your camera set to daylight (outdoor) lighting when you were shooting under tungsten (indoor) lighting. No problem, since the file wasn’t processed out in the camera you can simply choose tungsten white balance in your software because you are just now doing the second part of the process. You then output an original image with the correct settings.

When you shoot directly to JPEG the camera both captures and processes out an original image to a set of specifications you’ve set in the camera (color balance, color saturation, contrast levels, etc.). You may have set the camera to normal levels or “punchy” color levels. If something was set wrong, like the color balance, you can’t simply reprocess the pixels in development, as you can with RAW. Yes, you can correct JPEG images in Photoshop. But there are problems with this…


Okay, it’s extreme time. I simultaneously shot a RAW (Canon CR2) file (left) and a large JPEG (right) of the same scene with a Canon 20D. These were shot with correct exposure but under tungsten light with the camera set to daylight color balance.
Here’s the RAW file, straight from the camera: ugly. The JPEG file looks much the same straight out of the camera.
raw tungsten jpeg tungsten
See the QPCard () in the middle of the scene? I put this RAW image into Photoshop CS2 (ACR), clicked the eyedropper on the gray square in the middle of the QPCard and voilá, it looks pretty darn good. Done with one correction to the RAW file. I opened the JPEG in CS2, opened Curves and clicked the gray square in the QPCard with the eye dropper to neutralize white balance. Ugh. Trying this simple correction has give some whacked out results. Way worse is that the highlights are magenta and the shadows are green, a terrible cross-curve that’s hard to correct.
converted raw tungsten jpeg tungsten corrected
Detail of the RAW file shows that it’s sharper (we would have expected that) but look at the smooth tonal gradations in the metal. All with one click to an initially poorly white balanced image. Noisy, off-color and not as sharp, the poorly color-balanced JPEG needs lots of love to make it acceptable. Way more than I’m willing to give.
tungsten correct raw tungsten correct jpeg

2. Cameras capture images in RGB (red, green and blue). With most cameras, RAW files are in 12-bit color (4096 shades each of red, green and blue) and JPEG files are in 8-bit color (256 shades each of red, green and blue). It’s like having a big box of crayons or a smaller box of crayons. Which one will give you the most realistic picture with the most tonality and subtle gradations? The bigger box of crayons.

But what if you are going to process that RAW file out to a JPEG anyway? Then both files end up as 8-bit in color anyway. Won’t they be the same? Here’s where RAW shines. If you make color, contrast and exposure corrections to a 12-bit RAW file in your software, then when you output it to JPEG the pixels are all in the right place, like a perfectly laid stone walkway.

Now let’s look at the camera-original JPEG. It’s like a stone walkway that’s already been laid out with all the pixels in place. Yes, you can rearrange the stones / pixels but compromises will be made by the software. It will have to interpret / interpolate colors and gradations in difficult areas. It is only pulling from an 8-bit palette so the color options are more limited than with RAW. You will see this in action in these underexposed photo examples.


On these shots the white balance is set correctly to tungsten. But now let’s mess up our exposure by underexposing by two stops. This is an extreme example but any underexposure does degrade the image.
RAW at -2 stops. JPEG at -2 stops. They look much the same
raw -2 stops jpeg -2 stops
Okay, in CS2 (ACR) I did a really quick correction to the file and processed it out. This has pretty darn good shadow detail for being so poorly exposed in the first place. We can thank all that information in the 12bit RAW file! In CS2 I did a quick curve correction to the JPEG and got the highlights and midtones looking acceptable. But where’s the shadow detail? There’s not as much info to pull from when starting with an 8bit original.
corrected raw -2 stops corrected jpeg -2 stops
Here’s the real proof. Way more detail, sharpness and less noise in the shadows. The JPEG can’t compete with the RAW. With more work it could look a little better but it’s clearly outclassed.
minus 2 raw detail minus 2 jpeg detail

3. JPEGs are digital information that has been compressed. That’s okay if it’s been compressed at a high level of quality and your settings are all correct. But if you make changes to the JPEG then save it again as a JPEG you are compressing the digital information even further. Each time you do this you are throwing away information. Now think about if you resize your images, making them smaller or larger. You are adding or subtracting pixels. That requires that the software make choices and compromises, throwing out some information or adding more. Each time you make a change to a JPEG you are compromising the information.

With RAW files you can take the RAW image and make all of your choices about size, color, contrast, etc., and then output it to a new original each time (which might be a JPEG). This is greatly aided by the fact that there’s 12-bit color. The software can make easier choices and less compromises. Nice.

And if you don’t like the image, just go back to the RAW file and reprocess it out how you want it. Look at that, it can be a very different but totally original image with uncompromised information. You can create endless originals from the RAW file, all with solid, full information, regardless of your processing choices. Amazon has great resources for exploring various digital RAW workflows.

3. I really think we’re in the stone ages of digital photography. That’s another reason I shoot RAW. Since I’m processing the files out in software (and not the camera) I’m also thinking there could be a great advance in RAW processing software someday. Wouldn’t it be great to have this RAW, uncompromised digital information and be able to output it to even higher quality because of an advance in software?

Check out the examples and see if it makes sense. I hope this has been a help. If it has, please let a friend know. If it hasn’t, please let me know!

Thanks,
Jim T.




Related Posts:
  • tech: getting more from RAW
  • digital workflow: working files
  • digital workflow: image processing
  • digital workflow: image selection
  • digital workflow: preserve those captures
  • If this article was helpful then please consider subscribing to pro photo life by email or full feed RSS.

    1. 9 Responses to “tech: RAW vs. JPEG - the real story”

    2. Really great post Jim. I shoot RAW, and understand the benefits, but I’ve never seen such side-by-side comparisons of post processing of JPG and RAW. Well done!

      By Bob on Apr 29, 2008

    3. Great post that nicely lays out only some of the benefits of shooting RAW. And you didn’t even mention that some cameras are allowing you to process 14-bit RAW files now, allowing for even smoother gradients and more information!

      By Richard on Apr 29, 2008

    4. There are lots of (sometimes heated) debates about RAW vs. JPG, but this is the first time I’ve seen anyone put some action behind their argument and demonstrate it with pictures. Nicely done!

      On my camera the RAW files come out a little bit softer than the JPGs rather than sharper. Why? Because the camera’s image processing also sharpens. However, there is still lots more *detail* in the RAW file.

      Besides, I’d rather decide for myself how I’d like to sharpen it. No offense to my camera, but my PC has more processing power and better algorithms at hand.

      By NormMonkey on Apr 29, 2008

    5. Nice article, but I wish the examples had been clickable, to see them bigger. Can’t tell to much the way they are shown.
      Keep up the good work!

      By Danny on Apr 29, 2008

    6. I understand what a help it would be to have the images bigger and definitely want to make it happen. It’s pretty involved to make it work from inside the site but posting them to an external source, like flickr, should work great. I’ll try to do that tonight and will give notice in tomorrow’s post, in case anyone wants to backtrack and review them. Thanks, Danny! Comments help make the site better…

      By Jim Talkington on Apr 29, 2008

    7. Hi There, Jim

      as always, very informative, but I must echo Danny’s thoughts on clickability as I have pretty poor, for a photog, eyesight. Plus….plus, I’m in the middle of one of those RAW v Jpg sort of discussions. You know, them as get a tad heated at times! Not to be had in a bar! Anyway, you certainly did give something to consider, small piccies or no. I’m already looking forward to tomorrow’s post. Thanks, too, for noting what you did to acheive a particular result. I know it must be old hat to you pro guys, but it took me almost three months to figure CS2 out so that I could load a picture to work on without messing it up totally. There was the famous incident when I submitted a shot for a competition without really knowing what I was up to. I got all the size settings haywire, and ended up sending my submission at 27FEET long! I didn’t win.

      Catch up with you later,

      Doug. :-)

      By Doug Chinn on Apr 29, 2008

    8. great post.

      learned alot.

      By hector m. on May 3, 2008

    9. bookmarked your website.

      thanx

      By hector m. on May 3, 2008

    10. Just stumbled on this site and read a few articles, and watched a few vids, I love the way you explain things very much in my terms and don’t sound too technical.

      I rarely use RAW as I can shoot over 1,000 shots a day and it seems too much hassle to work with RAW and the extra time to process but this has got me rethinking!
      (I always shoot back to back RAW & Jpeg in case but usually just store the RAW untouched)

      Thanks for the very useable info.
      SimonD

      By SimonD on Jul 10, 2008

    Post a Comment

    All content on prophotolife.com is copyright 2008 prophotolife / Jim Talkington unless otherwise noted