Exif support
Does it copy the exif and color space metadata to jpeg xl from the original input?
Hi, Unfortunately for now that's not the case. You can see what's currently supported and what isn't in the table in the bottom of README. I couldn't find any way to add Exif metadata from high level libjxl api. I will be really grateful if someone smarter than me could figure out how to do it...
Just figure that out. Maybe it's possible to add exif/color profile metadata using exiftool after the jpeg xl file is created.
Oh really! It appears to be working fine. Mine ExifTool version is 12.26. This adds tag "rights" with value "AAA" into containerized JXL file.
$ exiftool -rights="AAA" a.jxl
It's also possible to copy all tags from one image to another. So probably that's a workaround for now but I really wanted to do that without external dependencies, it must be possible since cjxl does it but it's using entirely different api methods to do that.
Awesome. Good to know it's working.
I don't see that cjxl will handle those colorspace or metadata as it's purely a compression/decompression codec. ImageMagick internally also uses exiftool to handle those metadata as far as I know. For lossless compression, it will be very nice that you can have a mode to do bit-wise comparison with the original input image before deleting them.
I mean AFAIK cjxl supports copying Exif and XMP tags from original input into jxl container. It does that automatically if metadata is detected in source image. I'm not a JPEG XL developer so I have little idea on how things work internally but I've been experimenting with it for a while.
Get it.
Adding to this, you may need to use the -m flag so it adds the container if it's not present. For instance, I use this:
exiftool -m -artist="<PERSON>" -copyright="cc-by-nc-4.0 <ORGANIZATION>, 2022." -overwrite_original *.jxl
As for "copying from the original input", do you mean PIL Images in this case? https://stackoverflow.com/questions/17042602/preserve-exif-data-of-image-with-pil-when-resizecreate-thumbnail