|
|
@ -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)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |