Print

JPEG Compression

Instead of talking about JPEG-Compression and its artefacts I'd rather show them to you.

JPEG is a format for image files which where the file size can be significantly influenced. The smaller the file size is the worse will the picture look like, especially in its details. This is because the JPEG compression in general is destructive.

Strictly spoken there is a number of compression algorithms standardized and possible within JPEG files. It is currently being discussed to introduce some additional non-destructive algorithm to the JPEG specification. However, I don't want to go into details of what theoretically may be possible but want to focus on the most popular algorithm which is very widely used. When you just click on "save as jpeg" then this is most likely the algorithm that is being used.

To illustrate the impact of the quality parameter I created this small series of the same photograph that was just saved with various values for the quality parameter. Gimp uses a scale of %-Quality where 100% creates the largest files with the best quality. Further I have chosen "progressive, smooting 0, subsampling 4:4:4 (best quality), DTC method integer and no thumbnail.

Although the thumbnail (embedded within the JPEG meta data) is advantageous for managing your image files (File Explorer or Finder etc. can display their thumbs much faster) it blows up the size of the actual JPEG file. I did not include a thumb within these series so that you can take the effect of the %-Quality parameter directly from the file size without the thumbnail size blowing up the file.

The images are from 99% down to 10%. Please click on the thumb to enlarge it and see the actual influence of the %-Quality parameter on the actual quality of the image.

Imate (link) % Qual. File size in byte
   99 618.179
 98 462.935
 97 423.198
 90 223.672
 80 154.897
 70 122.707
 60 103.099
 50 89.425
 40 76.707
 30 63.394
 20 47.681
 10 29.123

I have chosen this example because it has lots of small details. Images like this are rather difficult for JPEG to achieve high compression rates. On the other hand it does have some rather monotone parties and gradients where you can see the impact that JPEG has on the quality. You should notice some artifacts there.

Although this example may not be representative for all images in the web, the series does show that the highest gains of image size savings are well above 90% while significant impact on the quality is only visible below 70% and is really visible to everybody below 50%.

Well, look for yourself.