Google has introduced Jpegli, a JPEG coding library that maintains high backward compatibility while offering enhanced capabilities and a 35 percent compression ratio improvement at high quality compression settings.
According to Google, the new JPEG coding library is designed to be faster, more efficient, and more visually pleasing than traditional JPEG. It employs several new techniques to deliver:
- Compatibility: Jpegli provides a fully interoperable encoder and decoder complying with the original JPEG standard and its most conventional 8-bit formalism, ensuring API/ABI compatibility with libjpeg-turbo and MozJPEG.
- High-quality results: When images are compressed or decompressed through Jpegli, more precise and psychovisually effective computations are performed, resulting in clearer images with fewer observable artifacts.
- Fast performance: While improving the image quality/compression density ratio, Jpegli’s coding speed is comparable to traditional approaches, allowing web developers to seamlessly integrate it into their existing workflows without sacrificing coding speed performance or memory usage.
- 10+ bits per component: Jpegli can be encoded with 10+ bits per component, addressing the visible banding artifacts in slow gradients caused by traditional JPEG coding solutions’ 8-bit per component dynamics. This 10+ bit coding happens in the original 8-bit formalism, ensuring full interoperability with 8-bit viewers.
- More dense compression: Jpegli compresses images more efficiently than traditional JPEG codecs, saving bandwidth, storage space, and speeding up web pages.
Jpegli achieves these improvements by using adaptive quantisation heuristics from the JPEG XL reference implementation, improved quantisation matrix selection, calculating intermediate results precisely, and the possibility of using a more advanced colorspace. These new methods have been carefully designed to use the traditional 8-bit JPEG formalism, ensuring compatibility with existing JPEG viewers.
To quantify Jpegli’s image quality improvement, Google enlisted the help of crowdsourcing raters to compare pairs of images from the Cloudinary Image Dataset ’22, encoded using Jpegli, libjpeg-turbo, and MozJPEG at several bitrates. The results showed that Jpegli at 2.8 BPP received a higher rating than libjpeg-turbo at 3.7 BPP, a bitrate 32 percent higher than Jpegli’s.
Google’s results demonstrate that Jpegli can compress high-quality images 35 percent more effectively than traditional JPEG codecs, making it a promising new technology that has the potential to make the internet faster and more beautiful.