jartz opened this issue on Nov 24, 2010 · 71 posts
bagginsbill posted Wed, 24 November 2010 at 9:46 PM
Quote - This is the article you guys should be looking at:
http://en.wikipedia.org/wiki/Generation_loss
In short, like pjz99 said, in some cases JPGs can work fine with multiple saves, in other cases they don't. The "don't" bit is usually when you edit the image, scale it or crop it etc, basically any change that causes the compression process to change increases the artifacts. Frankly it's just not worth the hassle and it's far easier to just use a lossless format instead.
As for the 100% thing, i'll just quote this bit from that JPEG article posted by Haarspalter:
"Since the quantization stage always results in a loss of information, JPEG standard is always a lossy compression codec. (Information is lost both in quantizing and rounding of the floating-point numbers.) Even if the quantization matrix is a matrix of ones, information will still be lost in the rounding step."
For the visually inclined, there are pics at both articles to see for yourself.
That statement is wrong. The quantization stage does not always result in a loss of information. It depends on whether the information already has experienced reduction or not.
You guys know I studied information theory at MIT and I am not a noob at math, right?
You also know that Wikipedia is a great resource but not everything written there is accurate, particularly scientific and math stuff, right?
Let me give you an analogy that perhaps will help you understand.
Suppose I decide to simplify the description of all the coins in all our pockets. Instead of recording how many quarters, dimes, nickels, and pennies each of us has, I replace all pennies with nickels (in groups of 5). Any odd pennies left over (0 to 4) we just ignore.
Now everybody empties their pockets and we rebuild everybody.
Who experiences coin "loss"?
Some have exchanged units of 5 pennies for nickels, and while they have fewer coins, they have the same amount of money as they started with.
Some have lost 1 to 4 cents.
But some pockets did not change at all! If they had no pennies to begin with, then the loss of data about how many pennies they had is irrelevent!
But in describing everybody's pockets without counting pennies, I have now reduced the coin counts per person from 4 counters to 3. That's a pretty good compression for a very small loss of information. In fact, we lost a lot of data but we did not lose information in all cases. This is an important distinction. Information loss does not always happen when data is reduced.
Now, let's suppose we record our pocket contents again and empty them. There are no pennies at all now, so no information is lost, by definition. We don't need to count pennies if we're starting with the premise that none of us have any pennies.
Rebuilding our pockets, we find that nobody has experienced any change at all.
We can do this an infinite number of times, ignoring pennies, and we'll experience no change because there are no pennies - forgetting things that don't exist anymore is not important.
In JPEG, the pennies are the high frequency components.
Losing them does not change the colors very much.
And once they've been removed, re-saving cannot remove them again - they don't exist anymore.
If you still don't understand the point, then I'll have to use the math and I doubt that will matter either, so just move on.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)