Google's revealed details of a new JPEG encoder it calls “Guetzli” and which it says can shrink images by between 29 and 45 per cent without making them appreciably less pretty.
Google bothers with this stuff because it wants web pages to load faster, so that people use the web more and see more of its ads. To that end, the company has conducted research that suggests that around half of image requests to web sites are JPEGs, while images represent about two-thirds of web pages' size. Shrinking images therefore means faster downloads, less stress on networks and happier users.
Hence Google's previous efforts to build better compression like Zopfli and Brotlie. The latter was adopted by Microsoft in its Edge browser, a neat endorsement of wider appetite for better compression.
Guetzli, described as a ”Perceptually Guided JPEG Encoder” in an arXiv pre-press paper aims to shrink JPEGs “without impacting the perceived visual quality of the images.”
To do that, the encoder optimises images and then uses a Google-developed model of human vision called “Butteraugli” to figure out which of the resulting images cannot be distinguished from the original by the human eye.
The authors of the paper, all from Google Research Europe, say Butteraugli offers a “psychovisual metric” that takes into account the way we see. One that Guetzli exploits is that “the human eye has lower spatial resolution in blue than in red and green, and has next to no blue receptors in the high-resolution area of the retina. Thus, high frequency changes in blue can be encoded less precisely.”
The paper contains plenty more discussion of how our eyes and brains work together, but the guts of it is that when you optimise an image to make it look good to the eye, rather than look good to an algorithm, you can reduce the amount of data it occupies without making it look worse. That outcome's also possible because Guetzli produces homogeneous changes, rather than the occasional changes other encoders use and which produce obvious compression artefacts in images.
The algorithm's research team is hopeful their approach of optimising for the eye is worthwhile, writing that “although Guetzli may be too slow for many practical uses, we hope that it can show direction for future image format design.” ®