Tutorials
JPEG is often criticised, is this correct?

How Bad is JPEG?

22/02/2013
The Often Stated

• JPEG is a lossy compression technique

• Information is lost in saving

• Do not use JPEG for repeated saving

• Do not use JPEG for editing

The Truth?

•    If you do not alter the image or the JPEG Algorithm then successive saves do little or nothing. (Compression at minimum)

•    Example 60Mb Tiff image

•    Multiple JPEG save, read, save etc.

•    6.2Mb; 6.3Mb; 6.3Mb; 6.3Mb; 6.3Mb; 6.3Mb; 6.3Mb; 6.3Mb

•    Note the file size does not continue to reduce

•    Subtracting Number 2 from Number 1 gives a totally black image, and Number 8 from Number 1 gives a totally black image. This test shows no detectable difference with repeated read and saves.

Why?

•    The JPEG Algorithm looks at small areas of the image and performs a compression routine. Doing it again does nothing/little.

•    Ever tried zipping up a zipped up file?

Well that experiment didn’t count!

• Because I didn’t change anything

• So I am going to do a big edit

• Then I am going to do a JPEG save

• Then I will re-read the image

• Then I will do a big edit, JPEG save

• Etc. until I get bored


Let's take the image and do a bit of an edit

PA123915 900


Now save the file, bring the file out, reverse the edit, save the file and keep going until boredom occurs.
Here is the 5th edit

PA123915 5 900


Here is the 8th edit (Boredom Point)

PA123915 8 900


And just so you can see that continuous edits did not have a big detrimental affect, here is the area of edit, big.

sample-8th image


Another form of edit.

In this image the exposure has been increased in the JPEG version by +1.95 stops (It was supposed to be 2 stops but the cursor moved)

PA123915up 2 stop 900


In this image the exposure has been decreased by 1.95 stops on the above version.

PA123915up 2 stop down 2 stop 900


CONCLUSION

• Successive saves to a JPEG image with constant settings do not continue to create visible loss and degrade the image.

• Editing and saving does not produce dire effects in image quality

• JPEG is unjustly criticised.

• Just make sure you know what you are doing!

Update
I have seen a video in Lenswork on line where this question was discussed and demonstrated.
Whereas I subtracted the 1st and 8th and could see no difference in the Lenswork demo they then stretched the histogram of the difference to accentuate any differences and low and behold there were differences. So you can save repeatedly in JPEG and see the differences if you do something you would never do. I think the video showed that for all sensible purposes the repeated saving of a JPEG produces negligible changes.

The Lenswork conclusion is that the JPEG losses and JPEG quality is insufficiently different from the original image to matter to anyone. Lenswork draws the same conclusion about lossy DNG format

Rex