+
Skip to content

Conversation

Gigas002
Copy link
Contributor

This PR introduces support for encoding jpeg-xl, closes #11.
Since there's no yet support for jxl in image-rs current version temporary uses jpegxl-rs crate.

Note, that since there's no rust-native jxl encoder, this crate adds dependency for libjxl. I think we may need to make this [feature] flag instead?

Also, there are some options available for controlling jxl encoder, such as lossless, quality, speed. We can make it configurable via config.toml file, though do we really need to go that far? Right now encoder uses default settings, which creates visualy lossless results.

One more thing to note, that this PR only adds ability for creating screenshot file as jxl, for now, at least. The clipboard and stdout result will be a simple jpeg. I am not sure if we should change this behavior, actually.

@Gigas002 Gigas002 changed the title JPEG-XL support feat: add JPEG-XL encoding support Jun 25, 2025
@EwoutH
Copy link

EwoutH commented Sep 22, 2025

What's the plan with this PR?

@Gigas002
Copy link
Contributor Author

@EwoutH
It's usable in its current state, except for clipboard screenshot.
I'm not sure it should be merged rn with this dirty workaround, but at the same time jxl support in image-rs isn't moving at all.
For now, you can use this pr as patch file and build from master branch, with this patch applied, if you want to use this feature.

@roland-5
Copy link

image-rs/image#1765 and image-rs/image#1979 are closed. The image crate should now support jxl via the jxl-oxide crate, if I understand it corretly (image-rs/image#2372 and tirr-c/jxl-oxide#480)

@Gigas002
Copy link
Contributor Author

@roland-5 thanks, I'll check this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Support JPEG XL

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载