Vincent Bockaert,

The most commonly used digital image format is JPEG (Joint Photographic Experts Group). Universally compatible with browsers, viewers, and image editing software, it allows photographic images to be compressed by a factor 10 to 20 compared to the uncompressed original with very little visible loss in image quality.

The Theory in a Nutshell

In a nutshell, JPEG rearranges the image information into color and detail information, compressing color more than detail because our eyes are more sensitive to detail than to color, making the compression less visible to the naked eye. Secondly, it sorts the detail information into fine and coarse detail and discards the fine detail first because our eyes are more sensitive to coarse detail than to fine detail. This is achieved by combining several mathematical and compression methods which are beyond the scope of this glossary but explained in detail in 123di.

A Practical Example

JPEG allows you to make a trade-off between image file size and image quality. JPEG compression divides the image in squares of 8 x 8 pixels which are compressed independently. Initially these squares manifest themselves through "hair" artifacts around the edges. Then, as you increase the compression, the squares themselves will become visible, as shown in the examples below, which are magnified by a factor 2.

100% Quality JPEG is very hard to distinguish from the uncompressed original which would typically take up 6 times more storage space.
80% Quality JPEG looks still very good, especially when bearing in mind that this crop is 2 times enlarged and that the file size is typically 10 times smaller than the uncompressed original. Notice some deterioration along the edges of the yellow crayon. Most digital cameras will use a higher quality level than 80% as their highest quality JPEG setting.
60% Quality JPEG. If you look carefully, you will notice some of the JPEG squares and "hair" artifacts around the edges. However, the unmagnified crop shows that the quality is sufficient for websites.
It is a great trade-off because the file size is typically 20 times smaller than the uncompressed original.
10% Quality JPEG shows serious image degradation with very visible 8 x 8 JPEG squares. The only benefit of this low quality level is that it illustrates what JPEG is doing in a more subtle way at higher quality levels. It is unlikely you will ever compress this aggressively. The example also shows that compression is most visible around the edges.

Practical Tips

  • When editing an image in several sessions, it is recommended to save the intermediate image in an uncompressed format such as TIFF or the editing program's native format (e.g. PSD for Adobe Photoshop or PSP for Paintshop Pro). If you save for instance an image in JPEG, close it, open it again and save it again in JPEG with the same quality setting, the file size will not reduce further, but quality will have degraded further. So only compress after all editing is done.
  • Cameras usually have different JPEG quality settings, such as FINE, NORMAL, BASIC, etc. Unless you shoot in RAW or TIFF, it is recommended to shoot in the hightest available JPEG quality setting. Note however that some cameras will compress more than others, even at their highest JPEG quality setting.

The compression article shows some numerical examples of file sizes.

This article is written by Vincent Bockaert,
author of The 123 of digital imaging Interactive Learning Suite
Click here to visit