From d10718164285ecfb0399db01ca096bf7d569b86d Mon Sep 17 00:00:00 2001 From: hellraisercenobit Date: Mon, 2 Jul 2018 19:23:42 +0200 Subject: [PATCH] Add Linear method definition (#26806) --- types/sharp/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/sharp/index.d.ts b/types/sharp/index.d.ts index e1108575ab..c889f1f4fa 100644 --- a/types/sharp/index.d.ts +++ b/types/sharp/index.d.ts @@ -332,6 +332,14 @@ declare namespace sharp { * @throws {Error} Invalid parameters * @returns A sharp instance that can be used to chain operations */ + linear(multiplier?: number, offset?: number): SharpInstance; + /** + * Apply a gamma correction by reducing the encoding (darken) pre-resize at a factor of 1/gamma then increasing the encoding (brighten) post-resize at a factor of gamma. + * @param multiplier value between 0.0 and 1.0. (optional, default 1.0) + * @param offset value between 0.0 and 1.0. (optional, default 0.0) + * @throws {Error} Invalid parameters + * @returns A sharp instance that can be used to chain operations + */ boolean(operand: string | Buffer, operator: string, options?: { raw: Raw }): SharpInstance; /** * Write output image data to a file.