mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Docs: changelog and refresh for #2789
This commit is contained in:
parent
513fb40f40
commit
8c0660d71e
@ -283,9 +283,8 @@ Use these WebP options for output image.
|
||||
* `options.nearLossless` **[boolean][7]** use near_lossless compression mode (optional, default `false`)
|
||||
* `options.smartSubsample` **[boolean][7]** use high quality chroma subsampling (optional, default `false`)
|
||||
* `options.effort` **[number][9]** CPU effort, between 0 (fastest) and 6 (slowest) (optional, default `4`)
|
||||
* `options.pageHeight` **[number][9]?** page height for animated output
|
||||
* `options.loop` **[number][9]** number of animation iterations, use 0 for infinite animation (optional, default `0`)
|
||||
* `options.delay` **[Array][10]<[number][9]>?** list of delays between animation frames (in milliseconds)
|
||||
* `options.delay` **([number][9] | [Array][10]<[number][9]>)?** delay(s) between animation frames (in milliseconds)
|
||||
* `options.force` **[boolean][7]** force WebP output, otherwise attempt to use input format (optional, default `true`)
|
||||
|
||||
### Examples
|
||||
@ -322,9 +321,8 @@ The first entry in the palette is reserved for transparency.
|
||||
* `options.colors` **[number][9]** alternative spelling of `options.colours` (optional, default `256`)
|
||||
* `options.effort` **[number][9]** CPU effort, between 1 (fastest) and 10 (slowest) (optional, default `7`)
|
||||
* `options.dither` **[number][9]** level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most) (optional, default `1.0`)
|
||||
* `options.pageHeight` **[number][9]?** page height for animated output
|
||||
* `options.loop` **[number][9]** number of animation iterations, use 0 for infinite animation (optional, default `0`)
|
||||
* `options.delay` **[Array][10]<[number][9]>?** list of delays between animation frames (in milliseconds)
|
||||
* `options.delay` **([number][9] | [Array][10]<[number][9]>)?** delay(s) between animation frames (in milliseconds)
|
||||
* `options.force` **[boolean][7]** force GIF output, otherwise attempt to use input format (optional, default `true`)
|
||||
|
||||
### Examples
|
||||
@ -350,10 +348,7 @@ const gif = await sharp('animated.gif', { animated: true })
|
||||
width: 128,
|
||||
height: 128 * pages
|
||||
})
|
||||
.gif({
|
||||
pageHeight: 128,
|
||||
dither: 0
|
||||
})
|
||||
.gif({ dither: 0 })
|
||||
.toBuffer();
|
||||
```
|
||||
|
||||
@ -361,6 +356,10 @@ const gif = await sharp('animated.gif', { animated: true })
|
||||
|
||||
Returns **Sharp**
|
||||
|
||||
**Meta**
|
||||
|
||||
* **since**: 0.30.0
|
||||
|
||||
## jp2
|
||||
|
||||
Use these JP2 options for output image.
|
||||
|
@ -17,6 +17,10 @@ Requires libvips v8.12.1
|
||||
* Expose control over CPU effort for palette-based PNG output.
|
||||
[#2541](https://github.com/lovell/sharp/issues/2541)
|
||||
|
||||
* Improve animated (multi-page) image resize and extract.
|
||||
[#2789](https://github.com/lovell/sharp/pull/2789)
|
||||
[@kleisauke](https://github.com/kleisauke)
|
||||
|
||||
* Ensure 16-bit PNG output uses correct bitdepth.
|
||||
[#2958](https://github.com/lovell/sharp/pull/2958)
|
||||
[@gforge](https://github.com/gforge)
|
||||
|
File diff suppressed because one or more lines are too long
@ -507,6 +507,8 @@ function webp (options) {
|
||||
*
|
||||
* The first entry in the palette is reserved for transparency.
|
||||
*
|
||||
* @since 0.30.0
|
||||
*
|
||||
* @example
|
||||
* // Convert PNG to GIF
|
||||
* await sharp(pngBuffer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user