Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bit depth and number of color channels to JPEG XL #157

Open
eugenesvk opened this issue Oct 3, 2022 · 5 comments
Open

Add bit depth and number of color channels to JPEG XL #157

eugenesvk opened this issue Oct 3, 2022 · 5 comments

Comments

@eugenesvk
Copy link

Currently exiftool seems to support getting some information from a JPEG XL file, e.g.

File Type                       : JXL
File Type Extension             : jxl
MIME Type                       : image/jxl
Major Brand                     : JPEG XL Image (.JXL)
Minor Version                   : 0.0.0
Compatible Brands               : jxl
Image Width                     : 3072
Image Height                    : 2048
Image Size                      : 3072x2048
Megapixels                      : 6.3

while the native jxlinfo tool has some more useful fields

box: type: "JXL " size: 12
JPEG XL file format container (ISO/IEC 18181-2)
box: type: "ftyp" size: 20
box: type: "jxlc" size: 407395
JPEG XL image, 3072x2048, lossy, 16-bit RGB
num_color_channels: 3
num_extra_channels: 0
have_preview: 0
have_animation: 0
Intrinsic dimensions: 3072x2048
Orientation: 1 (Normal)
Color space: 512-byte ICC profile, CMM type: "appl", color space: "RGB ", rendering intent: 1

Would you please add the number of channels and bit depth per channel information as you have for some other formats as that's a rather useful info that's currently missing?

Thank you!

@boardhead
Copy link
Contributor

Aside from the fact that jxlinfo doesn't extract bit depth, it looks like the information you want is stored within the JXL codestream. I think that decoding this may be beyond the scope of ExifTool. (Have you looked at jxlinfo.c? It looks pretty complicated to me to extract this information.)

  • Phil

@eugenesvk
Copy link
Author

eugenesvk commented Oct 3, 2022

Thanks for a prompt response!

Aside from the fact that jxlinfo doesn't extract bit depth

what about 16-bit RGB?

it looks like the information you want is stored within the JXL codestream. I think that decoding this may be beyond the scope of ExifTool

Oh, ok, that makes sense if it's that complicated, I've opened an issue with the JPEG XL project to see whether it'd be possible to store such info as metadata during the encode so that there is no need to parse the complicated bitstream

Just to clarify — if the extra fields are added, then they'd be automatically picked up by your great tool, correct?

@boardhead
Copy link
Contributor

If the metadata was added then it would be easy for me to add support in ExifTool.

  • Phil

@eugenesvk
Copy link
Author

Ok, so I assume that it wouldn't get picked up automatically and require some work on your side. In that case maybe let's keep this issue opened, but blocked on JPEG XL encoder changes?

@boardhead
Copy link
Contributor

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants