Google Guetzli compression algorithm squeezes more out of JPEGs

Image AP

Image AP

"That's why we're excited to announce Guetzli, a new open source algorithm that creates high quality JPEG images with file sizes 35% smaller than now available methods, enabling webmasters to create webpages that can load faster and use even less data".

Google said its new algorithm will create "high quality JPEG images with file sizes 35 percent smaller than now available methods". Smaller file sizes means less data is being transferred around the Internet and websites will load faster.

"This is similar to our Zopfli algorithm, which produces smaller PNG and gzip files without needing to introduce a new format", said Google. Called Guetzli, which is apparently Swiss German for cookie, the new JPEG encoder does its magic during the so-called quantization stage of image compression, which is when the encoder tries to strike a balance between removing detail to keep size down, without obliterating the source image.

Google says Guetzli can produce smaller file sizes with the same level of quality. The uncompressed image is on the left, the libjpeg version is in the middle, and the Guetzli version is on the right. This code is supposed to close the difference between the standard JPEG psychovisual modeling and the one that's used by Guetzli.

There's no shortage of JPEG compression tools on the market, of course, and many of them are arguably easier to use than Guetzli is at the moment. The key to doing so appears to be cutting down the file size of those pesky and sometimes bulky JPEG files. However, we're left with smaller-sized images that don't sacrifice quality, and these compressed images will shrink the time it takes Google to load websites and services, which is a good thing for both internet users and Google.

Note how the Guetzli compression on the right is smoother but lacks some richer colors of the libjpeg compression in the center. As a result, the company feels that it's worth the extra time to encode the file.

The JPEG encoder is open-source and available for you to download and implement in your own projects from this GitHub repository.

The downside to this methodology is that compression takes significantly longer than now available methods. "Although Guetzli may be too slow for many practical uses, we hope that it can show direction for future image format design", the researchers said.

Latest News