Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
JPEG Compression explanation
Jun 27, 2012 13:13:39   #
CaptainC Loc: Colorado, south of Denver
 
A few days ago we had a discussion on why/how multiple saves of a JPEG can degrade the image. The reason, as we saw, was that the compression takes areas of similar color and assigns those pixels all the SAME numbers. It keeps trying to simplify that image every time it saves. Eventually causing pixilation by having blocks of the same color.

Here are three examples of how jpg compression works. There are three images: complex, a gradient, and solid white. All three were 4x6 @ 300ppi (2,160,000 pixels).

I compressed each one at quality 12 and 6. The size differences are huge. So this is why all files are not the same size. The simpler the file, the less memory it takes for the file to be described. Not unlike having a canvas and equating the time it would take to paint it all white or paint a landscape.

The complex file at 12 is 2.7MB, the simple white file is only 164KB, yet both have exactly the same number of pixels.

So at least in theory, if we saved that complex file enough times, we would end up after many thousands of saves, with an image of all one color! Maybe hundreds of thousands of saves!



Reply
Jun 27, 2012 18:25:37   #
Festina Lente Loc: Florida & Missouri
 
Thanks CaptainC!
Have you ever considered writing a book?
Your explanations are so pleasantly pithy and succinct yet so easy to understand.
You are a natural teacher of things technical; a rare talent. Thanks for sharing it with us UHHs.

Reply
Jun 27, 2012 18:37:08   #
CaptainC Loc: Colorado, south of Denver
 
Festina Lente wrote:
Thanks CaptainC!
Have you ever considered writing a book?
Your explanations are so pleasantly pithy and succinct yet so easy to understand.
You are a natural teacher of things technical; a rare talent. Thanks for sharing it with us UHHs.


That is very nice off you to say....but no. That would be work!

Reply
 
 
Jun 28, 2012 16:21:52   #
BboH Loc: s of 2/21, Ellicott City, MD
 
Unless I'm too dense to get some other sense of what you said this seems to put to rest the agrument against using JPEG because of the quality lost when saving a JPEG that has been modified as a trivial stretch. Thank you, Sir!

Reply
Jun 28, 2012 16:26:59   #
CaptainC Loc: Colorado, south of Denver
 
BboH wrote:
Unless I'm too dense to get some other sense of what you said this seems to put to rest the agrument against using JPEG because of the quality lost when saving a JPEG that has been modified as a trivial stretch. Thank you, Sir!


Just to be clear...this only addresses MANY JPEG compressions. Three or four saves at quality 11 or 12 will not make a meaningful difference. Several saves at quality 5 or 6 can make a hash of an image.

If you shoot JPEG, save it as a TIFF or PSD for processing, then make one more conversion for printing, you will see no degradation.

Reply
Jun 28, 2012 21:08:48   #
Soccershooter Loc: Indiana
 
This is why I love this place. Great info because someone with the knowledge cared enough to share.

Reply
Jun 28, 2012 22:46:37   #
william48 Loc: New Philadelphia,Ohio
 
yep you are correct Shooter

Reply
 
 
Jun 28, 2012 23:09:20   #
olcoach Loc: Oregon
 
Hi, Thanks captain. You managed to simplify a difficult concept. Mike

Reply
Jun 29, 2012 01:37:36   #
Quickflash Loc: Loganville, Ga
 
That is the best explanation I have seen of this anywhere. The Captain is The Man! Thanks, Captain.

Reply
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
Main Photography Discussion
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.