drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.53k stars 473 forks source link

Add support for JPEG XL #557

Open tballison opened 2 years ago

tballison commented 2 years ago

(Please include as much information as possible, and attach a sample image if possible.) I'm attaching two files, one with XMP and one with EXIF. They were both donated to the Apache Tika project by Tyler Thorsted.

https://issues.apache.org/jira/browse/TIKA-3562

http://fileformats.archiveteam.org/wiki/JPEG_XL

https://jpegxl.info/

tballison commented 2 years ago

jxl.zip

tballison commented 2 years ago

The larger two files were contributed by Tyler. The smallest file, I made with: https://github.com/surma/jxl-art/blob/main/LICENSE

StefanOltmann commented 6 months ago

Seems to be the format of the future. 👍

StefanOltmann commented 5 months ago

@drewnoakes

JXL, similar to HEIC and AVIF, is an ISO BMFF format. However, it distinguishes itself by incorporating dedicated boxes for Exif and XMP data.

Within my library, I have enhanced the HEIC image parser. It now includes a verification process where I inspect whether the major brand is 'jxl '. If this condition is met, the relevant information can be extracted from the 'Exif' and 'xml ' boxes.

https://github.com/Ashampoo/kim/blob/01fbb7825d3ccf53170c4625aad63b713614919e/src/commonMain/kotlin/com/ashampoo/kim/format/bmff/BaseMediaFileFormatImageParser.kt#L68-L69

https://github.com/Ashampoo/kim/blob/01fbb7825d3ccf53170c4625aad63b713614919e/src/commonMain/kotlin/com/ashampoo/kim/format/bmff/BoxReader.kt#L130-L134

Which approach would you prefer for metadata-extractor?

  1. Modifying the HeifReader specifically for handling the JXL case.
  2. Creating a modified copy of HeifReader dedicated to JXL, referred to as JxlReader.