Browse Source

Fix spelling....

I can't believe no one spotted this until now!
af/merge-core
James Jackson-South 10 years ago
parent
commit
637dce48a8
  1. 14
      src/ImageSharp/Samplers/Convolution/GaussianBlur.cs
  2. 14
      src/ImageSharp/Samplers/Convolution/GaussianSharpen.cs
  3. 16
      src/ImageSharp/Samplers/Processors/Convolution/GaussianBlurProcessor.cs
  4. 16
      src/ImageSharp/Samplers/Processors/Convolution/GaussianSharpenProcessor.cs
  5. 14
      tests/ImageSharp.Tests/Processors/Samplers/GaussianBlurTest.cs
  6. 14
      tests/ImageSharp.Tests/Processors/Samplers/GaussianSharpenTest.cs

14
src/ImageSharp/Samplers/Convolution/GuassianBlur.cs → src/ImageSharp/Samplers/Convolution/GaussianBlur.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianBlur.cs" company="James Jackson-South"> // <copyright file="GaussianBlur.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -13,22 +13,22 @@ namespace ImageSharp
public static partial class ImageExtensions public static partial class ImageExtensions
{ {
/// <summary> /// <summary>
/// Applies a Guassian blur to the image. /// Applies a Gaussian blur to the image.
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
/// <param name="source">The image this method extends.</param> /// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param> /// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns> /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
public static Image<TColor, TPacked> GuassianBlur<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma = 3f) public static Image<TColor, TPacked> GaussianBlur<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma = 3f)
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
return GuassianBlur(source, sigma, source.Bounds); return GaussianBlur(source, sigma, source.Bounds);
} }
/// <summary> /// <summary>
/// Applies a Guassian blur to the image. /// Applies a Gaussian blur to the image.
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
@ -38,11 +38,11 @@ namespace ImageSharp
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter. /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param> /// </param>
/// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns> /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
public static Image<TColor, TPacked> GuassianBlur<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma, Rectangle rectangle) public static Image<TColor, TPacked> GaussianBlur<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma, Rectangle rectangle)
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
return source.Process(rectangle, new GuassianBlurProcessor<TColor, TPacked>(sigma)); return source.Process(rectangle, new GaussianBlurProcessor<TColor, TPacked>(sigma));
} }
} }
} }

14
src/ImageSharp/Samplers/Convolution/GuassianSharpen.cs → src/ImageSharp/Samplers/Convolution/GaussianSharpen.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianSharpen.cs" company="James Jackson-South"> // <copyright file="GaussianSharpen.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -13,22 +13,22 @@ namespace ImageSharp
public static partial class ImageExtensions public static partial class ImageExtensions
{ {
/// <summary> /// <summary>
/// Applies a Guassian sharpening filter to the image. /// Applies a Gaussian sharpening filter to the image.
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
/// <param name="source">The image this method extends.</param> /// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param> /// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns> /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
public static Image<TColor, TPacked> GuassianSharpen<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma = 3f) public static Image<TColor, TPacked> GaussianSharpen<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma = 3f)
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
return GuassianSharpen(source, sigma, source.Bounds); return GaussianSharpen(source, sigma, source.Bounds);
} }
/// <summary> /// <summary>
/// Applies a Guassian sharpening filter to the image. /// Applies a Gaussian sharpening filter to the image.
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
@ -38,11 +38,11 @@ namespace ImageSharp
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter. /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param> /// </param>
/// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns> /// <returns>The <see cref="Image{TColor, TPacked}"/>.</returns>
public static Image<TColor, TPacked> GuassianSharpen<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma, Rectangle rectangle) public static Image<TColor, TPacked> GaussianSharpen<TColor, TPacked>(this Image<TColor, TPacked> source, float sigma, Rectangle rectangle)
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
return source.Process(rectangle, new GuassianSharpenProcessor<TColor, TPacked>(sigma)); return source.Process(rectangle, new GaussianSharpenProcessor<TColor, TPacked>(sigma));
} }
} }
} }

