From 7881244fc85f9dcf341230652f2a57a44a06a6cd Mon Sep 17 00:00:00 2001 From: ip75 Date: Tue, 17 Sep 2019 18:37:33 +0300 Subject: [PATCH] fix value ranges for lightness --- src/ImageSharp/Processing/KnownFilterMatrices.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Processing/KnownFilterMatrices.cs b/src/ImageSharp/Processing/KnownFilterMatrices.cs index 999ecdc155..4a325503fc 100644 --- a/src/ImageSharp/Processing/KnownFilterMatrices.cs +++ b/src/ImageSharp/Processing/KnownFilterMatrices.cs @@ -436,14 +436,13 @@ namespace SixLabors.ImageSharp.Processing /// Create a lightness filter matrix using the given amount. /// /// - /// A value of 0 will create an image that is completely black. A value of 1 makes the image completely white. - /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results. + /// A value of -1 will create an image that is completely black. A value of 1 makes the image completely white. /// - /// The proportion of the conversion. Must be greater than or equal to 0. + /// The proportion of the conversion. Must be between -1 and 1. /// The public static ColorMatrix CreateLightnessFilter(float amount) { - Guard.MustBeBetweenOrEqualTo(amount, 0, 1F, nameof(amount)); + Guard.MustBeBetweenOrEqualTo(amount, -1F, 1F, nameof(amount)); return new ColorMatrix { M11 = 1F,