mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose reoptimise palette option for GIF output
This commit is contained in:
@@ -321,10 +321,14 @@ Use these GIF options for the output image.
|
||||
|
||||
The first entry in the palette is reserved for transparency.
|
||||
|
||||
The palette of the input image will be re-used if possible.
|
||||
|
||||
### Parameters
|
||||
|
||||
* `options` **[Object][6]?** output options
|
||||
|
||||
* `options.reoptimise` **[boolean][10]** always generate new palettes (slow), re-use existing by default (optional, default `false`)
|
||||
* `options.reoptimize` **[boolean][10]** alternative spelling of `options.reoptimise` (optional, default `false`)
|
||||
* `options.colours` **[number][12]** maximum number of palette entries, including transparency, between 2 and 256 (optional, default `256`)
|
||||
* `options.colors` **[number][12]** alternative spelling of `options.colours` (optional, default `256`)
|
||||
* `options.effort` **[number][12]** CPU effort, between 1 (fastest) and 10 (slowest) (optional, default `7`)
|
||||
|
||||
@@ -8,6 +8,8 @@ Requires libvips v8.13.0
|
||||
|
||||
* Drop support for Node.js 12, now requires Node.js >= 14.15.0.
|
||||
|
||||
* GIF output now re-uses input palette if possible. Use `reoptimise` option to generate a new palette.
|
||||
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user