JPEG Compression

Manage your Photos: JPEG Photo Compression

Guetzli with compression charts

Guetzli is a tool developed by Google which slims down JPEGs without surrendering on quality. The software is written in C++.

Google claim a 20-30% reduction in file sizes compared with libjpeg. They also claim their tool strikes a balance between minimal loss and size by using a perceptual psychovisual algorithm that seeks to overcome the difference between JPEG’s and Guetzli’s psychovisual model.

There’s a quality setting. Guetzli has be called with quality >=84 (unless you want to edit the source code and recompile). This is because using a quality setting below 84 will generate artifacts in the output file. Compress an image with the following command:

$ guetzli --quality 84 file.jpg file-output.jpg

You can also set a memory limit with –memory. By default, Guetzli won’t use more than 6GB of RAM.

Let’s see the compression achieved with a couple of high resolution images.

JPEG Compression: Guetzli with 7.3MP image

With the recommended 84 quality setting, we see slightly more than 30% reduction in the file size with a 7.3MP JPEG.

Let’s see the results running the same test but with a 36MP image.

JPEG Compression: Guetzli with 36MP image

The 36MP original takes up 12,986,030 bytes. With the quality 84 setting, Guetzli reduces the file size to 5,423,131 bytes.

The quality of the images generated by Guetzli are truly excellent. We couldn’t distinguish between the original images and the output.

So what’s the catch? Guetzli focuses on image quality and compression at the expense of encoding speed. Let’s see the trade-off between compression and encoding time.

Next page: Guetzli – Time chart

Pages in this article:
Page 1 – Introduction
Page 2 – Guetzli – Compression charts
Page 3 – Guetzli – Time chart
Page 4 – MozJPEG – Compression charts
Page 5 – MozJPEG – Time chart
Page 6 – Lepton – Compression charts
Page 7 – Lepton – Time chart
Page 8 – Summary

Share this article

One comment

  1. According to the tests I made some years ago to be able to store efficiently invoices and other enterprise documents scans into a document management software without artifacts, even on very small letters, tests that I also extended to web sites pictures processing, here is what I found :

    using GIMP as the graphic manipulation program with a :
    * progressive .jpg encoding for slow connections enabled,
    * 4:4:4 Subsampling method,
    * Floating-point for the DCT method,
    * only exif data kept (no thumbnail or other orientation/dimensions system)
    *** and the most important feature : image colors indexed into a 256 colors optimized palette,

    the threshold not to cross to be absolutely sure there will be no artifacts in the final picture, nor color problems (except, of course, with gradations, that do not fit in this process) is : 65 %.

    My 2¢

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.