JPEG Compression and image quality

greenspun.com : LUSENET : Imaging Resource Discussion : One Thread

On an Olympus C-2500L camera, images can be saved as uncompressed, High Quality (HQ JPEG is 14:1, 1600x1200 or SuperHigh quality (SHQ JPEG is 8:1, 1600x1200). Since both High Quality and SuperHigh Quality settings end up with the same 1600x1200(which I assume means the same number of pixels) the difference must be in the compression ratio. Can you explain how this ratio works and how it impacts quality? And how do they both end up with the same number of pixels anyway? Does the pixels in a High Quality JPEG as opposed to a SuperHigh Quality JPEG carry less information somehow?

Thank you, in advance, for you help in clearing up my confusion!

Amy Shaw

-- Amy Shaw (ashaw@fnac-usa.com), May 02, 2000

Answers

The "High quality" 14:1 mode that you mentioned is actually marketing speak for low quality. "Super high quality" is marketing speak for acceptable quality. Now that that's out of the way, I'll attempt to answer the question.

The JPEG file format uses what is known as "lossy compression". You start off with an image file that has all the information about detail and colour that the camera is capable of (uncompressed). Then, if you save it in JPEG format, that information is compressed to save memory or disk space. An 8:1 ratio, for example, means that the file becomes one-eighth the size of the original, but this doesn't mean that the image size is altered in any way.

In the compression process a lot of information, especially colour information, is thrown away, hence "lossy" compression. The JPEG format is too complicated to fully explain here, (even if I could) but briefly: The compression algorithm chops the picture up into small areas and saves only the most visually obvious colour and detail from each of those blocks, duplicating the colour "palette" from adjacent areas if they are within certain limits. The higher the compression ratio chosen the bigger the block, and the wider those limits become, until beyond about a 10:1 ratio the loss of quality becomes obvious, as spurious colour patches and fringes around the edges of objects appear. Also, if the JPEG file format is used repeatedly, for instance, to save images after editing, the quality loss quickly becomes unacceptable after only 2 or 3 generations.

To put it more simply, when the computer expands a JPEG file it gives the same number of pixels as the original, but the quality of those pixels is diminished by the compression.

I hope this has been of some use, and is more clear to you than it seems to me.

-- Pete Andrews (p.l.andrews@bham.ac.uk), May 03, 2000.


Moderation questions? read the FAQ