Add mixed and minSize animation options for WebP output

This commit is contained in:
Lovell Fuller
2022-07-12 14:51:03 +01:00
parent 1b84ccbbe9
commit d247c02762
8 changed files with 49 additions and 1 deletions

View File

@@ -291,6 +291,8 @@ Use these WebP options for output image.
* `options.effort` **[number][12]** CPU effort, between 0 (fastest) and 6 (slowest) (optional, default `4`)
* `options.loop` **[number][12]** number of animation iterations, use 0 for infinite animation (optional, default `0`)
* `options.delay` **([number][12] | [Array][13]<[number][12]>)?** delay(s) between animation frames (in milliseconds)
* `options.minSize` **[boolean][10]** prevent use of animation key frames to minimise file size (slow) (optional, default `false`)
* `options.mixed` **[boolean][10]** allow mixture of lossy and lossless animation frames (slow) (optional, default `false`)
* `options.force` **[boolean][10]** force WebP output, otherwise attempt to use input format (optional, default `true`)
### Examples

View File

@@ -8,6 +8,8 @@ Requires libvips v8.13.0
* Drop support for Node.js 12, now requires Node.js >= 14.15.0.
* Add WebP `minSize` and `mixed` options for greater control over animation frames.
* Use combined bounding box of alpha and non-alpha channels for `trim` operation.
[#2166](https://github.com/lovell/sharp/issues/2166)

File diff suppressed because one or more lines are too long