Expose control over CPU effort for palette PNG #2541

This commit is contained in:
Lovell Fuller
2021-11-24 17:12:53 +00:00
parent 140eeebb3d
commit 72025051c5
7 changed files with 27 additions and 3 deletions

View File

@@ -243,6 +243,7 @@ Set `palette` to `true` for slower, indexed PNG output.
* `options.adaptiveFiltering` **[boolean][7]** use adaptive row filtering (optional, default `false`)
* `options.palette` **[boolean][7]** quantise to a palette-based image with alpha transparency support (optional, default `false`)
* `options.quality` **[number][9]** use the lowest number of colours needed to achieve given quality, sets `palette` to `true` (optional, default `100`)
* `options.effort` **[number][9]** CPU effort, between 1 (fastest) and 10 (slowest), sets `palette` to `true` (optional, default `7`)
* `options.colours` **[number][9]** maximum number of palette entries, sets `palette` to `true` (optional, default `256`)
* `options.colors` **[number][9]** alternative spelling of `options.colours`, sets `palette` to `true` (optional, default `256`)
* `options.dither` **[number][9]** level of Floyd-Steinberg error diffusion, sets `palette` to `true` (optional, default `1.0`)

View File

@@ -10,6 +10,9 @@ Requires libvips v8.12.0
* Reduce minimum Linux ARM64v8 glibc requirement to 2.17.
* Expose control over CPU effort for palette-based PNG output.
[#2541](https://github.com/lovell/sharp/issues/2541)
* Ensure 16-bit PNG output uses correct bitdepth.
[#2958](https://github.com/lovell/sharp/pull/2958)
[@gforge](https://github.com/gforge)