If there’s anything the lovable nerds in Silicon Valley have taught me, it’s that compression technology is indeed sexy.
Who am I kidding? It’s not, but compression technology is very practical.
As per Google’s Research Blog and GitHub, Guetzli-generated JPEG files are up to 35 percent smaller than most current JPEGs encoded with the widely-used libjpeg encoder. With smaller JPEG files, you’ll not only be able to store more pictures (and most importantly: selfies) on your phone and computer, but websites that use Guetzli-encoded JPEGs would also (at least, in theory) load faster.
If all of this sounds familiar — relax, you’re not losing your mind. In 2010, Google developed WebP, a new image format that could display pictures that are up to 34 percent smaller than JPEGs.
Unfortunately, WebP didn’t gain much traction because it was (and still is) only supported by Chrome and Opera. Safari, Firefox and Internet Explorer never bothered to support WebP, leaving it to essentially die.
Guetzli-generated photo files have no such incompatibility issues. It’ll display in all browsers because they’re just regular JPEG files.
How exactly does Guetzli create smaller JPEGs? Google Research’s explanation is highly technical:
The visual quality of JPEG images is directly correlated to its multi-stage compression process: color space transform, discrete cosine transform, and quantization. Guetzli specifically targets the quantization stage in which the more visual quality loss is introduced, the smaller the resulting file. Guetzli strikes a balance between minimal loss and file size by employing a search algorithm that tries to overcome the difference between the psychovisual modeling of JPEG’s format, and Guetzli’s psychovisual model, which approximates color perception and visual masking in a more thorough and detailed way than what is achievable by simpler color transforms and the discrete cosine transform.
In plain English, as ArsTechnica writes, Guetzli, like all JPEG encoders, tries to “reduce a large amount of disordered data, which is hard to compress, into ordered data, which is very easy to compress.” Smaller files are achieved by blurring together pixels that are similar, but only just enough to not distort the overall image’s structure.
Google says it asked people whether they preferred libjpeg-encoded JPEGs or Guetzli JPEGs and most picked the latter.
See for yourself:
The only downside to Guetzli is that it’s slower to encode JPEGs than with libjpeg. But since the files are so much smaller and there’s no real loss in image quality, Google says it’s worth the tradeoff.