It’s a common problem: A website’s text is smudged with stray pixels. It’s as much fun as seeing white dog hairs on the black couch.
The culprit is the JPEG file format, which can compress graphics so they load faster on your PC and eat up less of your phone’s monthly data plan. There have been lots of efforts to do better — Microsoft’s JPEG XR and Google’s WebP and RAISR among them — but their success has been limited by the ubiquity of JPEG support.
Now Google thinks it’s found a better way to compress JPEG. In research published Thursday, it details technology called Guetzli that cuts JPEG file sizes by 35 percent in its testing. The idea isn’t to replace JPEG, but tweak its settings to minimize the likelihood we’ll notice problems when files are squeezed.
Smaller file sizes might seem an arcane technology concern, but they’re crucial to fast-loading websites. The average web page has ballooned from about 1 megabyte five years ago to about 2.5MB today, according to the HTTP Archive, and bigger pages load slowly. The faster the web page, the happier everyone is: Speed means we buy more online, read more news pages and spend more time checking friends’ social network activity.
For Google’s Guetzli speed boost, researchers developed a test called Butteraugli designed to model human vision. Compression works by throwing out data that we won’t notice is missing, and the point of Butteraugli is to automate testing of different compression settings. Guetzli fiddles with two particular parts of JPEG compression — discrete cosine transform, which governs how details like object edges are recorded, and quantization, which governs which colors are preserved and which are sacrificed to cut file size.
“Butteraugli takes into account … properties of vision that most JPEG encoders do not make use of,” Google researchers said in a Guetzli research paper (PDF). They validated their results in a separate study detailing tests of Butteraugli with actual people (PDF).
That automation is key. Guetzli works by producing multiple candidates of compressed JPEGs and then comparing them to see which is best. If you want to try it, Google released Guetzli for free as open-source software.
Google isn’t the only one trying this approach. Mozilla, maker of the Firefox web browser, began a project in 2014 called Mozjpeg designed to improve on standard compression engines. Google’s tests showed that Guetzli outdoes Mozilla’s tool by 29 to 45 percent.
There’s no free lunch here, though. Guetzli may indeed produce better perceived quality at a given file size, but note for example how some green areas are washed out in the eye comparison image above. And although Google compared Guetzli to mozjpeg and another JPEG encoder called libjpeg, there are other options, too.
Another problem: speed of compressing images. “Guetzli is rather slow to encode,” the researchers said, suggesting it’s most likely useful on image-heavy websites. “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.
It’s Complicated: This is dating in the age of apps. Having fun yet? These stories get to the heart of the matter.
Batteries Not Included: The CNET team reminds us why tech is cool.