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

WebP output #15

Open
fallaciousreasoning opened this issue Oct 29, 2023 · 0 comments
Open

WebP output #15

fallaciousreasoning opened this issue Oct 29, 2023 · 0 comments

Comments

@fallaciousreasoning
Copy link
Collaborator

In #14 I updated wasm-thumbnail to output a PNG file, if the input file has transparency, as we were breaking Logos (and any other images with transparency). We don't output to a PNG when we have no transparency, as the quality/size tradeoff for photographs is much better in a JPEG than a PNG

@fmarier pointed out it would be ideal if the output format was unrelated to the original input image, and that we can solve two birds with one stone if we just use WebP. Unfortunately, the Rust image crate we're using doesn't have native WebP encoding support, and depends on the C based libwebp library.

I think it should be possible to compile that library in to our WASM binary (though I'm pretty hazy on the details). Maybe this is something we should look into?

(this seems strongly related to #7)

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

1 participant