From 0894145284b42da3273c8120c686986a4ed4b725 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 12 Dec 2017 19:42:07 +0000 Subject: [PATCH] Changelog and doc refresh for #1038 --- docs/api-resize.md | 6 ++++++ docs/changelog.md | 4 ++++ docs/index.md | 1 + 3 files changed, 11 insertions(+) diff --git a/docs/api-resize.md b/docs/api-resize.md index b5ba414a..83ab85ba 100644 --- a/docs/api-resize.md +++ b/docs/api-resize.md @@ -94,6 +94,10 @@ then embed on a background of the exact `width` and `height` specified. If the background contains an alpha value then WebP and PNG format output images will contain an alpha channel, even when the input image does not. +**Parameters** + +- `embed` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** A member of `sharp.gravity` to embed to an edge/corner. (optional, default `'centre'`) + **Examples** ```javascript @@ -111,6 +115,8 @@ sharp('input.gif') }); ``` +- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid parameters + Returns **Sharp** ## max diff --git a/docs/changelog.md b/docs/changelog.md index de7fee77..10ffbeec 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -30,6 +30,10 @@ Requires libvips v8.6.0. [#1028](https://github.com/lovell/sharp/issues/1028) [@coffeebite](https://github.com/coffeebite) +* Add support for gravity option to existing embed feature. + [#1038](https://github.com/lovell/sharp/pull/1038) + [@AzureByte](https://github.com/AzureByte) + * TIFF output: switch default predictor from 'none' to 'horizontal' to match libvips' behaviour. ### v0.18 - "*ridge*" diff --git a/docs/index.md b/docs/index.md index 431bd852..d9e8d1b8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -104,6 +104,7 @@ the help and code contributions of the following people: * [Matt Parrish](https://github.com/pbomb) * [Matthew McEachen](https://github.com/mceachen) * [Jarda Kotěšovec](https://github.com/jardakotesovec) +* [Kenric D'Souza](https://github.com/AzureByte) Thank you!