Expose reoptimise palette option for GIF output

This commit is contained in:
Lovell Fuller
2022-07-12 21:12:31 +01:00
parent d247c02762
commit 6288c7bced
7 changed files with 40 additions and 0 deletions

View File

@@ -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`)

View File

@@ -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.