LinuxCommandLibrary

djxl

Encode or decode JPEG XL image files

TLDR

Decompress a JPEG XL image to another format

$ djxl [path/to/image.jxl] [path/to/output.ext]
copy

Display an extremely detailed help page
$ djxl [[-h -v -v -v -v|--help --verbose --verbose --verbose --verbose]]
copy

SYNOPSIS

djxl [options] input.jxl [output_file]

PARAMETERS

-h, --help
    Displays the help message and exits.

-V, --version
    Prints the version information and exits.

-v, --verbose
    Enables verbose output, showing more details about the decoding process.

-s, --silent
    Suppresses all output messages, except for errors.

-j num_threads, --num_threads=num_threads
    Specifies the number of threads to use for decoding, leveraging multi-core processors.

-P, --print_properties
    Prints detailed properties of the decoded image, such as dimensions, bit depth, and color space.

-r, --reconstruct_xyb
    Reconstructs the image from the internal XYB color space to linear sRGB, useful for analysis.

-m, --render_spotcolor
    Renders spot colors if they are present in the JPEG XL file.

--target_colorspace=colorspace
    Converts the output to a specific target color space (e.g., RGB_D65_SRG_REL_BT709, LINEAR_SRGB_D65).

--orig_bit_depth
    Outputs the image with its original bit depth if available, otherwise defaults to 8 or 16 bits.

DESCRIPTION

djxl is the reference command-line decoder for the JPEG XL image format (.jxl files). Developed as part of the libjxl library, it enables users to convert highly compressed .jxl images into more widely supported formats such as PNG, PPM, PGM, or PBM.

JPEG XL is a modern, open-source image codec designed for superior compression efficiency and rich features, including support for alpha channels, animations, HDR, and progressive decoding. djxl provides the core functionality to decompress these advanced image files, making their content accessible for viewing, editing, or further processing using other image tools. It's often used for validating JPEG XL encoding, converting files for broader compatibility, or integrating into larger image processing workflows.

CAVEATS

djxl's supported output formats (e.g., PNG, PPM) depend on how the libjxl library was compiled; some builds might have fewer options due to external library dependencies. While djxl is highly optimized, decoding large or complex JPEG XL images can still be CPU-intensive. It is a command-line utility, lacking a graphical user interface for direct interaction.

OUTPUT FORMATS

By default, djxl attempts to infer the output format from the output file extension (e.g., .png, .ppm). If no output file is specified, it may write to standard output or require a specific format definition. Supported formats generally include PNG, PPM, PGM, and PBM, which are common for raw pixel data or lossless conversions.

COLOR MANAGEMENT

djxl is designed to handle advanced color management features present in JPEG XL files, including embedded ICC profiles. It can perform color space conversions using the --target_colorspace option, ensuring accurate color reproduction when converting images for different display or processing environments.

HISTORY

djxl is an integral part of the libjxl project, which began development around 2017 with the goal of creating a universal next-generation image format. The JPEG XL standard itself (ISO/IEC 18181) emerged from a collaboration between Google and Cloudinary, combining features from their respective initiatives, Pik and FUIF. djxl serves as the reference decoder implementation, evolving alongside the standard to ensure accurate and efficient decompression of JPEG XL files.

SEE ALSO

cjxl(1), jxl(7), convert(1), identify(1)

Copied to clipboard