rehess wrote:
I'm not sure what you mean by "compression grid" here. After ten years of regularly using JPEGs, the only damage I've ever seen is the result of re-saving as JPEG, and therefore re-compressing. If I read a JPEG into PhotoShop or gimp, I can save many many times in the native format with no noticeable degradation.
Compression grid is how JPEG works it's magic. JPEG's job is to create redundancy in the data to allow compression. To do that the JPEG algorithm lays a grid (most commonly 8 pixels square) over the image. Photo data is dense and the odds are that in any one grid cell there will be 64 unique pixels. JPEG's job is to alter pixels so that when it's finished there are for example 32 unique pixels in the grid cell -- at very high compression rates maybe only 24 unique pixels, etc. It is brilliant and works beautifully. However once the job is done there's no going back and that compression grid is now part of the image -- think of it as embedded in the image.
JPEG degradation due to editing then occurs from two sources. 1. Re-saving and re-compressing can cause additional loss but it is the lesser of the two causes of degradation. 2. Changes to the tone and color of the image will interact with the original compression grid. For example you're trying to alter the color and density of the sky which is a gradient. The alteration you perform should preserve the original gradient but instead it runs into a stack of 6 pixels that are all the same. Originally they weren't but they are now. The edit then causes the compression grid that was previously hidden to start to become visible. This is the greater of the two causes of degradation and there's nothing to do to avoid it -- the original compression can't be undone.
Here's an example where you can see both types of damage.
What I did:
I selected an old camera JPEG from a 10 megapixel camera (Sony R1). The lower res of this test JPEG makes it easier to see what's happening. I selected a JPEG that needs the sky, a gradient, corrected. Changes made in the sand for example wouldn't show.
I opened the camera JPEG (copy), started a count and re-saved it re-compressing it and overwriting it. I closed it. I reopened it and I repeated 7 times total adding to the count each time.
I opened the camera JPEG (another copy) and immediately converted it to 16 bit and saved it as a TIFF file. I then opened and edited that TIFF file in ACR (parametric edit) increasing contrast and adjusting the sky color to blue.
Below you see first the original camera JPEG. Then an illustration which is a PNG file and so there is no additional lossy compression being applied to any of the three images there. The right image was compressed only once by the camera. The middle image is the camera original JPEG and the left image is the 7 times re-save and re-compress.
The 7 times re-save and re-compress did do additional damage but it's slight -- difficult to see the seam in the sky between it and the original. The real damage shows in the edited version that changed the tone and color of the sky. The mottled appearance you see there is very literally the original compression grid becoming visible as a result of the editing changes. Converting to a 16 bit TIFF before editing was of no value to prevent this 2nd (and more severe) type of JPEG degradation. Again note that the only lossy compression applied to that (right side) image was the original camera compression.
We have a modern advantage that I noted in my earlier post in this thread. Most of us now use 16, 24, 36 and even higher megapixel cameras. The same JPEG degradation due to editing occurs for the same reasons but it's much less visible at the higher resolutions we now use. In other words our butts are covered by megapixels.
Joe
EDIT: I popped over to 500px and found a breathtaking sunset that was originally a camera JPEG and got some pretty heavy editing. The JPEG degradation was visible on my screen at viewing res but not horrible. I copied it and enlarged a section of the sky to 400%, saved it as a PNG and posted it below. I present it here because rehess was curious about the compression grid. Look real close and you can actually see the JPEG 8x8 pixel grid cells in the sky. The heavy editing is literally causing the grid to lift up out of the photo and become visible -- we're not supposed to be able to see it -- that's the point.