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

Support JPEG XL #11

Open
roland-5 opened this issue Feb 27, 2022 · 5 comments
Open

Support JPEG XL #11

roland-5 opened this issue Feb 27, 2022 · 5 comments
Labels
enhancement New feature or request upstream Waiting on upstream crates

Comments

@roland-5
Copy link

If I understand correctly, wayshot by default save files as png and we can save as jpg extension too. I don't know if this is possible or would be enchantment you wanted in your project, but saving screenshots as JPEG XL (jxl) files would be awesome.

Very nice project!

@Shinyzenith
Copy link
Member

Yep this is possible and I'm willing to work on it once I gain enough knowledge about encoding with jxl.

@Shinyzenith
Copy link
Member

image-rs/image#1765
image-rs/image#1765

Related issues. I do not want to do any custom encoding / decoding right now to keep the codebase simple and easy to understand. If it does get implemented in image-rs then I'd be more than happy to expose libwayshot API calls for JXL.

@Shinyzenith Shinyzenith added upstream Waiting on upstream crates and removed good first issue Good for newcomers labels Jul 7, 2023
@murlakatamenka
Copy link

Yeah, JPEG XL is the real deal, especially with the recent 0.10 speedups of reference libjxl implementation, see here:

https://cloudinary.com/blog/jpeg-xl-and-the-pareto-front


My quick tests show that using is really-really fast (Hyprland, wayshot compiled with -march=native, Ryzen 5600):

image


zune-image supports jpeg xl, but that's another story, right?

@Shinyzenith
Copy link
Member

That doesn't seem very fast from the numbers shown -- again I might be mistaken in my interpretation.
I'm generally against adding new crates to the dependency graph unless unavoidable. Does zune support interop with image crate types?

@murlakatamenka
Copy link

There are a few zune- crates behind feature flags for image-rs, so there is at least some reference of interop between those.

While jxl is cool, it shines brighter when encoding complex stuff like real world photos in high resolution, like shown in the article. And in lossy but visually lossless scenarios.


If we implement png optimization, then jxl gets less attractive for desktop screenshot case. Still an image format to look at, because it's like jpeg, but better in everything, and with lossless mode. Just needs more time and adoption (hello, Google Chrome).

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

No branches or pull requests

7 participants