How does JPEG XL work?

In contrast to more traditional formats like JPEG, JPEG XL (JPEG Extended Range) is a cutting-edge image compression standard created to offer improved compression efficiency and greater image quality. Here is a concise explanation of how JPEG XL functions:

1. Prediction

JPEG XL starts the process by breaking the image down into discrete pixel blocks. Predictive coding is used to determine the pixel values within each block depending on the values of the pixels nearby. The picture data’s redundancy is decreased by this prediction step.

2. Transformation

Using the Discrete Cosine Transform (DCT), which is a method utilized in JPEG, the anticipated values are then transformed into the frequency domain. The data is further compressed and the high-frequency and low-frequency information is separated thanks to this processing.

3. Quantization

The modified coefficients are quantized, which means that in order to compress the file size, less significant image information is eliminated. With a more sophisticated quantization technique that adjusts to the image content, JPEG XL keeps important details while eliminating less important ones.

4. Entropy coding

Techniques, such as Huffman coding or the ANS (Asymmetric Numeral System), are then used to encode the quantized coefficients. These techniques improve compression by allocating shorter codes to values that appear more frequently.

5. Colour Transformation

JPEG XL has a wide range of support for many colour spaces, such as RGB, grayscale, and CMYK. Additionally, it can make use of other colour encodings, including YCbCr and ICCLab. Because of its adaptability, it can accomplish good compression for a variety of image types.

6. Spatial and frequency domains

Data in the spatial and frequency domains are retained by JPEG XL, making it possible to manipulate images more effectively through cropping, scaling, and lossless rotation.

7. Variable Compression

In JPEG XL, users can choose between lossless and lossy compression with different quality levels. In doing so, they are able to balance the size of the file with the quality of the images.

8. Progressive Encoding

JPEG XL supports progressive encoding, which enables an image to be presented initially in a low-quality state before becoming more refined as further data is loaded. For web applications where quick image loading is necessary, this feature is especially helpful.

9. Chroma Subsampling

JPEG XL and JPEG can both use chroma subsampling to lessen the amount of colour information in an image. However, it applies this technique to other aspects of the image in a more flexible and adaptive manner.

In conclusion, JPEG XL is a modern image compression format that integrates a variety of approaches to accomplish effective compression while giving better image quality than earlier formats like JPEG. Predictive coding, sophisticated quantization, adaptive methods, and support for a wide range of colour spaces and encodings are used to achieve this.