fix(sharp): add missing modulate type (#35253)

This commit is contained in:
Christian 2019-05-14 00:22:57 +02:00 committed by Nathan Shively-Sanders
parent b60d757ef4
commit 93a90edde2
2 changed files with 11 additions and 0 deletions

View File

@ -434,6 +434,13 @@ declare namespace sharp {
*/
recomb(inputMatrix: Matrix3x3): Sharp;
/**
* Transforms the image using brightness, saturation and hue rotation.
* @param options describes the modulation
* @returns A sharp instance that can be used to chain operations
*/
modulate(options?: { brightness?: number, saturation?: number, hue?: number }): Sharp;
//#endregion
//#region Output functions

View File

@ -244,4 +244,8 @@ sharp('input.gif')
[0.2990, 0.5870, 0.1140],
[0.2392, 0.4696, 0.0912],
])
.modulate({ brightness: 2 })
.modulate({ hue: 180 })
.modulate({ brightness: 0.5, saturation: 0.5, hue: 90 })
;