diff --git a/src/ImageSharp/Samplers/Convolution/GuassianBlur.cs b/src/ImageSharp/Samplers/Convolution/GaussianBlur.cs similarity index 81% rename from src/ImageSharp/Samplers/Convolution/GuassianBlur.cs rename to src/ImageSharp/Samplers/Convolution/GaussianBlur.cs index ef09a18f5..9bc814c5c 100644 --- a/src/ImageSharp/Samplers/Convolution/GuassianBlur.cs +++ b/src/ImageSharp/Samplers/Convolution/GaussianBlur.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -13,22 +13,22 @@ namespace ImageSharp public static partial class ImageExtensions { /// - /// Applies a Guassian blur to the image. + /// Applies a Gaussian blur to the image. /// /// The pixel format. /// The packed format. uint, long, float. /// The image this method extends. /// The 'sigma' value representing the weight of the blur. /// The . - public static Image GuassianBlur(this Image source, float sigma = 3f) + public static Image GaussianBlur(this Image source, float sigma = 3f) where TColor : struct, IPackedPixel where TPacked : struct { - return GuassianBlur(source, sigma, source.Bounds); + return GaussianBlur(source, sigma, source.Bounds); } /// - /// Applies a Guassian blur to the image. + /// Applies a Gaussian blur to the image. /// /// The pixel format. /// The packed format. uint, long, float. @@ -38,11 +38,11 @@ namespace ImageSharp /// The structure that specifies the portion of the image object to alter. /// /// The . - public static Image GuassianBlur(this Image source, float sigma, Rectangle rectangle) + public static Image GaussianBlur(this Image source, float sigma, Rectangle rectangle) where TColor : struct, IPackedPixel where TPacked : struct { - return source.Process(rectangle, new GuassianBlurProcessor(sigma)); + return source.Process(rectangle, new GaussianBlurProcessor(sigma)); } } } \ No newline at end of file diff --git a/src/ImageSharp/Samplers/Convolution/GuassianSharpen.cs b/src/ImageSharp/Samplers/Convolution/GaussianSharpen.cs similarity index 80% rename from src/ImageSharp/Samplers/Convolution/GuassianSharpen.cs rename to src/ImageSharp/Samplers/Convolution/GaussianSharpen.cs index 6b433f6ae..b3b5efa3f 100644 --- a/src/ImageSharp/Samplers/Convolution/GuassianSharpen.cs +++ b/src/ImageSharp/Samplers/Convolution/GaussianSharpen.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -13,22 +13,22 @@ namespace ImageSharp public static partial class ImageExtensions { /// - /// Applies a Guassian sharpening filter to the image. + /// Applies a Gaussian sharpening filter to the image. /// /// The pixel format. /// The packed format. uint, long, float. /// The image this method extends. /// The 'sigma' value representing the weight of the blur. /// The . - public static Image GuassianSharpen(this Image source, float sigma = 3f) + public static Image GaussianSharpen(this Image source, float sigma = 3f) where TColor : struct, IPackedPixel where TPacked : struct { - return GuassianSharpen(source, sigma, source.Bounds); + return GaussianSharpen(source, sigma, source.Bounds); } /// - /// Applies a Guassian sharpening filter to the image. + /// Applies a Gaussian sharpening filter to the image. /// /// The pixel format. /// The packed format. uint, long, float. @@ -38,11 +38,11 @@ namespace ImageSharp /// The structure that specifies the portion of the image object to alter. /// /// The . - public static Image GuassianSharpen(this Image source, float sigma, Rectangle rectangle) + public static Image GaussianSharpen(this Image source, float sigma, Rectangle rectangle) where TColor : struct, IPackedPixel where TPacked : struct { - return source.Process(rectangle, new GuassianSharpenProcessor(sigma)); + return source.Process(rectangle, new GaussianSharpenProcessor(sigma)); } } } diff --git a/src/ImageSharp/Samplers/Processors/Convolution/GuassianBlurProcessor.cs b/src/ImageSharp/Samplers/Processors/Convolution/GaussianBlurProcessor.cs similarity index 90% rename from src/ImageSharp/Samplers/Processors/Convolution/GuassianBlurProcessor.cs rename to src/ImageSharp/Samplers/Processors/Convolution/GaussianBlurProcessor.cs index e6af445b4..4025e2125 100644 --- a/src/ImageSharp/Samplers/Processors/Convolution/GuassianBlurProcessor.cs +++ b/src/ImageSharp/Samplers/Processors/Convolution/GaussianBlurProcessor.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -12,7 +12,7 @@ namespace ImageSharp.Processors /// /// The pixel format. /// The packed format. uint, long, float. - public class GuassianBlurProcessor : ImageSamplingProcessor + public class GaussianBlurProcessor : ImageSamplingProcessor where TColor : struct, IPackedPixel where TPacked : struct { @@ -27,10 +27,10 @@ namespace ImageSharp.Processors private readonly float sigma; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The 'sigma' value representing the weight of the blur. - public GuassianBlurProcessor(float sigma = 3f) + public GaussianBlurProcessor(float sigma = 3f) { this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1; this.sigma = sigma; @@ -39,12 +39,12 @@ namespace ImageSharp.Processors } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The 'radius' value representing the size of the area to sample. /// - public GuassianBlurProcessor(int radius) + public GaussianBlurProcessor(int radius) { this.kernelSize = (radius * 2) + 1; this.sigma = radius; @@ -53,7 +53,7 @@ namespace ImageSharp.Processors } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The 'sigma' value representing the weight of the blur. @@ -62,7 +62,7 @@ namespace ImageSharp.Processors /// The 'radius' value representing the size of the area to sample. /// This should be at least twice the sigma value. /// - public GuassianBlurProcessor(float sigma, int radius) + public GaussianBlurProcessor(float sigma, int radius) { this.kernelSize = (radius * 2) + 1; this.sigma = sigma; diff --git a/src/ImageSharp/Samplers/Processors/Convolution/GuassianSharpenProcessor.cs b/src/ImageSharp/Samplers/Processors/Convolution/GaussianSharpenProcessor.cs similarity index 92% rename from src/ImageSharp/Samplers/Processors/Convolution/GuassianSharpenProcessor.cs rename to src/ImageSharp/Samplers/Processors/Convolution/GaussianSharpenProcessor.cs index 56cf94ea3..2d2a343d3 100644 --- a/src/ImageSharp/Samplers/Processors/Convolution/GuassianSharpenProcessor.cs +++ b/src/ImageSharp/Samplers/Processors/Convolution/GaussianSharpenProcessor.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -12,7 +12,7 @@ namespace ImageSharp.Processors /// /// The pixel format. /// The packed format. uint, long, float. - public class GuassianSharpenProcessor : ImageSamplingProcessor + public class GaussianSharpenProcessor : ImageSamplingProcessor where TColor : struct, IPackedPixel where TPacked : struct { @@ -27,12 +27,12 @@ namespace ImageSharp.Processors private readonly float sigma; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The 'sigma' value representing the weight of the sharpening. /// - public GuassianSharpenProcessor(float sigma = 3f) + public GaussianSharpenProcessor(float sigma = 3f) { this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1; this.sigma = sigma; @@ -41,12 +41,12 @@ namespace ImageSharp.Processors } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The 'radius' value representing the size of the area to sample. /// - public GuassianSharpenProcessor(int radius) + public GaussianSharpenProcessor(int radius) { this.kernelSize = (radius * 2) + 1; this.sigma = radius; @@ -55,7 +55,7 @@ namespace ImageSharp.Processors } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The 'sigma' value representing the weight of the sharpen. @@ -64,7 +64,7 @@ namespace ImageSharp.Processors /// The 'radius' value representing the size of the area to sample. /// This should be at least twice the sigma value. /// - public GuassianSharpenProcessor(float sigma, int radius) + public GaussianSharpenProcessor(float sigma, int radius) { this.kernelSize = (radius * 2) + 1; this.sigma = sigma; diff --git a/tests/ImageSharp.Tests/Processors/Samplers/GuassianBlurTest.cs b/tests/ImageSharp.Tests/Processors/Samplers/GaussianBlurTest.cs similarity index 63% rename from tests/ImageSharp.Tests/Processors/Samplers/GuassianBlurTest.cs rename to tests/ImageSharp.Tests/Processors/Samplers/GaussianBlurTest.cs index cd1cc5638..6a8279689 100644 --- a/tests/ImageSharp.Tests/Processors/Samplers/GuassianBlurTest.cs +++ b/tests/ImageSharp.Tests/Processors/Samplers/GaussianBlurTest.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -9,9 +9,9 @@ namespace ImageSharp.Tests using Xunit; - public class GuassianBlurTest : FileTestBase + public class GaussianBlurTest : FileTestBase { - public static readonly TheoryData GuassianBlurValues + public static readonly TheoryData GaussianBlurValues = new TheoryData { 3 , @@ -19,10 +19,10 @@ namespace ImageSharp.Tests }; [Theory] - [MemberData("GuassianBlurValues")] - public void ImageShouldApplyGuassianBlurFilter(int value) + [MemberData("GaussianBlurValues")] + public void ImageShouldApplyGaussianBlurFilter(int value) { - string path = CreateOutputDirectory("GuassianBlur"); + string path = CreateOutputDirectory("GaussianBlur"); foreach (TestFile file in Files) { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests using (FileStream output = File.OpenWrite($"{path}/{filename}")) { - image.GuassianBlur(value) + image.GaussianBlur(value) .Save(output); } } diff --git a/tests/ImageSharp.Tests/Processors/Samplers/GuassianSharpenTest.cs b/tests/ImageSharp.Tests/Processors/Samplers/GaussianSharpenTest.cs similarity index 63% rename from tests/ImageSharp.Tests/Processors/Samplers/GuassianSharpenTest.cs rename to tests/ImageSharp.Tests/Processors/Samplers/GaussianSharpenTest.cs index 5672b5bae..75e2020cd 100644 --- a/tests/ImageSharp.Tests/Processors/Samplers/GuassianSharpenTest.cs +++ b/tests/ImageSharp.Tests/Processors/Samplers/GaussianSharpenTest.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -9,9 +9,9 @@ namespace ImageSharp.Tests using Xunit; - public class GuassianSharpenTest : FileTestBase + public class GaussianSharpenTest : FileTestBase { - public static readonly TheoryData GuassianSharpenValues + public static readonly TheoryData GaussianSharpenValues = new TheoryData { 3 , @@ -19,10 +19,10 @@ namespace ImageSharp.Tests }; [Theory] - [MemberData("GuassianSharpenValues")] - public void ImageShouldApplyGuassianSharpenFilter(int value) + [MemberData("GaussianSharpenValues")] + public void ImageShouldApplyGaussianSharpenFilter(int value) { - string path = CreateOutputDirectory("GuassianSharpen"); + string path = CreateOutputDirectory("GaussianSharpen"); foreach (TestFile file in Files) { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests using (FileStream output = File.OpenWrite($"{path}/{filename}")) { - image.GuassianSharpen(value) + image.GaussianSharpen(value) .Save(output); } }