diff --git a/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs
index e3e6f13ed6..71252e0bb0 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs
@@ -44,13 +44,13 @@ public static IImageProcessingContext BokehBlur(this IImageProcessingContext sou
/// Applies a bokeh blur to the image.
///
/// The current image processing context.
- /// The 'radius' value representing the size of the area to sample.
- /// The 'components' value representing the number of kernels to use to approximate the bokeh effect.
- /// The gamma highlight factor to use to emphasize bright spots in the source image
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'radius' value representing the size of the area to sample.
+ /// The 'components' value representing the number of kernels to use to approximate the bokeh effect.
+ /// The gamma highlight factor to use to emphasize bright spots in the source image
/// The .
- public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, int radius, int components, float gamma, Rectangle rectangle)
+ public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, Rectangle rectangle, int radius, int components, float gamma)
=> source.ApplyProcessor(new BokehBlurProcessor(radius, components, gamma), rectangle);
}
diff --git a/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs
index 11a7fc6a7a..73e40b57aa 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs
@@ -44,10 +44,10 @@ public static IImageProcessingContext BoxBlur(this IImageProcessingContext sourc
/// Applies a box blur to the image.
///
/// The current image processing context.
- /// The 'radius' value representing the size of the area to sample.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'radius' value representing the size of the area to sample.
///
/// The to use when mapping the pixels outside of the border, in X direction.
///
@@ -57,8 +57,8 @@ public static IImageProcessingContext BoxBlur(this IImageProcessingContext sourc
/// The .
public static IImageProcessingContext BoxBlur(
this IImageProcessingContext source,
- int radius,
Rectangle rectangle,
+ int radius,
BorderWrappingMode borderWrapModeX,
BorderWrappingMode borderWrapModeY)
=> source.ApplyProcessor(new BoxBlurProcessor(radius, borderWrapModeX, borderWrapModeY), rectangle);
diff --git a/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs
index b044c3966f..c8fb230559 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs
@@ -16,8 +16,8 @@ public static class DetectEdgesExtensions
///
/// The current image processing context.
/// The .
- public static IImageProcessingContext DetectEdges(this IImageProcessingContext source) =>
- DetectEdges(source, KnownEdgeDetectorKernels.Sobel);
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source)
+ => DetectEdges(source, KnownEdgeDetectorKernels.Sobel);
///
/// Detects any edges within the image.
@@ -28,10 +28,8 @@ public static IImageProcessingContext DetectEdges(this IImageProcessingContext s
/// The structure that specifies the portion of the image object to alter.
///
/// The .
- public static IImageProcessingContext DetectEdges(
- this IImageProcessingContext source,
- Rectangle rectangle) =>
- DetectEdges(source, KnownEdgeDetectorKernels.Sobel, rectangle);
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, Rectangle rectangle)
+ => DetectEdges(source, rectangle, KnownEdgeDetectorKernels.Sobel);
///
/// Detects any edges within the image operating in grayscale mode.
@@ -39,10 +37,8 @@ public static IImageProcessingContext DetectEdges(
/// The current image processing context.
/// The 2D edge detector kernel.
/// The .
- public static IImageProcessingContext DetectEdges(
- this IImageProcessingContext source,
- EdgeDetector2DKernel kernel) =>
- DetectEdges(source, kernel, true);
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetector2DKernel kernel)
+ => DetectEdges(source, kernel, true);
///
/// Detects any edges within the image using a .
@@ -57,49 +53,41 @@ public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetector2DKernel kernel,
bool grayscale)
- {
- var processor = new EdgeDetector2DProcessor(kernel, grayscale);
- source.ApplyProcessor(processor);
- return source;
- }
+ => source.ApplyProcessor(new EdgeDetector2DProcessor(kernel, grayscale));
///
/// Detects any edges within the image operating in grayscale mode.
///
/// The current image processing context.
- /// The 2D edge detector kernel.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 2D edge detector kernel.
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
- EdgeDetector2DKernel kernel,
- Rectangle rectangle) =>
- DetectEdges(source, kernel, true, rectangle);
+ Rectangle rectangle,
+ EdgeDetector2DKernel kernel)
+ => DetectEdges(source, rectangle, kernel, true);
///
/// Detects any edges within the image using a .
///
/// The current image processing context.
+ ///
+ /// The structure that specifies the portion of the image object to alter.
+ ///
/// The 2D edge detector kernel.
///
/// Whether to convert the image to grayscale before performing edge detection.
///
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
+ Rectangle rectangle,
EdgeDetector2DKernel kernel,
- bool grayscale,
- Rectangle rectangle)
- {
- var processor = new EdgeDetector2DProcessor(kernel, grayscale);
- source.ApplyProcessor(processor, rectangle);
- return source;
- }
+ bool grayscale)
+ => source.ApplyProcessor(new EdgeDetector2DProcessor(kernel, grayscale), rectangle);
///
/// Detects any edges within the image operating in grayscale mode.
@@ -107,10 +95,8 @@ public static IImageProcessingContext DetectEdges(
/// The current image processing context.
/// The edge detector kernel.
/// The .
- public static IImageProcessingContext DetectEdges(
- this IImageProcessingContext source,
- EdgeDetectorKernel kernel) =>
- DetectEdges(source, kernel, true);
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetectorKernel kernel)
+ => DetectEdges(source, kernel, true);
///
/// Detects any edges within the image using a .
@@ -125,66 +111,56 @@ public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetectorKernel kernel,
bool grayscale)
- {
- var processor = new EdgeDetectorProcessor(kernel, grayscale);
- source.ApplyProcessor(processor);
- return source;
- }
+ => source.ApplyProcessor(new EdgeDetectorProcessor(kernel, grayscale));
///
/// Detects any edges within the image operating in grayscale mode.
///
/// The current image processing context.
- /// The edge detector kernel.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The edge detector kernel.
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
- EdgeDetectorKernel kernel,
- Rectangle rectangle) =>
- DetectEdges(source, kernel, true, rectangle);
+ Rectangle rectangle,
+ EdgeDetectorKernel kernel)
+ => DetectEdges(source, rectangle, kernel, true);
///
/// Detects any edges within the image using a .
///
/// The current image processing context.
+ ///
+ /// The structure that specifies the portion of the image object to alter.
+ ///
/// The edge detector kernel.
///
/// Whether to convert the image to grayscale before performing edge detection.
///
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
+ Rectangle rectangle,
EdgeDetectorKernel kernel,
- bool grayscale,
- Rectangle rectangle)
- {
- var processor = new EdgeDetectorProcessor(kernel, grayscale);
- source.ApplyProcessor(processor, rectangle);
- return source;
- }
+ bool grayscale)
+ => source.ApplyProcessor(new EdgeDetectorProcessor(kernel, grayscale), rectangle);
///
/// Detects any edges within the image operating in grayscale mode.
///
/// The current image processing context.
- /// Thecompass edge detector kernel.
+ /// The compass edge detector kernel.
/// The .
- public static IImageProcessingContext DetectEdges(
- this IImageProcessingContext source,
- EdgeDetectorCompassKernel kernel) =>
- DetectEdges(source, kernel, true);
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetectorCompassKernel kernel)
+ => DetectEdges(source, kernel, true);
///
/// Detects any edges within the image using a .
///
/// The current image processing context.
- /// Thecompass edge detector kernel.
+ /// The compass edge detector kernel.
///
/// Whether to convert the image to grayscale before performing edge detection.
///
@@ -193,47 +169,39 @@ public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetectorCompassKernel kernel,
bool grayscale)
- {
- var processor = new EdgeDetectorCompassProcessor(kernel, grayscale);
- source.ApplyProcessor(processor);
- return source;
- }
+ => source.ApplyProcessor(new EdgeDetectorCompassProcessor(kernel, grayscale));
///
/// Detects any edges within the image operating in grayscale mode.
///
/// The current image processing context.
- /// Thecompass edge detector kernel.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The compass edge detector kernel.
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
- EdgeDetectorCompassKernel kernel,
- Rectangle rectangle) =>
- DetectEdges(source, kernel, true, rectangle);
+ Rectangle rectangle,
+ EdgeDetectorCompassKernel kernel)
+ => DetectEdges(source, rectangle, kernel, true);
///
/// Detects any edges within the image using a .
///
/// The current image processing context.
- /// Thecompass edge detector kernel.
- ///
- /// Whether to convert the image to grayscale before performing edge detection.
- ///
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The compass edge detector kernel.
+ ///
+ /// Whether to convert the image to grayscale before performing edge detection.
+ ///
/// The .
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
+ Rectangle rectangle,
EdgeDetectorCompassKernel kernel,
- bool grayscale,
- Rectangle rectangle)
- {
- var processor = new EdgeDetectorCompassProcessor(kernel, grayscale);
- source.ApplyProcessor(processor, rectangle);
- return source;
- }
+ bool grayscale)
+ => source.ApplyProcessor(new EdgeDetectorCompassProcessor(kernel, grayscale), rectangle);
}
diff --git a/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs
index 64e0be3eac..d406bf8d10 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs
@@ -32,22 +32,25 @@ public static IImageProcessingContext GaussianBlur(this IImageProcessingContext
/// Applies a Gaussian blur to the image.
///
/// The current image processing context.
- /// The 'sigma' value representing the weight of the blur.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'sigma' value representing the weight of the blur.
/// The .
- public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma, Rectangle rectangle)
+ public static IImageProcessingContext GaussianBlur(
+ this IImageProcessingContext source,
+ Rectangle rectangle,
+ float sigma)
=> source.ApplyProcessor(new GaussianBlurProcessor(sigma), rectangle);
///
/// Applies a Gaussian blur to the image.
///
/// The current image processing context.
- /// The 'sigma' value representing the weight of the blur.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'sigma' value representing the weight of the blur.
///
/// The to use when mapping the pixels outside of the border, in X direction.
///
@@ -55,9 +58,11 @@ public static IImageProcessingContext GaussianBlur(this IImageProcessingContext
/// The to use when mapping the pixels outside of the border, in Y direction.
///
/// The .
- public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma, Rectangle rectangle, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)
- {
- GaussianBlurProcessor processor = new(sigma, borderWrapModeX, borderWrapModeY);
- return source.ApplyProcessor(processor, rectangle);
- }
+ public static IImageProcessingContext GaussianBlur(
+ this IImageProcessingContext source,
+ Rectangle rectangle,
+ float sigma,
+ BorderWrappingMode borderWrapModeX,
+ BorderWrappingMode borderWrapModeY)
+ => source.ApplyProcessor(new GaussianBlurProcessor(sigma, borderWrapModeX, borderWrapModeY), rectangle);
}
diff --git a/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs
index 4a94df0963..9470cdbdc0 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs
@@ -16,8 +16,8 @@ public static class GaussianSharpenExtensions
///
/// The current image processing context.
/// The .
- public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source) =>
- source.ApplyProcessor(new GaussianSharpenProcessor());
+ public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source)
+ => source.ApplyProcessor(new GaussianSharpenProcessor());
///
/// Applies a Gaussian sharpening filter to the image.
@@ -25,32 +25,32 @@ public static IImageProcessingContext GaussianSharpen(this IImageProcessingConte
/// The current image processing context.
/// The 'sigma' value representing the weight of the blur.
/// The .
- public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma) =>
- source.ApplyProcessor(new GaussianSharpenProcessor(sigma));
+ public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma)
+ => source.ApplyProcessor(new GaussianSharpenProcessor(sigma));
///
/// Applies a Gaussian sharpening filter to the image.
///
/// The current image processing context.
- /// The 'sigma' value representing the weight of the blur.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'sigma' value representing the weight of the blur.
/// The .
public static IImageProcessingContext GaussianSharpen(
this IImageProcessingContext source,
- float sigma,
- Rectangle rectangle) =>
+ Rectangle rectangle,
+ float sigma) =>
source.ApplyProcessor(new GaussianSharpenProcessor(sigma), rectangle);
///
/// Applies a Gaussian sharpening filter to the image.
///
/// The current image processing context.
- /// The 'sigma' value representing the weight of the blur.
///
/// The structure that specifies the portion of the image object to alter.
///
+ /// The 'sigma' value representing the weight of the blur.
///
/// The to use when mapping the pixels outside of the border, in X direction.
///
@@ -58,9 +58,11 @@ public static IImageProcessingContext GaussianSharpen(
/// The to use when mapping the pixels outside of the border, in Y direction.
///
/// The .
- public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma, Rectangle rectangle, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)
- {
- var processor = new GaussianSharpenProcessor(sigma, borderWrapModeX, borderWrapModeY);
- return source.ApplyProcessor(processor, rectangle);
- }
+ public static IImageProcessingContext GaussianSharpen(
+ this IImageProcessingContext source,
+ Rectangle rectangle,
+ float sigma,
+ BorderWrappingMode borderWrapModeX,
+ BorderWrappingMode borderWrapModeY)
+ => source.ApplyProcessor(new GaussianSharpenProcessor(sigma, borderWrapModeX, borderWrapModeY), rectangle);
}
diff --git a/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs
index a08a398b75..bc6fef62a6 100644
--- a/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs
+++ b/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs
@@ -20,21 +20,28 @@ public static class MedianBlurExtensions
/// Whether the filter is applied to alpha as well as the color channels.
///
/// The .
- public static IImageProcessingContext MedianBlur(this IImageProcessingContext source, int radius, bool preserveAlpha)
+ public static IImageProcessingContext MedianBlur(
+ this IImageProcessingContext source,
+ int radius,
+ bool preserveAlpha)
=> source.ApplyProcessor(new MedianBlurProcessor(radius, preserveAlpha));
///
/// Applies a median blur on the image.
///
/// The current image processing context.
+ ///
+ /// The structure that specifies the portion of the image object to alter.
+ ///
/// The radius of the area to find the median for.
///
/// Whether the filter is applied to alpha as well as the color channels.
///
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
/// The .
- public static IImageProcessingContext MedianBlur(this IImageProcessingContext source, int radius, bool preserveAlpha, Rectangle rectangle)
+ public static IImageProcessingContext MedianBlur(
+ this IImageProcessingContext source,
+ Rectangle rectangle,
+ int radius,
+ bool preserveAlpha)
=> source.ApplyProcessor(new MedianBlurProcessor(radius, preserveAlpha), rectangle);
}
diff --git a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs
index 2a1273ebb7..713daa0e9f 100644
--- a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs
@@ -59,7 +59,7 @@ public void DetectEdges_EdgeDetector2DProcessor_DefaultGrayScale_Set(EdgeDetecto
[MemberData(nameof(EdgeDetector2DKernelData))]
public void DetectEdges_Rect_EdgeDetector2DProcessor_DefaultGrayScale_Set(EdgeDetector2DKernel kernel, bool _)
{
- this.operations.DetectEdges(kernel, this.rect);
+ this.operations.DetectEdges(this.rect, kernel);
EdgeDetector2DProcessor processor = this.Verify(this.rect);
Assert.True(processor.Grayscale);
@@ -81,7 +81,7 @@ public void DetectEdges_EdgeDetector2DProcessorSet(EdgeDetector2DKernel kernel,
[MemberData(nameof(EdgeDetector2DKernelData))]
public void DetectEdges_Rect_EdgeDetector2DProcessorSet(EdgeDetector2DKernel kernel, bool grayscale)
{
- this.operations.DetectEdges(kernel, grayscale, this.rect);
+ this.operations.DetectEdges(this.rect, kernel, grayscale);
EdgeDetector2DProcessor processor = this.Verify(this.rect);
Assert.Equal(grayscale, processor.Grayscale);
@@ -114,7 +114,7 @@ public void DetectEdges_EdgeDetectorProcessor_DefaultGrayScale_Set(EdgeDetectorK
[MemberData(nameof(EdgeDetectorKernelData))]
public void DetectEdges_Rect_EdgeDetectorProcessor_DefaultGrayScale_Set(EdgeDetectorKernel kernel, bool _)
{
- this.operations.DetectEdges(kernel, this.rect);
+ this.operations.DetectEdges(this.rect, kernel);
EdgeDetectorProcessor processor = this.Verify(this.rect);
Assert.True(processor.Grayscale);
@@ -136,7 +136,7 @@ public void DetectEdges_EdgeDetectorProcessorSet(EdgeDetectorKernel kernel, bool
[MemberData(nameof(EdgeDetectorKernelData))]
public void DetectEdges_Rect_EdgeDetectorProcessorSet(EdgeDetectorKernel kernel, bool grayscale)
{
- this.operations.DetectEdges(kernel, grayscale, this.rect);
+ this.operations.DetectEdges(this.rect, kernel, grayscale);
EdgeDetectorProcessor processor = this.Verify(this.rect);
Assert.Equal(grayscale, processor.Grayscale);
@@ -167,7 +167,7 @@ public void DetectEdges_EdgeDetectorCompassProcessor_DefaultGrayScale_Set(EdgeDe
[MemberData(nameof(EdgeDetectorCompassKernelData))]
public void DetectEdges_Rect_EdgeDetectorCompassProcessor_DefaultGrayScale_Set(EdgeDetectorCompassKernel kernel, bool _)
{
- this.operations.DetectEdges(kernel, this.rect);
+ this.operations.DetectEdges(this.rect, kernel);
EdgeDetectorCompassProcessor processor = this.Verify(this.rect);
Assert.True(processor.Grayscale);
@@ -189,7 +189,7 @@ public void DetectEdges_EdgeDetectorCompassProcessorSet(EdgeDetectorCompassKerne
[MemberData(nameof(EdgeDetectorCompassKernelData))]
public void DetectEdges_Rect_EdgeDetectorCompassProcessorSet(EdgeDetectorCompassKernel kernel, bool grayscale)
{
- this.operations.DetectEdges(kernel, grayscale, this.rect);
+ this.operations.DetectEdges(this.rect, kernel, grayscale);
EdgeDetectorCompassProcessor processor = this.Verify(this.rect);
Assert.Equal(grayscale, processor.Grayscale);
diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs
index 5142791603..410862ebfa 100644
--- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs
@@ -13,7 +13,7 @@ public class GaussianBlurTest : BaseImageOperationsExtensionTest
public void GaussianBlur_GaussianBlurProcessorDefaultsSet()
{
this.operations.GaussianBlur();
- var processor = this.Verify();
+ GaussianBlurProcessor processor = this.Verify();
Assert.Equal(3f, processor.Sigma);
}
@@ -22,7 +22,7 @@ public void GaussianBlur_GaussianBlurProcessorDefaultsSet()
public void GaussianBlur_amount_GaussianBlurProcessorDefaultsSet()
{
this.operations.GaussianBlur(0.2f);
- var processor = this.Verify();
+ GaussianBlurProcessor processor = this.Verify();
Assert.Equal(.2f, processor.Sigma);
}
@@ -30,8 +30,8 @@ public void GaussianBlur_amount_GaussianBlurProcessorDefaultsSet()
[Fact]
public void GaussianBlur_amount_rect_GaussianBlurProcessorDefaultsSet()
{
- this.operations.GaussianBlur(0.6f, this.rect);
- var processor = this.Verify(this.rect);
+ this.operations.GaussianBlur(this.rect, 0.6f);
+ GaussianBlurProcessor processor = this.Verify(this.rect);
Assert.Equal(.6f, processor.Sigma);
}
diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs
index b48ebac0dc..fd9e64c467 100644
--- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs
@@ -13,7 +13,7 @@ public class GaussianSharpenTest : BaseImageOperationsExtensionTest
public void GaussianSharpen_GaussianSharpenProcessorDefaultsSet()
{
this.operations.GaussianSharpen();
- var processor = this.Verify();
+ GaussianSharpenProcessor processor = this.Verify();
Assert.Equal(3f, processor.Sigma);
}
@@ -22,7 +22,7 @@ public void GaussianSharpen_GaussianSharpenProcessorDefaultsSet()
public void GaussianSharpen_amount_GaussianSharpenProcessorDefaultsSet()
{
this.operations.GaussianSharpen(0.2f);
- var processor = this.Verify();
+ GaussianSharpenProcessor processor = this.Verify();
Assert.Equal(.2f, processor.Sigma);
}
@@ -30,8 +30,8 @@ public void GaussianSharpen_amount_GaussianSharpenProcessorDefaultsSet()
[Fact]
public void GaussianSharpen_amount_rect_GaussianSharpenProcessorDefaultsSet()
{
- this.operations.GaussianSharpen(0.6f, this.rect);
- var processor = this.Verify(this.rect);
+ this.operations.GaussianSharpen(this.rect, 0.6f);
+ GaussianSharpenProcessor processor = this.Verify(this.rect);
Assert.Equal(.6f, processor.Sigma);
}
diff --git a/tests/ImageSharp.Tests/Processing/Convolution/MedianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/MedianBlurTest.cs
index dc497628fb..77fbc70823 100644
--- a/tests/ImageSharp.Tests/Processing/Convolution/MedianBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Convolution/MedianBlurTest.cs
@@ -13,7 +13,7 @@ public class MedianBlurTest : BaseImageOperationsExtensionTest
public void Median_radius_MedianProcessorDefaultsSet()
{
this.operations.MedianBlur(3, true);
- var processor = this.Verify();
+ MedianBlurProcessor processor = this.Verify();
Assert.Equal(3, processor.Radius);
Assert.True(processor.PreserveAlpha);
@@ -22,8 +22,8 @@ public void Median_radius_MedianProcessorDefaultsSet()
[Fact]
public void Median_radius_rect_MedianProcessorDefaultsSet()
{
- this.operations.MedianBlur(5, false, this.rect);
- var processor = this.Verify(this.rect);
+ this.operations.MedianBlur(this.rect, 5, false);
+ MedianBlurProcessor processor = this.Verify(this.rect);
Assert.Equal(5, processor.Radius);
Assert.False(processor.PreserveAlpha);
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
index c94983ecd5..f045c981eb 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
@@ -3,7 +3,6 @@
using System.Globalization;
using System.Text.RegularExpressions;
-using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Convolution;
@@ -165,7 +164,7 @@ static void RunTest(string arg1, string arg2)
{
Size size = x.GetCurrentSize();
Rectangle bounds = new(10, 10, size.Width / 2, size.Height / 2);
- x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds);
+ x.BokehBlur(bounds, value.Radius, value.Components, value.Gamma);
},
testOutputDetails: value.ToString(),
ImageComparer.TolerantPercentage(0.05f),
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianBlurTest.cs
index 47ccaa46cd..0728bb5d84 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianBlurTest.cs
@@ -12,5 +12,5 @@ public class GaussianBlurTest : Basic1ParameterConvolutionTests
protected override void Apply(IImageProcessingContext ctx, int value) => ctx.GaussianBlur(value);
protected override void Apply(IImageProcessingContext ctx, int value, Rectangle bounds) =>
- ctx.GaussianBlur(value, bounds);
+ ctx.GaussianBlur(bounds, value);
}
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianSharpenTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianSharpenTest.cs
index 96c58f7010..c6b7c82363 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianSharpenTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/GaussianSharpenTest.cs
@@ -12,5 +12,5 @@ public class GaussianSharpenTest : Basic1ParameterConvolutionTests
protected override void Apply(IImageProcessingContext ctx, int value) => ctx.GaussianSharpen(value);
protected override void Apply(IImageProcessingContext ctx, int value, Rectangle bounds) =>
- ctx.GaussianSharpen(value, bounds);
+ ctx.GaussianSharpen(bounds, value);
}
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/MedianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/MedianBlurTest.cs
index 7cc0ef9d50..048b843580 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/MedianBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/MedianBlurTest.cs
@@ -12,5 +12,5 @@ public class MedianBlurTest : Basic1ParameterConvolutionTests
protected override void Apply(IImageProcessingContext ctx, int value) => ctx.MedianBlur(value, true);
protected override void Apply(IImageProcessingContext ctx, int value, Rectangle bounds) =>
- ctx.MedianBlur(value, true, bounds);
+ ctx.MedianBlur(bounds, value, true);
}