diff --git a/src/ImageSharp/Processing/OilPaintExtensions.cs b/src/ImageSharp/Processing/OilPaintExtensions.cs
index b6fa4149a..ee51b31fa 100644
--- a/src/ImageSharp/Processing/OilPaintExtensions.cs
+++ b/src/ImageSharp/Processing/OilPaintExtensions.cs
@@ -1,14 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors.Effects;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
///
- /// Adds oil painting effect extensions to the type.
+ /// Adds oil painting effect extensions to the type.
///
public static class OilPaintExtensions
{
@@ -16,43 +15,36 @@ namespace SixLabors.ImageSharp.Processing
/// Alters the colors of the image recreating an oil painting effect with levels and brushSize
/// set to 10 and 15 respectively.
///
- /// The pixel format.
/// The image this method extends.
/// The .
- public static IImageProcessingContext OilPaint(this IImageProcessingContext source)
- where TPixel : struct, IPixel
- => OilPaint(source, 10, 15);
+ public static IImageProcessingContext OilPaint(this IImageProcessingContext source) => OilPaint(source, 10, 15);
///
/// Alters the colors of the image recreating an oil painting effect with levels and brushSize
/// set to 10 and 15 respectively.
///
- /// The pixel format.
/// The image this method extends.
///
/// The structure that specifies the portion of the image object to alter.
///
/// The .
- public static IImageProcessingContext OilPaint(this IImageProcessingContext source, Rectangle rectangle)
- where TPixel : struct, IPixel
- => OilPaint(source, 10, 15, rectangle);
+ public static IImageProcessingContext OilPaint(this IImageProcessingContext source, Rectangle rectangle) =>
+ OilPaint(source, 10, 15, rectangle);
///
/// Alters the colors of the image recreating an oil painting effect.
///
- /// The pixel format.
/// The image this method extends.
/// The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image.
/// The number of neighboring pixels used in calculating each individual pixel value.
/// The .
- public static IImageProcessingContext OilPaint(this IImageProcessingContext source, int levels, int brushSize)
- where TPixel : struct, IPixel
- => source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize));
+ public static IImageProcessingContext
+ OilPaint(this IImageProcessingContext source, int levels, int brushSize) =>
+ source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize));
///
/// Alters the colors of the image recreating an oil painting effect.
///
- /// The pixel format.
/// The image this method extends.
/// The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image.
/// The number of neighboring pixels used in calculating each individual pixel value.
@@ -60,8 +52,11 @@ namespace SixLabors.ImageSharp.Processing
/// The structure that specifies the portion of the image object to alter.
///
/// The .
- public static IImageProcessingContext OilPaint(this IImageProcessingContext source, int levels, int brushSize, Rectangle rectangle)
- where TPixel : struct, IPixel
- => source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize), rectangle);
+ public static IImageProcessingContext OilPaint(
+ this IImageProcessingContext source,
+ int levels,
+ int brushSize,
+ Rectangle rectangle) =>
+ source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize), rectangle);
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/PixelateExtensions.cs b/src/ImageSharp/Processing/PixelateExtensions.cs
index 4507f6392..d9f7f9be5 100644
--- a/src/ImageSharp/Processing/PixelateExtensions.cs
+++ b/src/ImageSharp/Processing/PixelateExtensions.cs
@@ -1,50 +1,45 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors.Effects;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
///
- /// Adds pixelation effect extensions to the type.
+ /// Adds pixelation effect extensions to the type.
///
public static class PixelateExtensions
{
///
/// Pixelates an image with the given pixel size.
///
- /// The pixel format.
/// The image this method extends.
/// The .
- public static IImageProcessingContext Pixelate(this IImageProcessingContext source)
- where TPixel : struct, IPixel
- => Pixelate(source, 4);
+ public static IImageProcessingContext Pixelate(this IImageProcessingContext source) => Pixelate(source, 4);
///
/// Pixelates an image with the given pixel size.
///
- /// The pixel format.
/// The image this method extends.
/// The size of the pixels.
/// The .
- public static IImageProcessingContext Pixelate(this IImageProcessingContext source, int size)
- where TPixel : struct, IPixel
- => source.ApplyProcessor(new PixelateProcessor(size));
+ public static IImageProcessingContext Pixelate(this IImageProcessingContext source, int size) =>
+ source.ApplyProcessor(new PixelateProcessor(size));
///
/// Pixelates an image with the given pixel size.
///
- /// The pixel format.
/// The image this method extends.
/// The size of the pixels.
///
/// The structure that specifies the portion of the image object to alter.
///
/// The .
- public static IImageProcessingContext Pixelate(this IImageProcessingContext source, int size, Rectangle rectangle)
- where TPixel : struct, IPixel
- => source.ApplyProcessor(new PixelateProcessor(size), rectangle);
+ public static IImageProcessingContext Pixelate(
+ this IImageProcessingContext source,
+ int size,
+ Rectangle rectangle) =>
+ source.ApplyProcessor(new PixelateProcessor(size), rectangle);
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/Dithering/ErrorDiffuserBase.cs b/src/ImageSharp/Processing/Processors/Dithering/ErrorDiffuserBase.cs
index abf5dce18..327828c39 100644
--- a/src/ImageSharp/Processing/Processors/Dithering/ErrorDiffuserBase.cs
+++ b/src/ImageSharp/Processing/Processors/Dithering/ErrorDiffuserBase.cs
@@ -21,12 +21,12 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
private readonly Vector4 divisorVector;
///
- /// The matrix width
+ /// The matrix width.
///
private readonly int matrixHeight;
///
- /// The matrix height
+ /// The matrix height.
///
private readonly int matrixWidth;
@@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
private readonly int startingOffset;
///
- /// The diffusion matrix
+ /// The diffusion matrix.
///
private readonly DenseMatrix matrix;
diff --git a/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor.cs b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor.cs
index 1b17c470e..14e164fb7 100644
--- a/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor.cs
@@ -1,27 +1,17 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Numerics;
-
-using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Memory;
-using SixLabors.ImageSharp.ParallelUtils;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Processors.Effects
{
///
- /// Applies oil painting effect processing to the image.
+ /// Defines an oil painting effect.
///
- /// Adapted from by Dewald Esterhuizen.
- /// The pixel format.
- internal class OilPaintingProcessor : ImageProcessor
- where TPixel : struct, IPixel
+ public class OilPaintingProcessor : IImageProcessor
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
///
/// The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image.
@@ -39,111 +29,20 @@ namespace SixLabors.ImageSharp.Processing.Processors.Effects
}
///
- /// Gets the intensity levels
+ /// Gets the number of intensity levels.
///
public int Levels { get; }
///
- /// Gets the brush size
+ /// Gets the brush size.
///
public int BrushSize { get; }
- ///
- protected override void OnFrameApply(
- ImageFrame source,
- Rectangle sourceRectangle,
- Configuration configuration)
+ ///
+ public IImageProcessor CreatePixelSpecificProcessor()
+ where TPixel : struct, IPixel
{
- if (this.BrushSize <= 0 || this.BrushSize > source.Height || this.BrushSize > source.Width)
- {
- throw new ArgumentOutOfRangeException(nameof(this.BrushSize));
- }
-
- int startY = sourceRectangle.Y;
- int endY = sourceRectangle.Bottom;
- int startX = sourceRectangle.X;
- int endX = sourceRectangle.Right;
- int maxY = endY - 1;
- int maxX = endX - 1;
-
- int radius = this.BrushSize >> 1;
- int levels = this.Levels;
-
- using (Buffer2D targetPixels = configuration.MemoryAllocator.Allocate2D(source.Size()))
- {
- source.CopyTo(targetPixels);
-
- var workingRect = Rectangle.FromLTRB(startX, startY, endX, endY);
- ParallelHelper.IterateRows(
- workingRect,
- configuration,
- rows =>
- {
- for (int y = rows.Min; y < rows.Max; y++)
- {
- Span sourceRow = source.GetPixelRowSpan(y);
- Span targetRow = targetPixels.GetRowSpan(y);
-
- for (int x = startX; x < endX; x++)
- {
- int maxIntensity = 0;
- int maxIndex = 0;
-
- int[] intensityBin = new int[levels];
- float[] redBin = new float[levels];
- float[] blueBin = new float[levels];
- float[] greenBin = new float[levels];
-
- for (int fy = 0; fy <= radius; fy++)
- {
- int fyr = fy - radius;
- int offsetY = y + fyr;
-
- offsetY = offsetY.Clamp(0, maxY);
-
- Span sourceOffsetRow = source.GetPixelRowSpan(offsetY);
-
- for (int fx = 0; fx <= radius; fx++)
- {
- int fxr = fx - radius;
- int offsetX = x + fxr;
- offsetX = offsetX.Clamp(0, maxX);
-
- var vector = sourceOffsetRow[offsetX].ToVector4();
-
- float sourceRed = vector.X;
- float sourceBlue = vector.Z;
- float sourceGreen = vector.Y;
-
- int currentIntensity = (int)MathF.Round(
- (sourceBlue + sourceGreen + sourceRed) / 3F * (levels - 1));
-
- intensityBin[currentIntensity]++;
- blueBin[currentIntensity] += sourceBlue;
- greenBin[currentIntensity] += sourceGreen;
- redBin[currentIntensity] += sourceRed;
-
- if (intensityBin[currentIntensity] > maxIntensity)
- {
- maxIntensity = intensityBin[currentIntensity];
- maxIndex = currentIntensity;
- }
- }
-
- float red = MathF.Abs(redBin[maxIndex] / maxIntensity);
- float green = MathF.Abs(greenBin[maxIndex] / maxIntensity);
- float blue = MathF.Abs(blueBin[maxIndex] / maxIntensity);
-
- ref TPixel pixel = ref targetRow[x];
- pixel.FromVector4(
- new Vector4(red, green, blue, sourceRow[x].ToVector4().W));
- }
- }
- }
- });
-
- Buffer2D.SwapOrCopyContent(source.PixelBuffer, targetPixels);
- }
+ return new OilPaintingProcessor(this);
}
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs
new file mode 100644
index 000000000..9775e5ca9
--- /dev/null
+++ b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Six Labors and contributors.
+/// Licensed under the Apache License, Version 2.0.
+
+using System;
+using System.Numerics;
+
+using SixLabors.ImageSharp.Advanced;
+using SixLabors.ImageSharp.Memory;
+using SixLabors.ImageSharp.ParallelUtils;
+using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.Primitives;
+
+namespace SixLabors.ImageSharp.Processing.Processors.Effects
+{
+ ///
+ /// Applies oil painting effect processing to the image.
+ ///
+ /// Adapted from by Dewald Esterhuizen.
+ /// The pixel format.
+ internal class OilPaintingProcessor : ImageProcessor
+ where TPixel : struct, IPixel
+ {
+ private readonly OilPaintingProcessor definition;
+
+ public OilPaintingProcessor(OilPaintingProcessor definition)
+ {
+ this.definition = definition;
+ }
+
+ ///
+ protected override void OnFrameApply(
+ ImageFrame source,
+ Rectangle sourceRectangle,
+ Configuration configuration)
+ {
+ int brushSize = this.definition.BrushSize;
+ if (brushSize <= 0 || brushSize > source.Height || brushSize > source.Width)
+ {
+ throw new ArgumentOutOfRangeException(nameof(brushSize));
+ }
+
+ int startY = sourceRectangle.Y;
+ int endY = sourceRectangle.Bottom;
+ int startX = sourceRectangle.X;
+ int endX = sourceRectangle.Right;
+ int maxY = endY - 1;
+ int maxX = endX - 1;
+
+ int radius = brushSize >> 1;
+ int levels = this.definition.Levels;
+
+ using (Buffer2D targetPixels = configuration.MemoryAllocator.Allocate2D(source.Size()))
+ {
+ source.CopyTo(targetPixels);
+
+ var workingRect = Rectangle.FromLTRB(startX, startY, endX, endY);
+ ParallelHelper.IterateRows(
+ workingRect,
+ configuration,
+ rows =>
+ {
+ for (int y = rows.Min; y < rows.Max; y++)
+ {
+ Span sourceRow = source.GetPixelRowSpan(y);
+ Span targetRow = targetPixels.GetRowSpan(y);
+
+ for (int x = startX; x < endX; x++)
+ {
+ int maxIntensity = 0;
+ int maxIndex = 0;
+
+ int[] intensityBin = new int[levels];
+ float[] redBin = new float[levels];
+ float[] blueBin = new float[levels];
+ float[] greenBin = new float[levels];
+
+ for (int fy = 0; fy <= radius; fy++)
+ {
+ int fyr = fy - radius;
+ int offsetY = y + fyr;
+
+ offsetY = offsetY.Clamp(0, maxY);
+
+ Span sourceOffsetRow = source.GetPixelRowSpan(offsetY);
+
+ for (int fx = 0; fx <= radius; fx++)
+ {
+ int fxr = fx - radius;
+ int offsetX = x + fxr;
+ offsetX = offsetX.Clamp(0, maxX);
+
+ var vector = sourceOffsetRow[offsetX].ToVector4();
+
+ float sourceRed = vector.X;
+ float sourceBlue = vector.Z;
+ float sourceGreen = vector.Y;
+
+ int currentIntensity = (int)MathF.Round(
+ (sourceBlue + sourceGreen + sourceRed) / 3F * (levels - 1));
+
+ intensityBin[currentIntensity]++;
+ blueBin[currentIntensity] += sourceBlue;
+ greenBin[currentIntensity] += sourceGreen;
+ redBin[currentIntensity] += sourceRed;
+
+ if (intensityBin[currentIntensity] > maxIntensity)
+ {
+ maxIntensity = intensityBin[currentIntensity];
+ maxIndex = currentIntensity;
+ }
+ }
+
+ float red = MathF.Abs(redBin[maxIndex] / maxIntensity);
+ float green = MathF.Abs(greenBin[maxIndex] / maxIntensity);
+ float blue = MathF.Abs(blueBin[maxIndex] / maxIntensity);
+
+ ref TPixel pixel = ref targetRow[x];
+ pixel.FromVector4(
+ new Vector4(red, green, blue, sourceRow[x].ToVector4().W));
+ }
+ }
+ }
+ });
+
+ Buffer2D.SwapOrCopyContent(source.PixelBuffer, targetPixels);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor.cs b/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor.cs
index 50f76efed..eeb2aafcb 100644
--- a/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor.cs
+++ b/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor.cs
@@ -1,25 +1,17 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Common;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Processors.Effects
{
///
- /// Applies a pixelation effect processing to the image.
+ /// Defines a pixelation effect of a given size.
///
- /// The pixel format.
- internal class PixelateProcessor : ImageProcessor
- where TPixel : struct, IPixel
+ public class PixelateProcessor : IImageProcessor
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The size of the pixels. Must be greater than 0.
///
@@ -36,80 +28,11 @@ namespace SixLabors.ImageSharp.Processing.Processors.Effects
///
public int Size { get; }
- ///
- protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ ///
+ public IImageProcessor CreatePixelSpecificProcessor()
+ where TPixel : struct, IPixel
{
- if (this.Size <= 0 || this.Size > source.Height || this.Size > source.Width)
- {
- throw new ArgumentOutOfRangeException(nameof(this.Size));
- }
-
- int startY = sourceRectangle.Y;
- int endY = sourceRectangle.Bottom;
- int startX = sourceRectangle.X;
- int endX = sourceRectangle.Right;
- int size = this.Size;
- int offset = this.Size / 2;
-
- // Align start/end positions.
- int minX = Math.Max(0, startX);
- int maxX = Math.Min(source.Width, endX);
- int minY = Math.Max(0, startY);
- int maxY = Math.Min(source.Height, endY);
-
- // Reset offset if necessary.
- if (minX > 0)
- {
- startX = 0;
- }
-
- if (minY > 0)
- {
- startY = 0;
- }
-
- // Get the range on the y-plane to choose from.
- IEnumerable range = EnumerableExtensions.SteppedRange(minY, i => i < maxY, size);
-
- Parallel.ForEach(
- range,
- configuration.GetParallelOptions(),
- y =>
- {
- int offsetY = y - startY;
- int offsetPy = offset;
-
- // Make sure that the offset is within the boundary of the image.
- while (offsetY + offsetPy >= maxY)
- {
- offsetPy--;
- }
-
- Span row = source.GetPixelRowSpan(offsetY + offsetPy);
-
- for (int x = minX; x < maxX; x += size)
- {
- int offsetX = x - startX;
- int offsetPx = offset;
-
- while (x + offsetPx >= maxX)
- {
- offsetPx--;
- }
-
- // Get the pixel color in the centre of the soon to be pixelated area.
- TPixel pixel = row[offsetX + offsetPx];
-
- // For each pixel in the pixelate size, set it to the centre color.
- for (int l = offsetY; l < offsetY + size && l < maxY; l++)
- {
- for (int k = offsetX; k < offsetX + size && k < maxX; k++)
- {
- source[k, l] = pixel;
- }
- }
- }
- });
+ return new PixelateProcessor(this);
}
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor{TPixel}.cs
new file mode 100644
index 000000000..21f3bb774
--- /dev/null
+++ b/src/ImageSharp/Processing/Processors/Effects/PixelateProcessor{TPixel}.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Six Labors and contributors.
+// Licensed under the Apache License, Version 2.0.
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+using SixLabors.ImageSharp.Advanced;
+using SixLabors.ImageSharp.Common;
+using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.Primitives;
+
+namespace SixLabors.ImageSharp.Processing.Processors.Effects
+{
+ ///
+ /// Applies a pixelation effect processing to the image.
+ ///
+ /// The pixel format.
+ internal class PixelateProcessor : ImageProcessor
+ where TPixel : struct, IPixel
+ {
+ private readonly PixelateProcessor definition;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The .
+ public PixelateProcessor(PixelateProcessor definition)
+ {
+ this.definition = definition;
+ }
+
+ private int Size => this.definition.Size;
+
+ ///
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ {
+ if (this.Size <= 0 || this.Size > source.Height || this.Size > source.Width)
+ {
+ throw new ArgumentOutOfRangeException(nameof(this.Size));
+ }
+
+ int startY = sourceRectangle.Y;
+ int endY = sourceRectangle.Bottom;
+ int startX = sourceRectangle.X;
+ int endX = sourceRectangle.Right;
+ int size = this.Size;
+ int offset = this.Size / 2;
+
+ // Align start/end positions.
+ int minX = Math.Max(0, startX);
+ int maxX = Math.Min(source.Width, endX);
+ int minY = Math.Max(0, startY);
+ int maxY = Math.Min(source.Height, endY);
+
+ // Reset offset if necessary.
+ if (minX > 0)
+ {
+ startX = 0;
+ }
+
+ if (minY > 0)
+ {
+ startY = 0;
+ }
+
+ // Get the range on the y-plane to choose from.
+ IEnumerable range = EnumerableExtensions.SteppedRange(minY, i => i < maxY, size);
+
+ Parallel.ForEach(
+ range,
+ configuration.GetParallelOptions(),
+ y =>
+ {
+ int offsetY = y - startY;
+ int offsetPy = offset;
+
+ // Make sure that the offset is within the boundary of the image.
+ while (offsetY + offsetPy >= maxY)
+ {
+ offsetPy--;
+ }
+
+ Span row = source.GetPixelRowSpan(offsetY + offsetPy);
+
+ for (int x = minX; x < maxX; x += size)
+ {
+ int offsetX = x - startX;
+ int offsetPx = offset;
+
+ while (x + offsetPx >= maxX)
+ {
+ offsetPx--;
+ }
+
+ // Get the pixel color in the centre of the soon to be pixelated area.
+ TPixel pixel = row[offsetX + offsetPx];
+
+ // For each pixel in the pixelate size, set it to the centre color.
+ for (int l = offsetY; l < offsetY + size && l < maxY; l++)
+ {
+ for (int k = offsetX; k < offsetX + size && k < maxX; k++)
+ {
+ source[k, l] = pixel;
+ }
+ }
+ }
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
index 9cd24fc6d..6e1ee40f5 100644
--- a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
@@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void OilPaint_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint();
- var processor = this.Verify>();
+ var processor = this.Verify();
Assert.Equal(10, processor.Levels);
Assert.Equal(15, processor.BrushSize);
@@ -24,7 +24,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void OilPaint_rect_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint(this.rect);
- var processor = this.Verify>(this.rect);
+ var processor = this.Verify(this.rect);
Assert.Equal(10, processor.Levels);
Assert.Equal(15, processor.BrushSize);
@@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void OilPaint_Levels_Brsuh_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint(34, 65);
- var processor = this.Verify>();
+ var processor = this.Verify();
Assert.Equal(34, processor.Levels);
Assert.Equal(65, processor.BrushSize);
@@ -43,7 +43,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void OilPaint_Levels_Brsuh_rect_OilPaintingProcessorDefaultsSet()
{
this.operations.OilPaint(54, 43, this.rect);
- var processor = this.Verify>(this.rect);
+ var processor = this.Verify(this.rect);
Assert.Equal(54, processor.Levels);
Assert.Equal(43, processor.BrushSize);
diff --git a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs
index a93eaf0bc..d8ce29170 100644
--- a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs
@@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void Pixelate_PixelateProcessorDefaultsSet()
{
this.operations.Pixelate();
- var processor = this.Verify>();
+ var processor = this.Verify();
Assert.Equal(4, processor.Size);
}
@@ -23,7 +23,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void Pixelate_Size_PixelateProcessorDefaultsSet()
{
this.operations.Pixelate(12);
- var processor = this.Verify>();
+ var processor = this.Verify();
Assert.Equal(12, processor.Size);
}
@@ -32,7 +32,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Effects
public void Pixelate_Size_rect_PixelateProcessorDefaultsSet()
{
this.operations.Pixelate(23, this.rect);
- var processor = this.Verify>(this.rect);
+ var processor = this.Verify(this.rect);
Assert.Equal(23, processor.Size);
}