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


Related Software

Console Based Image Compression Tools
MozJPEGMozilla JPEG Encoder Project
pngquantUtility and a library for lossy compression of PNG images
SVGONode.js library and command-line application for optimizing SVG files
OxipngMultithreaded PNG optimizer, forked from Optipng
libjxlReference implementation of JPEG XL
libjpeg-turboJPEG image codec
QOIThe Quite OK Image Format
YOGAYummy Optimizer for Gorgeous Assets
pngcrushOptimizer for PNG files
jpegoptimOptimize JPEG files. Lossless and lossy compression available
OptiPNGAdvanced PNG optimizer
GuetzliPerceptual JPEG encoder with excellent compression density at high quality
ECTFast and effective C++ file optimizer
CrunchLossy PNG image file optimization
zopflipngPNG optimisation tool using zopfli
JPEG ArchiveUtilities for archive JPEGs for long term storage
optimiztCLI image optimization tool
picoptMulti format lossless image optimize
tinifierCLI tool for compressing images using the TinyPNG API

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments