Feature request: JPEG XL?

Started by johnrellis, June 13, 2024, 11:28:13 PM

Previous topic - Next topic

johnrellis

It would be great if Exiftool could report on the basic attributes of JPEG XL streams, e.g. compression type, color space, bits/component, etc.

Current output for the attached "text.jxl" generated by Lightroom Classic:
$ exiftool -a -G test.jxl
[ExifTool]      ExifTool Version Number         : 12.85
[File]          File Name                       : test.jxl
[File]          Directory                       : .
[File]          File Size                       : 238 kB
[File]          File Modification Date/Time     : 2024:06:13 20:16:17-07:00
[File]          File Access Date/Time           : 2024:06:13 20:17:20-07:00
[File]          File Inode Change Date/Time     : 2024:06:13 20:17:18-07:00
[File]          File Permissions                : -rw-r--r--
[File]          File Type                       : JXL
[File]          File Type Extension             : jxl
[File]          MIME Type                       : image/jxl
[File]          Image Width                     : 500
[File]          Image Height                    : 375
[File]          Exif Byte Order                 : Little-endian (Intel, II)
[Jpeg2000]      Major Brand                     : JPEG XL Image (.JXL)
[Jpeg2000]      Minor Version                   : 0.0.0
[Jpeg2000]      Compatible Brands               : jxl
[EXIF]          Exif Version                    : 0231
[XMP]           XMP Toolkit                     : Adobe XMP Core 7.0-c000 1.000000, 0000/00/00-00:00:00
[XMP]           Original Document ID            : uuid:CBCBD1B34E4ADE11A2208A25FC903E47
[XMP]           Document ID                     : xmp.did:6d146940-8df6-4716-ab95-9cee3d114adb
[XMP]           Instance ID                     : xmp.iid:6d146940-8df6-4716-ab95-9cee3d114adb
[XMP]           Metadata Date                   : 2024:06:13 20:16:17-07:00
[Composite]     Image Size                      : 500x375
[Composite]     Megapixels                      : 0.188


Phil Harvey

Hi John,

It was hard enough to extract the Width/Height from the codestream.  I'll look into this when I get a chance, but don't get your hopes up.  I can't find any good documentation on the JXL format.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

johnrellis

I guess that if it wasn't implemented it was probably not easy. I only noticed its lack when Lightroom Classic provided support for JPEG XL. Thanks.

kiefermat

Since the orientation of the image is part of code stream, I assume that is the reason that exiftool reports width and height interchanged in this image? https://github.com/libjxl/conformance/tree/master/testcases/sunset_logo

ExifTool Version Number         : 12.96
File Name                       : sunset_logo.jxl
Directory                       : Downloads
File Size                       : 218 bytes
File Modification Date/Time     : 2024:09:04 13:41:17+02:00
File Access Date/Time           : 2024:09:06 08:24:37+02:00
File Inode Change Date/Time     : 2024:09:06 08:24:35+02:00
File Permissions                : -rw-r--r--
File Type                       : JXL Codestream
File Type Extension             : jxl
MIME Type                       : image/jxl
Image Width                     : 1386
Image Height                    : 924
Image Size                      : 1386x924
Megapixels                      : 1.3

StarGeek

Exiftool reports what is in the file. It does not change the values based upon the Orientation tag. This is the same with all file types.

That said, exiftool doesn't read any other data in this file, including an Orientation. This may be because of a lack of freely available documentation.
Quote from: Phil Harvey on June 06, 2023, 04:20:56 PMMy development will be hampered by this, as well as the fact that the JXL file format specification is imprisoned by the ISO.  :( :(

Phil is currently away for about the next week, so he won't be able to comment until then.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

kiefermat

Ah, yes, you are right. Sorry, for the confusion.

Anyway, thank you all very much for continuosly improving exiftool and supporting more formats!

Phil Harvey

This is relatively low priority for me due to the high pain/gain ratio, but I'll keep this on my to-do list to look into extracting more image parameters if I get a chance.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

johnrellis

Meanwhile, a mediocre substitute is the "jxlinfo" command included in "libjxl". On Mac, install with "sudo port install libjxl".  Sample output:
$ jxlinfo -v dng-2.jxl
box: type: "JXL " size: 12, contents size: 4
JPEG XL file format container (ISO/IEC 18181-2)
box: type: "ftyp" size: 20, contents size: 12
box: type: "jxlp" size: 371, contents size: 363
JPEG XL image, 6954x4636, (possibly) lossless, 8-bit RGB+Alpha
num_color_channels: 3
num_extra_channels: 1
extra channel 0:
  type: Alpha
  bits_per_sample: 8
  alpha_premultiplied: 0 (Non-premultiplied)
have_preview: 0
have_animation: 0
Intrinsic dimensions: 6954x4636
Orientation: 1 (Normal)
Color space: 940-byte ICC profile, CMM type: "KCMS", color space: "RGB ", rendering intent: 0
box: type: "Exif" size: 978, contents size: 970
Uncompressed Exif metadata: 978 bytes
box: type: "xml " size: 14157, contents size: 14149
Uncompressed xml  metadata: 14157 bytes
box: type: "jxlp" size: 6812489, contents size: 6812481