16
src/ImageSharp/Samplers/Processors/Convolution/GuassianBlurProcessor.cs → src/ImageSharp/Samplers/Processors/Convolution/GaussianBlurProcessor.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianBlurProcessor.cs" company="James Jackson-South"> // <copyright file="GaussianBlurProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -12,7 +12,7 @@ namespace ImageSharp.Processors
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
public class GuassianBlurProcessor<TColor, TPacked> : ImageSamplingProcessor<TColor, TPacked> public class GaussianBlurProcessor<TColor, TPacked> : ImageSamplingProcessor<TColor, TPacked>
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
@ -27,10 +27,10 @@ namespace ImageSharp.Processors
private readonly float sigma; private readonly float sigma;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianBlurProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param> /// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
public GuassianBlurProcessor(float sigma = 3f) public GaussianBlurProcessor(float sigma = 3f)
{ {
this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1; this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1;
this.sigma = sigma; this.sigma = sigma;
@ -39,12 +39,12 @@ namespace ImageSharp.Processors
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianBlurProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="radius"> /// <param name="radius">
/// The 'radius' value representing the size of the area to sample. /// The 'radius' value representing the size of the area to sample.
/// </param> /// </param>
public GuassianBlurProcessor(int radius) public GaussianBlurProcessor(int radius)
{ {
this.kernelSize = (radius * 2) + 1; this.kernelSize = (radius * 2) + 1;
this.sigma = radius; this.sigma = radius;
@ -53,7 +53,7 @@ namespace ImageSharp.Processors
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianBlurProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="sigma"> /// <param name="sigma">
/// The 'sigma' value representing the weight of the blur. /// 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. /// The 'radius' value representing the size of the area to sample.
/// This should be at least twice the sigma value. /// This should be at least twice the sigma value.
/// </param> /// </param>
public GuassianBlurProcessor(float sigma, int radius) public GaussianBlurProcessor(float sigma, int radius)
{ {
this.kernelSize = (radius * 2) + 1; this.kernelSize = (radius * 2) + 1;
this.sigma = sigma; this.sigma = sigma;

16
src/ImageSharp/Samplers/Processors/Convolution/GuassianSharpenProcessor.cs → src/ImageSharp/Samplers/Processors/Convolution/GaussianSharpenProcessor.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianSharpenProcessor.cs" company="James Jackson-South"> // <copyright file="GaussianSharpenProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -12,7 +12,7 @@ namespace ImageSharp.Processors
/// </summary> /// </summary>
/// <typeparam name="TColor">The pixel format.</typeparam> /// <typeparam name="TColor">The pixel format.</typeparam>
/// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam> /// <typeparam name="TPacked">The packed format. <example>uint, long, float.</example></typeparam>
public class GuassianSharpenProcessor<TColor, TPacked> : ImageSamplingProcessor<TColor, TPacked> public class GaussianSharpenProcessor<TColor, TPacked> : ImageSamplingProcessor<TColor, TPacked>
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
@ -27,12 +27,12 @@ namespace ImageSharp.Processors
private readonly float sigma; private readonly float sigma;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianSharpenProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianSharpenProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="sigma"> /// <param name="sigma">
/// The 'sigma' value representing the weight of the sharpening. /// The 'sigma' value representing the weight of the sharpening.
/// </param> /// </param>
public GuassianSharpenProcessor(float sigma = 3f) public GaussianSharpenProcessor(float sigma = 3f)
{ {
this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1; this.kernelSize = ((int)Math.Ceiling(sigma) * 2) + 1;
this.sigma = sigma; this.sigma = sigma;
@ -41,12 +41,12 @@ namespace ImageSharp.Processors
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianSharpenProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianSharpenProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="radius"> /// <param name="radius">
/// The 'radius' value representing the size of the area to sample. /// The 'radius' value representing the size of the area to sample.
/// </param> /// </param>
public GuassianSharpenProcessor(int radius) public GaussianSharpenProcessor(int radius)
{ {
this.kernelSize = (radius * 2) + 1; this.kernelSize = (radius * 2) + 1;
this.sigma = radius; this.sigma = radius;
@ -55,7 +55,7 @@ namespace ImageSharp.Processors
} }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GuassianSharpenProcessor{TColor, TPacked}"/> class. /// Initializes a new instance of the <see cref="GaussianSharpenProcessor{TColor, TPacked}"/> class.
/// </summary> /// </summary>
/// <param name="sigma"> /// <param name="sigma">
/// The 'sigma' value representing the weight of the sharpen. /// 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. /// The 'radius' value representing the size of the area to sample.
/// This should be at least twice the sigma value. /// This should be at least twice the sigma value.
/// </param> /// </param>
public GuassianSharpenProcessor(float sigma, int radius) public GaussianSharpenProcessor(float sigma, int radius)
{ {
this.kernelSize = (radius * 2) + 1; this.kernelSize = (radius * 2) + 1;
this.sigma = sigma; this.sigma = sigma;

14
tests/ImageSharp.Tests/Processors/Samplers/GuassianBlurTest.cs → tests/ImageSharp.Tests/Processors/Samplers/GaussianBlurTest.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianBlurTest.cs" company="James Jackson-South"> // <copyright file="GaussianBlurTest.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -9,9 +9,9 @@ namespace ImageSharp.Tests
using Xunit; using Xunit;
public class GuassianBlurTest : FileTestBase public class GaussianBlurTest : FileTestBase
{ {
public static readonly TheoryData<int> GuassianBlurValues public static readonly TheoryData<int> GaussianBlurValues
= new TheoryData<int> = new TheoryData<int>
{ {
3 , 3 ,
@ -19,10 +19,10 @@ namespace ImageSharp.Tests
}; };
[Theory] [Theory]
[MemberData("GuassianBlurValues")] [MemberData("GaussianBlurValues")]
public void ImageShouldApplyGuassianBlurFilter(int value) public void ImageShouldApplyGaussianBlurFilter(int value)
{ {
string path = CreateOutputDirectory("GuassianBlur"); string path = CreateOutputDirectory("GaussianBlur");
foreach (TestFile file in Files) foreach (TestFile file in Files)
{ {
@ -31,7 +31,7 @@ namespace ImageSharp.Tests
using (FileStream output = File.OpenWrite($"{path}/{filename}")) using (FileStream output = File.OpenWrite($"{path}/{filename}"))
{ {
image.GuassianBlur(value) image.GaussianBlur(value)
.Save(output); .Save(output);
} }
} }

14
tests/ImageSharp.Tests/Processors/Samplers/GuassianSharpenTest.cs → tests/ImageSharp.Tests/Processors/Samplers/GaussianSharpenTest.cs

@ -1,4 +1,4 @@
// <copyright file="GuassianSharpenTest.cs" company="James Jackson-South"> // <copyright file="GaussianSharpenTest.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -9,9 +9,9 @@ namespace ImageSharp.Tests
using Xunit; using Xunit;
public class GuassianSharpenTest : FileTestBase public class GaussianSharpenTest : FileTestBase
{ {
public static readonly TheoryData<int> GuassianSharpenValues public static readonly TheoryData<int> GaussianSharpenValues
= new TheoryData<int> = new TheoryData<int>
{ {
3 , 3 ,
@ -19,10 +19,10 @@ namespace ImageSharp.Tests
}; };
[Theory] [Theory]
[MemberData("GuassianSharpenValues")] [MemberData("GaussianSharpenValues")]
public void ImageShouldApplyGuassianSharpenFilter(int value) public void ImageShouldApplyGaussianSharpenFilter(int value)
{ {
string path = CreateOutputDirectory("GuassianSharpen"); string path = CreateOutputDirectory("GaussianSharpen");
foreach (TestFile file in Files) foreach (TestFile file in Files)
{ {
@ -31,7 +31,7 @@ namespace ImageSharp.Tests
using (FileStream output = File.OpenWrite($"{path}/{filename}")) using (FileStream output = File.OpenWrite($"{path}/{filename}"))
{ {
image.GuassianSharpen(value) image.GaussianSharpen(value)
.Save(output); .Save(output);
} }
} }
Loading…
Cancel
Save