From 15ed6c52e7fe37823f77896abc3e39a0a2d80e4c Mon Sep 17 00:00:00 2001 From: ip75 Date: Tue, 10 Sep 2019 15:18:09 +0300 Subject: [PATCH] warnings-errors --- src/ImageSharp/Processing/KnownFilterMatrices.cs | 15 --------------- .../Processors/Filters/LightnessProcessor.cs | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/ImageSharp/Processing/KnownFilterMatrices.cs b/src/ImageSharp/Processing/KnownFilterMatrices.cs index ab24f78a34..999ecdc155 100644 --- a/src/ImageSharp/Processing/KnownFilterMatrices.cs +++ b/src/ImageSharp/Processing/KnownFilterMatrices.cs @@ -444,21 +444,6 @@ namespace SixLabors.ImageSharp.Processing public static ColorMatrix CreateLightnessFilter(float amount) { Guard.MustBeBetweenOrEqualTo(amount, 0, 1F, nameof(amount)); - - // James Jackson-South @JimBobSquarePants 03:54 - // Our colormatrix is a column-major version of the Android colormatrix - // - // | 0| 1| 2| 3| 4| |0|5|10|15| |M11|M12|M13|M14| - // | 5| 6| 7| 8| 9| |1|6|11|16| |M21|M22|M23|M24| - // |10|11|12|13|14| = |2|7|12|17| = |M31|M32|M33|M34| - // |15|16|17|18|19| |3|8|13|18| |M41|M42|M43|M44| - // |4|9|14|19| |M51|M52|M53|M54| - // James Jackson-South @JimBobSquarePants 03:54 - // So given the information you have supplied and the stackoverflow answer (which has one too many rows in the code) you would use - // the identity matrix and change 4, 9, 14 in the android matrix. In our matrix you would use identity again but change M51, M52, M53. - // We use column major layout as that matches the system drawing matrix. - // - // See https://en.wikipedia.org/wiki/HSL_and_HSV#Lightness and https://stackoverflow.com/questions/9175088/adjusting-lightness-using-colormatrix#answer-27179516 return new ColorMatrix { M11 = 1F, diff --git a/src/ImageSharp/Processing/Processors/Filters/LightnessProcessor.cs b/src/ImageSharp/Processing/Processors/Filters/LightnessProcessor.cs index 68257e718c..35b76f5dea 100644 --- a/src/ImageSharp/Processing/Processors/Filters/LightnessProcessor.cs +++ b/src/ImageSharp/Processing/Processors/Filters/LightnessProcessor.cs @@ -1,5 +1,6 @@ // Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. + namespace SixLabors.ImageSharp.Processing.Processors.Filters { /// @@ -7,7 +8,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Filters /// public sealed class LightnessProcessor : FilterProcessor { - /// /// Initializes a new instance of the class. ///