Scroll to navigation

DJXL(1)   DJXL(1)


djxl - decompress JPEG XL images


djxl [options...] input.jxl [output]


djxl 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. If the JPEG XL input file contains an animation, multiple output files will be produced, with names of the form "output-framenumber.ext".


-V, --version

Print version number and exit


How many times to decompress.


The number of threads to use


Print timing information before exiting


Defaults to original (input) bit depth


Tone map the image to the luminance range indicated by --display_nits instead of performing a naive 0-1 → 0-1 conversion


Luminance range of the display to which to tone-map; the lower bound can be omitted


With --tone_map, how much to favor saturation over luminance


Defaults to original (input) color space

-s 1,2,4,8,16, --downsampling=1,2,4,8,16

Maximum permissible downsampling factor (values greater than 16 will return the LQIP if available)


Allow decoding of truncated files


Allow decoding more progressive steps in truncated files. No effect without --allow_partial_files

-j, --pixels_to_jpeg

By default, if the input JPEG XL contains a recompressed JPEG file, djxl reconstructs the exact original JPEG file if the output file has the .jpg (or .jpeg) filename extension. This flag causes the decoder to instead decode the image to pixels and encode a new (lossy) JPEG in this case.

-q quality, --jpeg_quality=quality

When decoding to .jpg, use this output quality. This option implicitly enables the --pixels_to_jpeg option.


print total number of decoded bytes


silence output (except for errors)

-h, --help

Displays the options that djxl supports.


# Decompress a JPEG XL file to PNG
$ djxl input.jxl output.png
# Reconstruct a losslessly-recompressed JPEG file
$ djxl lossless-jpeg.jxl reconstructed.jpeg

# Lossless compression

Lossless pixel compression only preserves the pixels losslessly, not the input bitstream. To check that the pixels are identical, one can do something like the following (if this says 0, then the maximum pixel error is 0, so it’s lossless):

# Lossless compression of PNG:
$ cjxl -d 0.0 input.png lossless.png
# Decompress a JPEG XL file to PNG
$ djxl lossless.jxl lossless.png
$ compare -metric pae input.png lossless.png null:
0 (0)