JPEG XL - ArchWiki

Jump to content

# JPEG XL

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 (JPEG files are compressed losslessly by default) 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 (152+): set `image.jxl.enabled` to `true` in `about:config`.
- Chromium: Enable the flag `chrome://flags/#enable-jxl-image-format`.

Image viewers:

- Gwenview: install kimageformats
- nsxiv
- swayimg

Previewers:

- Dolphin: install kimageformats
- ueberzugpp

## See also

- Information and support status of JPEG XL
- List of supported software
- Tracker for support status in software

Category:

- Image

JPEG XL
Add topic