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

JPEG XL support #41

Open
flozz opened this issue May 30, 2022 · 2 comments
Open

JPEG XL support #41

flozz opened this issue May 30, 2022 · 2 comments

Comments

@flozz
Copy link
Member

flozz commented May 30, 2022

See @nekohayo issue on YOGA Image Optimizer → flozz/yoga-image-optimizer#20

@nekohayo
Copy link

nekohayo commented Oct 31, 2022

Here's an example primitive implementation of a batch JPEG XL encoding script in Python: https://github.com/kylxbn/jxl-migrate

It simply calls the cjxl binary with the desired file, and passes -d 0 (mathematically lossless, gives you roughly 15-20% filesize saving when converting existing JPEGs) or -d 1 (visually indistinguishable lossy transcoding, gives you roughly 50 to 90% filesize reduction from a regular JPEG source, according to this man page). cjxl doesn't seem to have a parameter for resizing though, I don't know if that's a problem.

In case this is somehow helpful...

@flozz
Copy link
Member Author

flozz commented Nov 3, 2022

YOGA never call external binaries, it always use libraries directly. It avoid having to write temporary files and it is more reliable to target multiple systems (various Linux distro, Windows,...) :)

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