mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add pageHeight and pages to anim output response #3411
This commit is contained in:
@@ -24,7 +24,7 @@ A `Promise` is returned when `callback` is not provided.
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| fileOut | <code>string</code> | the path to write the image data to. |
|
||||
| [callback] | <code>function</code> | called on completion with two arguments `(err, info)`. `info` contains the output image `format`, `size` (bytes), `width`, `height`, `channels` and `premultiplied` (indicating if premultiplication was used). When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`. When using the attention crop strategy also contains `attentionX` and `attentionY`, the focal point of the cropped region. May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text. |
|
||||
| [callback] | <code>function</code> | called on completion with two arguments `(err, info)`. `info` contains the output image `format`, `size` (bytes), `width`, `height`, `channels` and `premultiplied` (indicating if premultiplication was used). When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`. When using the attention crop strategy also contains `attentionX` and `attentionY`, the focal point of the cropped region. Animated output will also contain `pageHeight` and `pages`. May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text. |
|
||||
|
||||
**Example**
|
||||
```js
|
||||
@@ -59,6 +59,7 @@ See [withMetadata](#withmetadata) for control over this.
|
||||
- `info` contains the output image `format`, `size` (bytes), `width`, `height`,
|
||||
`channels` and `premultiplied` (indicating if premultiplication was used).
|
||||
When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`.
|
||||
Animated output will also contain `pageHeight` and `pages`.
|
||||
May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text.
|
||||
|
||||
A `Promise` is returned when `callback` is not provided.
|
||||
|
||||
@@ -6,6 +6,9 @@ Requires libvips v8.15.2
|
||||
|
||||
### v0.33.5 - TBD
|
||||
|
||||
* Add `pageHeight` and `pages` to response of multi-page output.
|
||||
[#3411](https://github.com/lovell/sharp/issues/3411)
|
||||
|
||||
* Ensure option to force use of a globally-installed libvips works correctly.
|
||||
[#4111](https://github.com/lovell/sharp/pull/4111)
|
||||
[@project0](https://github.com/project0)
|
||||
|
||||
Reference in New Issue
Block a user