Scroll to navigation

DJXL(1) User Commands DJXL(1)

NAME

djxl - decompress JPEG XL images

SYNOPSIS

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

DESCRIPTION

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".

OPTIONS

-h, --help

Displays the options that djxl supports.

-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.

EXAMPLES

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

SEE ALSO

cjxl(1)

Debian manual

The following additional man page generate from help2man --help-option="--quiet --help -v -v" djxl

NAME

djxl - manual page for djxl 0.13.0

SYNOPSIS

djxl INPUT OUTPUT [OPTIONS...]

DESCRIPTION

INPUT
The compressed input file (JXL). Use '-' for input from stdin.
OUTPUT
The output format can be PPM, PNM, PFM, PAM, PGX, PNG, APNG, JPEG, EXR To extract metadata, use output format EXIF, XMP, or JUMBF. The format is selected based on extension ('filename.png') or can be overwritten by using --output_format. Use '-' for output to stdout (e.g. '- --output_format ppm')

Basic options:

--output_format=OUTPUT_FORMAT_DESC

Set the output format. This overrides the output format detected from a potential file extension in the OUTPUT filename.

Must be one of png, apng, jpg, jpeg, npy, pgx, pam, pgm, ppm, pnm, pfm, exr, exif, xmp, xml, jumb, jumbf when converted to lower case.

-V, --version

Print version number and exit.

--quiet

Silence output (except for errors).

-v, --verbose

Verbose output; can be repeated and also applies to help (!).

Advanced options:

--num_threads=N

Number of worker threads (-1 == use machine default, 0 == do not use multithreading).

--bits_per_sample=N

Sets the output bit depth. The value 0 (default for PNM) means the original (input) bit depth. The value -1 (default for other codecs) means it depends on the output format capabilities and the input bit depth (e.g. decoding a 12-bit image to PNG will produce a 16-bit PNG).

--display_nits=N

If set to a non-zero value, tone maps the image the given peak display luminance.

--color_space=COLORSPACE_DESC

Sets the desired output color space of the image. For example:

--color_space=RGB_D65_SRG_Per_SRG is sRGB with perceptual rendering intent

--color_space=RGB_D65_202_Rel_PeQ is Rec.2100 PQ with relative rendering intent

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

If the input JXL stream contains hints for target downsampling ratios, only decode what is needed to produce an image intended for this downsampling ratio.

--allow_partial_files

Allow decoding of truncated files.

-j, --pixels_to_jpeg

By default, if the input JXL is a recompressed JPEG file, djxl reconstructs that JPEG file. This flag causes the decoder to instead decode to pixels and encode a new (lossy) JPEG.

-J, --reconstruct_jpeg

Losslessly reconstruct a JPEG if possible, and fail otherwise.

-q N, --jpeg_quality=N

Sets the JPEG output quality, default is 95. Setting this option implies --pixels_to_jpeg.

Options for experimentation / benchmarking:

--num_reps=N

Sets the number of times to decompress the image. Useful for benchmarking. Default is 1.

--disable_output

No output file will be written (for benchmarking)

--output_extra_channels

If set, all extra channels will be written either as part of the main output file (e.g. alpha channel in png) or as separate output files with suffix -ecN in their names. If not set, the (first) alpha channel will only be written when the output format supports alpha channels and all other extra channels won't be decoded. Files are concatenated when outputting to stdout. Only has an effect when decoding to (A)PNG or PPM/PNM/PFM/PAM

--output_frames

If set, all frames will be written either as part of the main output file if that supports animation, or as separate output files with suffix -N in their names. Files are concatenated when outputting to stdout.

--use_sjpeg

Use sjpeg instead of libjpeg for JPEG output.

--norender_spotcolors

Disables rendering of spot colors.

--no_coalescing

Disables coalescing of layers.

--preview_out=FILENAME

If specified, writes the preview image to this file.

--icc_out=FILENAME

If specified, writes the ICC profile of the decoded image to this file.

--orig_icc_out=FILENAME

If specified, writes the ICC profile of the original image to this file This can be different from the ICC profile of the decoded image if --color_space was specified.

--metadata_out=FILENAME

If specified, writes metadata info to a JSON file. Used by the conformance test script

--background=#NNNNNN

Specifies the background color for the --alpha_blend option. Recognized values are 'black', 'white' (default), or '#NNNNNN'

--alpha_blend

Blends alpha channel with the color image using background color specified by --background (default is white).

--print_read_bytes

Print total number of decoded bytes.

-h, --help

Prints this help message. All options are shown above.
November 2026 djxl 0.13.0