Skip to content

Commit

Permalink
Docs: changelog and doc refresh for #3470
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Jan 16, 2023
1 parent 6d404f4 commit 286a322
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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`. 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. May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text. |

**Example**
```js
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Requires libvips v8.14.0
* Prebuilt binaries: prevent use of glib slice allocator, improves QEMU support.
[#3448](https://github.com/lovell/sharp/issues/3448)

* Add focus point coordinates to output when using attention based crop.
[#3470](https://github.com/lovell/sharp/pull/3470)
[@ejoebstl](https://github.com/ejoebstl)

* Reduce sharpen `sigma` maximum from 10000 to 10.
[#3521](https://github.com/lovell/sharp/issues/3521)

Expand Down
3 changes: 3 additions & 0 deletions docs/humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,6 @@ GitHub: https://github.com/antonmarsden

Name: Marcos Casagrande
GitHub: https://github.com/marcosc90

Name: Emanuel Jöbstl
GitHub: https://github.com/ejoebstl
2 changes: 1 addition & 1 deletion lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const bitdepthFromColourCount = (colours) => 1 << 31 - Math.clz32(Math.ceil(Math
* `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 attention as crop strategy also contains the center of the cropped region in the fields `attentionX` and `attentionY`.
* 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.
* @returns {Promise<Object>} - when no callback is provided
* @throws {Error} Invalid parameters
Expand Down

0 comments on commit 286a322

Please sign in to comment.