Jpegli, Google's new open source JPEG encoding library

Jpegli for advanced JPEG encoding


Google announced several days ago through a blog post the release of Jpegli, a new open source library that offers an advanced JPEG image encoder and decoder and which is designed to significantly improve image compression without compromising quality.

Jpegli, aims to significantly reduce the size of JPEG files while maintaining image quality and avoiding artifacts common in compressed images. The term "li" at the end of jpegli comes from Swiss German dialects and means "small", reflecting its focus on reducing the size of JPEG files.

Jpegli Features

A notable feature of Jpegli is that It is a little better than WebP thanks to its faster and higher quality compression, in addition to its ability to encode images with 10 or more bits per color component, while maintaining compatibility with existing JPEG decoders that only support 8 bits per color component. This ensures that jpegli-encoded images are fully compliant with the JPEG standard and compatible with conventional viewers and web browsers. Additionally, the library offers encoding speed comparable to libraries such as libjpeg-turbo and MozJPEG.

Of the features that stand out from Jpegli, the following are mentioned:

Compatibility and compression improvements

Jpegli maintains high compatibility with previous versions of the JPEG format, ensuring seamless integration into existing systems. Additionally, it offers an impressive 35% improvement in compression ratio at high quality settings, resulting in faster web page performance without compromising image sharpness.

Efficiency and performance improvements

Jpegli is superior to existing JPEG decoders as it has better efficiency and performance. The Jpegli encoder and decoder are fully interoperable and comply with the original JPEG standard. This means developers can integrate Jpegli into their existing workflows without sacrificing encoding speed or memory usage. Additionally, Jpegli's encoding speed is comparable to traditional approaches such as libjpeg-turbo and MozJPEG, ensuring optimal performance.

Image quality improvements

The library uses advanced techniques to accurately calculate intermediate results during image compression and decompression. This results in high-quality images with fewer visible artifacts and a sharper appearance. It also allows encoding with more than 10 bits per component, which further improves image quality by reducing banding artifacts in slow gradients.

Coding techniques

Jpegli incorporates a number of new techniques to improve image quality and reduce noise. These include four key elements to achieve greater compression without losing quality:

  1. Adaptive Quantization: Instead of using fixed quantization as in traditional JPEG files, jpegli uses adaptive quantization. This technique adjusts which elements of an image should be preserved based on image regions, reducing noise and keeping details intact. This allows for 35% compression without compromising quality.
  2. Improved Matrix Selection: Jpegli uses an improved selection of quantization matrices, which helps optimize image compression and quality. This improvement is based on the advanced matrix selection techniques used in libraries such as JPEG XL.
  3. Precise Calculations: The library performs precise calculations during the compression and decompression process, ensuring a faithful representation of the original image and avoiding the introduction of unwanted artifacts.
  4. Optional Advanced Color Space: Jpegli also offers the option to use an advanced color space, allowing for greater flexibility and accuracy in color representation, especially in images with a wide color gamut.

The most notable thing about jpegli is its focus on image quality. It uses advanced technologies to reduce noise and improve visual quality, applying more effective psychovisual modeling methods to minimize artifacts in the resulting images. These improvements are based on the adaptive quantization heuristics used in the JPEG XL project, as well as improved algorithms for quantization matrix selection and intermediate calculations.

If you are interested in knowing more about it, you can check the details In the following link and you can consult its source code In the following link.

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.