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: expose the 'method' encoding parameter #1545

Closed
skal65535 opened this issue Jan 14, 2019 · 5 comments
Closed

WebP: expose the 'method' encoding parameter #1545

skal65535 opened this issue Jan 14, 2019 · 5 comments

Comments

@skal65535
Copy link

skal65535 commented Jan 14, 2019

Hi,

looking at the WebP compression pameter (https://sharp.pixelplumbing.com/en/stable/api-output/#parameters_5), it seems that an important encoding parameter ('method') is lacking exposure.
See: https://developers.google.com/speed/webp/docs/api#advanced_encoding_api

'method' is used to specify the amount of efforts spent to further try and reduce the output size (both lossy and lossless).

While 'method' is the internal name, a better public name would be 'reduction_effort', i guess.

Thanks!
skal/

@lovell
Copy link
Owner

lovell commented Jan 14, 2019

Bonjour Pascal, merci beaucoup for all your work on WebP.

This will need to be exposed in libvips first - I'll take a look - are there any other important WebP encoding parameters you believe are missing?

@skal65535
Copy link
Author

Hi @lovell !

Oh, sorry i didn't know the lower layer was 'libvips'. I only looked around sharp code quickly, sorry.

I think 'method' is pretty much the main one missing, for everyday use.

Potentially, 'sharp_yuv' option, when doing RGB->YUV conversion, could be useful for avoiding some smearing of colorful edges (useful for comics, e.g.).
The option is also found in WebPConfig (see https://github.com/webmproject/libwebp/blob/master/src/webp/encode.h#L148)

Thanks again!
skal/

@lovell
Copy link
Owner

lovell commented Jan 15, 2019

I've added this to libvips via libvips/libvips#1212 for inclusion in the forthcoming libvips v8.8.0, after which we can expose it in sharp.

@skal65535
Copy link
Author

excellent! Thanks a lot @lovell .

@lovell
Copy link
Owner

lovell commented Jul 29, 2019

sharp v0.23.0 / libvips v8.8.1 is now available.

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

No branches or pull requests

2 participants