lovell / avif-cli

Command line utility to convert images to AVIF
Apache License 2.0
165 stars 18 forks source link

Support `effort` and deprecate `speed` option #11

Closed kidonng closed 2 years ago

kidonng commented 2 years ago

speed has been deprecated in sharp v0.30.0.

However I'm not sure about renaming the CLI option since it may be more "breaking" than the library itself. But this is up to you :)

lovell commented 2 years ago

Hello, thanks for the PR.

The value for effort is inversely proportional to speed - you can see how sharp converts from the latter to the former here:

https://github.com/lovell/sharp/blob/b10d8f89ca8190b3973a5c4c0e419be21eab3777/lib/output.js#L869

We should probably support both, and it looks like yargs has a deprecateOption feature we can use for this.

https://yargs.js.org/docs/#api-reference-deprecateoptionkey-msg-boolean

kidonng commented 2 years ago

Thanks for the helpful links! Let me know if the latest changes looks good to you :)

lovell commented 2 years ago

Thank you!

lovell commented 2 years ago

Published as v0.3.1, thanks again.