Skip to content

jxl-oxide v0.11.0

Compare
Choose a tag to compare
@tirr-c tirr-c released this 28 Dec 07:24
· 4 commits to main since this release
45f7698

Version 0.11.0 of jxl-oxide comes with some bugfixes, optimization around noise features, Exif and XMP metadata extraction, and most importantly, JPEG bitstream reconstruction.

JPEG bitstream reconstruction

jxl-oxide can now reconstruct original JPEG file from losslessly recompressed JPEG XL file. By default jxl-oxide-cli will try to reconstruct JPEG if output file path is given and its extension is jpg or jpeg.

$ jxl-oxide recompressed.jxl -o out.jpg
2024-12-28T07:08:08.758724Z  INFO jxl_oxide_cli::decode: Reconstructing to JPEG
2024-12-28T07:08:08.863044Z  INFO jxl_oxide_cli::decode: Took 104.27 ms (35.36 MP/s)
$ jxl-oxide recompressed.jxl -o out.png
2024-12-28T07:08:14.769000Z  INFO jxl_oxide_cli::decode: Image dimension: 2560x1440
2024-12-28T07:08:14.788709Z  INFO jxl_oxide_cli::decode: Took 19.62 ms (187.89 MP/s)

If it fails to reconstruct, by default it will fallback to decoding to pixels. Use -f jpeg to exit on failure.

$ jxl-oxide normal.jxl -o out.jpg
2024-12-28T07:12:50.971337Z  INFO jxl_oxide_cli::decode: Reconstructing to JPEG
2024-12-28T07:12:50.971386Z ERROR jxl_oxide_cli::decode: Failed to reconstruct e=reconstruction data not found
2024-12-28T07:12:50.971421Z  WARN jxl_oxide_cli::decode: Falling back to decode-to-pixels
2024-12-28T07:12:50.971425Z  INFO jxl_oxide_cli::decode: Image dimension: 325x325
2024-12-28T07:12:50.994637Z  INFO jxl_oxide_cli::decode: Took 23.16 ms (4.56 MP/s)
$ jxl-oxide normal.jxl -o out.jpg -f jpeg
2024-12-28T07:12:58.974426Z  INFO jxl_oxide_cli::decode: Reconstructing to JPEG
2024-12-28T07:12:58.974474Z ERROR jxl_oxide_cli::decode: Failed to reconstruct e=reconstruction data not found
2024-12-28T07:12:58.974641Z ERROR jxl_oxide: failed to reconstruct: reconstruction data not found

When using jxl-oxide crate directly, use JxlImage::reconstruct_jpeg() to perform reconstruction.

Metadata extraction

While not yet available in the CLI tool, JxlImage::aux_boxes() can be used to retrieve Exif and XMP metadata. Exif metadata is also available in the image crate integration.


Added

  • Implement JPEG bitstream reconstruction (#390).
  • jxl-oxide: Extract (potentially Brotli-compressed) Exif metadata (#389).

Fixed

  • jxl-render: Fix panic in alpha blending without alpha channel (#403).

Full Changelog: 0.10.2...0.11.0