mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose linear transform feature of libvips (#1024)
This commit is contained in:
@@ -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**
|
||||
|
||||
Reference in New Issue
Block a user