diff --git a/docs/api.md b/docs/api.md index bbd378d3..15df687a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -432,6 +432,7 @@ Overlay (composite) a image containing an alpha channel over the processed (resi * `gravity` is a String or an attribute of the `sharp.gravity` Object e.g. `sharp.gravity.north` at which to place the overlay, defaulting to `center`/`centre`. * `tile` is a Boolean, defaulting to `false`. When set to `true` repeats the overlay image across the entire image with the given `gravity`. +* `cutout` is a Boolean, defaulting to `false`. When set to `true` applies only the alpha channel of the overlay image to the image to be overlaid, giving the appearance of one image being cut out of another. ```javascript sharp('input.png') diff --git a/docs/changelog.md b/docs/changelog.md index e46a82af..3ac8cd46 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -18,6 +18,10 @@ Requires libvips v8.3.1 [#443](https://github.com/lovell/sharp/pull/443) [@lemnisk8](https://github.com/lemnisk8) +* Add cutout option to overlayWith feature, applies only the alpha channel of the overlay image. + [#448](https://github.com/lovell/sharp/pull/448) + [@kleisauke](https://github.com/kleisauke) + * Ensure scaling factors are calculated independently to prevent rounding errors. [#452](https://github.com/lovell/sharp/issues/452) [@puzrin](https://github.com/puzrin)