Amazon Music Unlimited Offer: 1-Month For FREE!

Emailing Images

stolzy 15 3.8k 7
7 Feb 2008 3:23PM

Quote:create a new document say 1000 by 1000 pixels of a single colour, save as TIFF and JPEG and you will see a vast size difference.

True enough the tiff was 2.9MB and the hihhest quality jpg was 124K - mind you this (an image comprising a single colour) is about the best possible case for compression. Just out of interest, I had always understood that a highest quality jpeg only does lossless compression (and you can therefore regenerate the original exactly, unlike say a medium quality jpeg) - is that true?
mikeweeks 16 978 3 England
7 Feb 2008 3:49PM
JPEG compression removes redundant data and in certain circumstances such as the one colour image you will find no difference between the original and the compressed version converted back to a TIFF but this is an unusual set of circumstances.
Under normal use there will be some loss of data but there is a lossless form of JPEG. One way of describing what you can get is that it is visually lossless, i.e. to the eye there is no loss of information but a mathmatical comparison would show the differences. This can be done with layers in photoshop. Convert the JPEG back to a TIFF and copy the layer on top of the original TIFF and set the layer mode to difference.
So in normal use Chris is right but there are examples where his comment about it always throwing stuff away can be shown to be wrong.

stolzy 15 3.8k 7
7 Feb 2008 6:09PM
Ok, so its fundamentally different (even at the highest quality) to, say zip compression, which always restores the original bit-for-bit. Interesting.
jstock 13 2 Scotland
7 Feb 2008 9:11PM
Some interesting comments here. Jpeg compression is fundamentally different to something like zip, because jpeg understands how to throw away image data with minimal perceptual loss. So, wheras zip compression has to preserve all the data (because it has no clue what it would be throwing away), jpeg is always lossy to some extent. It basically works on 8x8 blocks at a time. If I remember right, it always downsamples the chroma data to some extent (so the a&b channels in lab mode would look a little fuzzier). It's then doing fourier analysis on each block and quantising the high-frequency data. In other words, it preserves fewer luminance levels in areas where the brightness changes abruptly. The amount of quantisation is linked to the jpeg quality level. After all that, Huffman encoding (which is lossless) is performed on the data stream.

If you look at a low quality jpeg image, you'll notice the 8x8 pixel blocking, and you'll also see nasty halos and noise around detail edges, which is an artifact of the quantisation of the fourier matrix.

Yes, I'm afraid I'm a bit of an anorak about these things, having once implemented a hardware accelerater for jpeg2000 decompression. I should get out more Smile

Cheers, Jon
uggyy 15 2.1k 9 Scotland
7 Feb 2008 9:33PM

Quote:So, wheras zip compression has to preserve all the data

Zip/archive compresses the data to a smaller format that it can extract to the original state using algorithms.

As you say Jstock jpeg on the other hand looks at the image and drops off data visually it thinks non essential to the integrity of the picture but it will degrade the image in many cases if too high a compression is set or if it is continually saved at compression time and again.

Sign In

You must be a member to leave a comment.

ePHOTOzine, the web's friendliest photography community.

Join For Free

Upload photos, chat with photographers, win prizes and much more.