JPEG XL - ArchWiki

Jump to content
From ArchWiki

From Wikipedia:JPEG XL:

  JPEG XL is a royalty-free raster-graphics file format that supports both lossy and lossless compression. It is designed to outperform existing raster formats and thus become their universal replacement.

## Usage

libjxl comes with the official encoder/decoder programs: cjxl and djxl. JPEG XL is also supported by imagemagick and ffmpeg. To convert existing formats to jxl losslessly use:

    $ cjxl input.jpg lossless.jxl

To display image metadata:

    $ jxlinfo input.jxl

Exiftool also supports jxl since 12.25, but might be limited by some metadata that needs to be decoded. `--compress_boxes=0` flag can be passed to cjxl to keep metadata uncompressed, making it possible for Exiftool to parse it.

For file de-duplication purposes, it might be desirable to get the checksum of the actual encoded image:

    $ exiftool -api ImageHashType=MD5 -ImageDataHash

## Support

Browsers:

- Firefox: set `image.jxl.enabled` to `true` in `about:config`.
- Chromium: enable flag `chrome://flags/#enable-jxl`.

Image viewers:

- Gwenview: install kimageformats
- nsxiv
- swayimg

Previewers:

- Dolphin: install kimageformats
- ueberzugppAUR

## See also

- Tutorials and updates about the support status of JPEG XL
- List of supported software
- Tracker for support status in software

Category:

- Image