Expose linear transform feature of libvips (#1024)

This commit is contained in:
Marcel
2018-02-04 11:36:04 +01:00
committed by Lovell Fuller
parent 73edfb3d2c
commit d599d1f29e
15 changed files with 156 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
- [convolve](#convolve)
- [threshold](#threshold)
- [boolean](#boolean)
- [linear](#linear)
## rotate
@@ -321,3 +322,17 @@ the selected bitwise boolean `operation` between the corresponding pixels of the
- Throws **[Error](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid parameters
Returns **Sharp**
## linear
Apply the linear formula a \* input + b to the image (levels adjustment)
**Parameters**
- `a` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** multiplier (optional, default `1.0`)
- `b` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** offset (optional, default `0.0`)
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** Invalid parameters
Returns **Sharp**