Docs, changelog for top/left overlayWith offset #473

This commit is contained in:
Lovell Fuller 2016-07-05 11:17:41 +01:00
parent 278273b5c3
commit c9d32e22d3
3 changed files with 11 additions and 2 deletions

View File

@ -400,8 +400,8 @@ sharp(input)
})
.raw()
.toBuffer(function(err, data, info) {
// data contains the raw pixel data representing the input image
// convolved with the horizontal Sobel operator
// data contains the raw pixel data representing the convolution
// of the input image with the horizontal Sobel operator
});
```
@ -457,9 +457,13 @@ Overlay (composite) a image containing an alpha channel over the processed (resi
`options`, if present, is an Object with the following optional attributes:
* `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`.
* `top` is an integral Number representing the pixel offset from the top edge.
* `left` is an integral Number representing the pixel offset from the left edge.
* `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.
If both `top` and `left` are provided, they take precedence over `gravity`.
```javascript
sharp('input.png')
.rotate(180)

View File

@ -30,6 +30,10 @@ Requires libvips v8.3.1
[#456](https://github.com/lovell/sharp/pull/456)
[@kapouer](https://github.com/kapouer)
* Add top/left offset support to overlayWith operation.
[#473](https://github.com/lovell/sharp/pull/473)
[@rnanwani](https://github.com/rnanwani)
* Add convolve operation for kernel-based convolution.
[#479](https://github.com/lovell/sharp/pull/479)
[@mhirsch](https://github.com/mhirsch)

View File

@ -96,6 +96,7 @@ the help and code contributions of the following people:
* [F. Orlando Galashan](https://github.com/frulo)
* [Kleis Auke Wolthuizen](https://github.com/kleisauke)
* [Matt Hirsch](https://github.com/mhirsch)
* [Rahul Nanwani](https://github.com/rnanwani)
Thank you!