Images

libjxl – reference implementation of JPEG XL

In Operation

512 x 512 PNG

cjxl compresses an image or animation to the JPEG XL format. For a target quality, cjxl aims to offer a consistent visual result across different kinds of images, trying to choose sensible defaults.

$ cjxl 019-surfing.png 019-surfing.jxl

cjxl

The command has used the VarDCT compression algorithm, It’s almost lossless. The PNG image is 54K in size and the output JXL image is 31K.

If you want to change the defaults, delve into the various options. You may wish to change the quality and distance options.

cjxl options

For example, to convert our skiing penguin losslessly, use the -q 100flag. The -q 100 flag is the default for JPEG/GIF.

cjxl lossless

The output JXL image is 37K, slightly larger than 31K with the lossy defaults.

The corresponding program to cjzl is djxl, a tool which decompresses a JPEG XL image or animation. The output format is determined by the extension of the output file, which can be .png, .jpg, .ppm, .pfm.

Summary

JPEGXL is optimised for responsive web environments. It’s designed to meet the needs of image delivery on the web and professional photography. There’s support for wide colour gamut, high dynamic range and high bit depth images animated images, and embedded previews. It has features aimed at web delivery such as advanced progressive decoding and minimal header overhead, as well as features aimed at image editing and digital printing, such as support for multiple layers, CMYK, and spot colors.

JPEG XL offers significantly better image quality and compression ratios than legacy JPEG.

For more command-line image compression tools, explore our roundup. All free and open source goodness.

Website: github.com/libjxl/libjxl
Support:
Developer: JPEG XL Project Authors
License: BSD 3-Clause “New” or “Revised” License

libjxl is written in C++. Learn C++ with our recommended free books and free tutorials.

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments