Wednesday, October 15, 2008

How bad is Jpg's lossy compression?

My workflow is:
  • Take photo in RAW format
  • Open in DPP
  • Make any large changes to brightness, contrast, saturation and brightness that are necessary in DPP
  • Convert the image to jpg
  • (Optional) Open the jpg in noise reduction software, reduce noise, re-save as jpg.
  • Open the photo in Gimp and make the rest of the changes that are necessary.
As you can see, I often save an image in jpg format 2-3 times (sometimes more). Actually piping up and telling people about it has recently stirred a debate about how bad of an idea my workflow is. Let me be clear: I agree that saving as png or TIFF would be better because they are non-lossy formats, but when I use these formats I loose my EXIF data. Because I've seen no quality loss in my photos as a result of re-saving them as jpg's, I've just adopted this as my workflow. Prints up to 11x14 are done and consistently show no issues with it.

Understanding the risks of using jpg allow me to tailor my workflow to reduce the common issues in jpg quality loss. First, I make all big changes in brightness, etc in DPP where I'm working with the RAW file and not the jpg. And second, I always save the jpg in 100% quality.

But some people aren't convinced that this workflow can yield good results (even though they can see all my photos at their full size on my Flickr account). So, I took a photo in jpg (fine) format on my Canon 30D, opened it in Gimp and re-saved it as a jpg at 85% quality (remember, I usually save as 100%). Then I opened the image in Paint.NET and re-saved it a 2nd time as a jpg at 85% again. I alternated between Gimp and Paint.NET in case the programs could tell the image was unchanged and out-smarted me by not actually re-running the compression on the image for the next save. In the end I re-saved the image 10 times between the two programs. A 100% crop of the result is shown below along side the same crop from the original jpg for comparison:

Jpg quality loss test
(click on the image to go to the Flickr page where you can see it at it's original size)

To be sure, there *is* a difference. Here's another comparison -done the exact same way, but at 800% magnification (when viewed at it's original size -click on the photo, then go to "All Sizes" > "Original" to view it at 800%):

Jpg lossy test #2

These tests show why I don't loose sleep over re-saving a jpg at 100% quality (all tests were done at 85% quality) one or two times in my workflow. ...I actually thought the difference would be much greater considering everything I've read via google on the matter!

I welcome discussion about the test itself as well as it's outcome in the comments here, on Flickr, or on the Photography_Beginners yahoogroup.

2 comments:

Anonymous said...

Hi Erica,

I am trying to contact you regarding the usage of one of your photos posted on Flickr, for a project I am working on. I will poke around your site(s), but please email me at:
stefancaiafa@hotmail.com so that I may contact you directly.

Thank you,
Stefan.

Anonymous said...

Thank you!
This article is rather reasuring. I also expected the quality to be much worse after 10 saves resulting in 10 compressions/decompressions. I know a graphics designer who swears he can even see the difference after one save, so I was rather worried.