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

Using signed integer data in JPEG XL #436

Open
richard-viney opened this issue Mar 22, 2025 · 1 comment
Open

Using signed integer data in JPEG XL #436

richard-viney opened this issue Mar 22, 2025 · 1 comment
Labels
question Further information is requested

Comments

@richard-viney
Copy link

Hi,

I'm curious about JPEG XL and signed integer data. I read that e.g. i16 data can be handled in JPEG XL, is this the case and if so is it exposed by jxl-oxide? Or do folks who need this usually just add a offset of 32768 and store it as unsigned data?

Thanks!

@tirr-c
Copy link
Owner

tirr-c commented Mar 23, 2025

Internally all Modular (lossless) images are stored in signed integer, but currently jxl-oxide clamps sample values to 0..65536 when they're returned as u16 from ImageStream. So as for now you'll need to add 32768 if you're using jxl-oxide for decoding. (However adding support for i16 samples is not that difficult.)

@tirr-c tirr-c added the question Further information is requested label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants