JPEG XL libraries for Rust
- jxl-oxide is a JPEG XL decoder in pure Rust: no C dependencies, conformance-tested, with animation, HDR, color management and JPEG reconstruction. It plugs into the
imagecrate. It can’t encode. MIT or Apache-2.0. - jpegxl-rs binds libjxl, so it both decodes and encodes, including lossless JPEG recompression. It needs libjxl (system or vendored build). It’s GPL-3.0, which rules it out for many projects.
jxl (jxl-rs) is a newer pure Rust decoder from the libjxl team, BSD-3-Clause, built for use in web browsers. Its API is lower level and still changing. zune-jpegxl is a small lossless-only encoder.
Pick jxl-oxide to read JXL; pick jpegxl-rs when you must write lossy JXL and the GPL is acceptable.
- jpegxl-rs jpegxl-rs is a Rust binding to libjxl for encoding and decoding JPEG XL. Install it, decode and encode JXL, set quality and speed, recompress JPEG losslessly.
- jxl-oxide jxl-oxide is a pure Rust JPEG XL decoder. How to decode JXL files, convert JXL to PNG with the image crate, read frames and ICC profiles.