skip to content

System: Effects of quality setting in JPEG compression

Here you can see the effects of different compression levels on a simple JPEG image. In each case the image was created using ImageMagick's convert function on the command-line:

convert -quality $quality $inputfile JPG:-

The image in the top left is the original (quality of 100). The next image was generated using a quality value of 95 and so on down to the last image which has a quality of just 5. Notice that the text degrades quickly due to having sharp edges while the rest of the image remains 'bearable' at lower values:


[filesize: 32.0 kb]

[filesize: 15.7 kb]

[filesize: 10.8 kb]

[filesize: 8.6 kb]

[filesize: 7.3 kb]

[filesize: 6.4 kb]

[filesize: 5.9 kb]

[filesize: 5.4 kb]

[filesize: 5.0 kb]

[filesize: 4.7 kb]

[filesize: 4.5 kb]

[filesize: 4.2 kb]

[filesize: 3.9 kb]

[filesize: 3.7 kb]

[filesize: 3.3 kb]

[filesize: 3.0 kb]

[filesize: 2.6 kb]

[filesize: 2.2 kb]

[filesize: 1.7 kb]

[filesize: 1.1 kb]

The default quality setting used in ImageMagick is 85 (top right image).

The JPEG format is best used for photographs and similar images with 'millions' of colours. To optimise images with text or hard edges you should use PNG or GIF format instead.

References

< System

Post your comment or question
top