Quote:
Originally Posted by rogerg
The file had decreased in pixel size but had increased in filesize! This seems to confirm (without extensive testing) that the following is true: Newer/smarter software is able to compress a JPG at the same compression ratio to a smaller filesize. Perhaps newer software utilises smarter algorithims?
|
Hi Roger,
Unfortunately, this is not true and unfortunately a detailed explanation would
require considerable amount of time and background information.
JPEG falls into a class of lossy compression algorithms. At its heart there is
an algorithm we engineers refer to as a Discrete Cosine Transform (DCT),
which is similar to a Fast Fourier Transform (FFT). Essentially the DCT takes
information from the spatial domain into the frequency domain. Since the
lower frequency components contain the most information from a human
perception viewpoint, the lossy part of the JPEG algorithm includes a
stage called quantization where higher frequency components can be
pruned, hence reducing the amount of data storage required. Finally, a form
of compression known as entropy encoding is used to compress the data further.
Thus, the magic that occurs in the JPEG algorithm is far removed from
the number of pixels by number of pixels your image happens to be.
Keep in mind that since the image is encoded, another program is required
to decode it so as to display it on your computer screen or to allow your
printer to print it. As you can appreciate, if someone were to come up
with some new, clever proprietary encoding scheme, then other
programs would not be able to decode it.
By the way, JPEG treats color images as essentially three images in different
colors.
The above is greatly simplified, however, the key to understanding JPEG
is understanding that the DCT and quantization steps take place in the
frequency domain and not the spatial domain.
A good analogy is talking on a telephone. Though only a relatively
narrow band of frequencies are able to be transmitted down the
phone lines and the audio sounds "clipped", we usually can understand the
speaker at the other end, since the bulk of the frequency ranges that
contain information to the human ear are preserved.
Data compression is a very interesting topic with deep mathematical
and even philosophical underpinnings.
I hope this helps.
Best Regards
Gary Kopff
Wildcard Innovations Pty. Ltd.