Google Announces Open Source JPEG Encoder

Google recently released a new open source JPEG encoder called Geutzli, that promises to reduce the size of high quality JPEGs by up to 35 percent, but at a price–longer encoding times.

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. However, while Guetzli creates smaller image file sizes, the tradeoff is that these search algorithms take significantly longer to create compressed images than currently available methods.

When Google says it takes “significantly longer to create compressed images than currently available methods,” they’re not exaggerating. John Gruber reported it took 8 minutes on a high-end Mac to compress a single iPhone camera image. Other reports on the Internet have suggested the process also consumes very large amounts of RAM while it is working its magic.