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

Integration into the image crate #162

Open
Shnatsel opened this issue Jan 3, 2024 · 8 comments
Open

Integration into the image crate #162

Shnatsel opened this issue Jan 3, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@Shnatsel
Copy link
Contributor

Shnatsel commented Jan 3, 2024

Would you be interested in adding jxl-oxide integration to the image crate?

It would be very convenient if users of image could decode jxl-oxide through its format-agnostic API without having to write code specific to JPEG XL themselves.

The format integrations are not complicated. For example, here's the qoi codec integration: https://github.com/image-rs/image/blob/master/src/codecs/qoi.rs

@Shnatsel
Copy link
Contributor Author

Shnatsel commented Jan 3, 2024

FWIW the zune-image library already uses jxl-oxide, but it is not as widely used as image because it supports fewer formats and its API is still unstable.

@Quackdoc
Copy link

Quackdoc commented Jan 3, 2024

this was rejected by image-rs maintainers image-rs/image#1979

I no longer plain on maintaining the PR to add it unless something changes

@Shnatsel
Copy link
Contributor Author

Shnatsel commented Jan 3, 2024

I see. Thank you!

@tirr-c tirr-c added the enhancement New feature or request label Jan 3, 2024
@Aerocatia
Copy link

Strange for a Microsoft employee to have such a hard-line stance on what denotes a "free" format. I would not hold my breath on this, unfortunately.

@Shnatsel
Copy link
Contributor Author

Shnatsel commented Jan 8, 2024

It is possible to provide APIs for easy interoperability with the image crate's types without having to modify the image crate itself. For example, https://crates.io/crates/turbojpeg does this behind the image feature.

If the integration PR is already written, perhaps it's best to just put the integration into this crate behind a feature flag instead.

@Quackdoc
Copy link

It is possible to provide APIs for easy interoperability with the image crate's types without having to modify the image crate itself. For example, https://crates.io/crates/turbojpeg does this behind the image feature.

this could be nice to have. Considering the maintainer of the image crate doesn't seem to want JXL inside of it, it may be the best route forwards or maybe a small shim crate.

@Quackdoc
Copy link

@Shnatsel I completely forgot to mention this a while ago, zune-image provides interop with the image crate, which is probably going to be good enough

@Shnatsel
Copy link
Contributor Author

zune-image stores all the channels in separate vectors. So if one were to load a JPEG XL image into zune-image and then back into image, it would waste CPU cycles and memory on deinterleaving and then interleaving the data right back.

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

No branches or pull requests

4 participants