diff --git a/ImageSharp.ruleset b/ImageSharp.ruleset
index 2149364b1..3567dc4b9 100644
--- a/ImageSharp.ruleset
+++ b/ImageSharp.ruleset
@@ -7,5 +7,7 @@
temp remove the header requirement as stylecop is currently failing to read the stylecop.json file from 'dotnet build'
-->
+
+
\ No newline at end of file
diff --git a/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs b/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
index 632b4d449..46e27be78 100644
--- a/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
@@ -56,7 +56,7 @@ namespace SixLabors.ImageSharp.Drawing.Processors
public Point Location { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
Image targetImage = this.Image;
PixelBlender blender = this.Blender;
diff --git a/src/ImageSharp.Drawing/Processors/FillProcessor.cs b/src/ImageSharp.Drawing/Processors/FillProcessor.cs
index 3bf18a37b..b8cbddcba 100644
--- a/src/ImageSharp.Drawing/Processors/FillProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/FillProcessor.cs
@@ -40,7 +40,7 @@ namespace SixLabors.ImageSharp.Drawing.Processors
}
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
int startX = sourceRectangle.X;
int endX = sourceRectangle.Right;
diff --git a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs b/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
index 076785526..66a35f151 100644
--- a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
+++ b/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
@@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Drawing.Processors
public GraphicsOptions Options { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
Region region = this.Region;
Rectangle rect = region.Bounds;
diff --git a/src/ImageSharp/Dithering/ErrorDiffusion/KnownDiffusers.cs b/src/ImageSharp/Dithering/ErrorDiffusion/Diffusers.cs
similarity index 98%
rename from src/ImageSharp/Dithering/ErrorDiffusion/KnownDiffusers.cs
rename to src/ImageSharp/Dithering/ErrorDiffusion/Diffusers.cs
index c75530b8e..6e2055e34 100644
--- a/src/ImageSharp/Dithering/ErrorDiffusion/KnownDiffusers.cs
+++ b/src/ImageSharp/Dithering/ErrorDiffusion/Diffusers.cs
@@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Dithering
///
/// Contains reusable static instances of known error diffusion algorithms
///
- public static class KnownDiffusers
+ public static class Diffusers
{
///
/// Gets the error diffuser that implements the Atkinson algorithm.
diff --git a/src/ImageSharp/Dithering/Ordered/KnownDitherers.cs b/src/ImageSharp/Dithering/Ordered/Ditherers.cs
similarity index 97%
rename from src/ImageSharp/Dithering/Ordered/KnownDitherers.cs
rename to src/ImageSharp/Dithering/Ordered/Ditherers.cs
index e58cbad8a..53e94dca4 100644
--- a/src/ImageSharp/Dithering/Ordered/KnownDitherers.cs
+++ b/src/ImageSharp/Dithering/Ordered/Ditherers.cs
@@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Dithering
///
/// Contains reusable static instances of known ordered dither matrices
///
- public class KnownDitherers
+ public class Ditherers
{
///
/// Gets the order ditherer using the 2x2 Bayer dithering matrix
diff --git a/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.FromGrayScale.cs b/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.FromGrayScale.cs
index 5c720e61c..4769bef1d 100644
--- a/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.FromGrayScale.cs
+++ b/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.FromGrayScale.cs
@@ -8,10 +8,10 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Common.Decoder.ColorConverters
{
internal abstract partial class JpegColorConverter
{
- internal class FromGrayScale : ColorConverters.JpegColorConverter
+ internal class FromGrayscale : ColorConverters.JpegColorConverter
{
- public FromGrayScale()
- : base(JpegColorSpace.GrayScale)
+ public FromGrayscale()
+ : base(JpegColorSpace.Grayscale)
{
}
diff --git a/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.cs b/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.cs
index 187b65f72..4391be548 100644
--- a/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.cs
+++ b/src/ImageSharp/Formats/Jpeg/Common/Decoder/ColorConverters/JpegColorConverter.cs
@@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Common.Decoder.ColorConverters
///
private static readonly JpegColorConverter[] Converters =
{
- GetYCbCrConverter(), new FromYccK(), new FromCmyk(), new FromGrayScale(), new FromRgb()
+ GetYCbCrConverter(), new FromYccK(), new FromCmyk(), new FromGrayscale(), new FromRgb()
};
///
diff --git a/src/ImageSharp/Formats/Jpeg/Common/Decoder/JpegColorSpace.cs b/src/ImageSharp/Formats/Jpeg/Common/Decoder/JpegColorSpace.cs
index da353d279..abc93727e 100644
--- a/src/ImageSharp/Formats/Jpeg/Common/Decoder/JpegColorSpace.cs
+++ b/src/ImageSharp/Formats/Jpeg/Common/Decoder/JpegColorSpace.cs
@@ -7,7 +7,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Common.Decoder
{
Undefined = 0,
- GrayScale,
+ Grayscale,
Ycck,
diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs
index 6cc275d49..d3d1efe7f 100644
--- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs
@@ -640,7 +640,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort
switch (remaining)
{
- case 6 + (3 * 1): // Grayscale image.
+ case 6 + (3 * 1): // grayscale image.
this.ComponentCount = 1;
break;
case 6 + (3 * 3): // YCbCr or RGB image.
@@ -767,7 +767,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort
switch (this.ComponentCount)
{
case 1:
- return JpegColorSpace.GrayScale;
+ return JpegColorSpace.Grayscale;
case 3:
if (!this.isAdobe || this.adobe.ColorTransform == OrigJpegConstants.Adobe.ColorTransformYCbCr)
{
@@ -790,7 +790,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort
}
throw new ImageFormatException($"Unsupported color mode. Max components 4; found {this.ComponentCount}."
- + "JpegDecoder only supports YCbCr, RGB, YccK, CMYK and Grayscale color spaces.");
+ + "JpegDecoder only supports YCbCr, RGB, YccK, CMYK and grayscale color spaces.");
}
private Image PostProcessIntoImage()
diff --git a/src/ImageSharp/Formats/Png/PngDecoder.cs b/src/ImageSharp/Formats/Png/PngDecoder.cs
index 9bde4f8cc..57d45ecdd 100644
--- a/src/ImageSharp/Formats/Png/PngDecoder.cs
+++ b/src/ImageSharp/Formats/Png/PngDecoder.cs
@@ -20,8 +20,8 @@ namespace SixLabors.ImageSharp.Formats.Png
///
/// - RGBA (True color) with alpha (8 bit).
/// - RGB (True color) without alpha (8 bit).
- /// - Grayscale with alpha (8 bit).
- /// - Grayscale without alpha (8 bit).
+ /// - grayscale with alpha (8 bit).
+ /// - grayscale without alpha (8 bit).
/// - Palette Index with alpha (8 bit).
/// - Palette Index without alpha (8 bit).
///
diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs
index 1d1db2787..dba4eaa15 100644
--- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs
+++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs
@@ -170,7 +170,7 @@ namespace SixLabors.ImageSharp.Formats.Png
private Rgb24 rgb24Trans;
///
- /// Represents any color in a Grayscale encoded png that should be transparent
+ /// Represents any color in a grayscale encoded png that should be transparent
///
private byte intensityTrans;
diff --git a/src/ImageSharp/IImageProcessor.cs b/src/ImageSharp/IImageProcessor.cs
index bd6df8d83..c7fb565ca 100644
--- a/src/ImageSharp/IImageProcessor.cs
+++ b/src/ImageSharp/IImageProcessor.cs
@@ -24,7 +24,7 @@ namespace SixLabors.ImageSharp
/// is null.
///
///
- /// doesnt fit the dimension of the image.
+ /// doesn't fit the dimension of the image.
///
void Apply(Image source, Rectangle sourceRectangle);
}
diff --git a/src/ImageSharp/ImageSharp.csproj b/src/ImageSharp/ImageSharp.csproj
index 86a0ab7ea..443383679 100644
--- a/src/ImageSharp/ImageSharp.csproj
+++ b/src/ImageSharp/ImageSharp.csproj
@@ -37,7 +37,7 @@
-
+
All
@@ -126,7 +126,4 @@
PorterDuffFunctions.Generated.tt
-
-
-
\ No newline at end of file
diff --git a/src/ImageSharp/Numerics/ValueSize.cs b/src/ImageSharp/Numerics/ValueSize.cs
index fcf61a586..02573816d 100644
--- a/src/ImageSharp/Numerics/ValueSize.cs
+++ b/src/ImageSharp/Numerics/ValueSize.cs
@@ -61,9 +61,9 @@ namespace SixLabors.ImageSharp
///
/// Implicitly converts a float into an absolute value
///
- /// the vlaue to use as the absolute figure.
- public static implicit operator ValueSize(float d)
- => Absolute(d);
+ /// the value to use as the absolute figure.
+ public static implicit operator ValueSize(float f)
+ => Absolute(f);
///
/// Create a new ValueSize with as a PercentageOfWidth type with value set to percentage.
@@ -99,7 +99,7 @@ namespace SixLabors.ImageSharp
/// Calculates the specified size.
///
/// The size.
- /// The calucalted value
+ /// The calculated value
public float Calculate(Size size)
{
switch (this.Type)
@@ -123,7 +123,7 @@ namespace SixLabors.ImageSharp
///
public bool Equals(ValueSize other)
{
- return this.Type == other.Type && this.Value == other.Value;
+ return this.Type == other.Type && this.Value.Equals(other.Value);
}
}
}
diff --git a/src/ImageSharp/Processing/Binarization/BinaryDiffuse.cs b/src/ImageSharp/Processing/Binarization/BinaryDiffuseExtensions.cs
similarity index 82%
rename from src/ImageSharp/Processing/Binarization/BinaryDiffuse.cs
rename to src/ImageSharp/Processing/Binarization/BinaryDiffuseExtensions.cs
index eb5008757..d06a9b75b 100644
--- a/src/ImageSharp/Processing/Binarization/BinaryDiffuse.cs
+++ b/src/ImageSharp/Processing/Binarization/BinaryDiffuseExtensions.cs
@@ -3,15 +3,15 @@
using SixLabors.ImageSharp.Dithering;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Binarization.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Binarization
{
///
- /// Extension methods for the type.
+ /// Adds binary diffusion extensions to the type.
///
- public static partial class ImageExtensions
+ public static class BinaryDiffuseExtensions
{
///
/// Dithers the image reducing it to two colors using error diffusion.
@@ -23,10 +23,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDiffuse(this IImageProcessingContext source, IErrorDiffuser diffuser, float threshold)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold));
- return source;
- }
+ => source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold));
///
/// Dithers the image reducing it to two colors using error diffusion.
@@ -41,10 +38,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDiffuse(this IImageProcessingContext source, IErrorDiffuser diffuser, float threshold, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold), rectangle);
///
/// Dithers the image reducing it to two colors using error diffusion.
@@ -58,10 +52,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDiffuse(this IImageProcessingContext source, IErrorDiffuser diffuser, float threshold, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold, upperColor, lowerColor));
- return source;
- }
+ => source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold, upperColor, lowerColor));
///
/// Dithers the image reducing it to two colors using error diffusion.
@@ -78,9 +69,6 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDiffuse(this IImageProcessingContext source, IErrorDiffuser diffuser, float threshold, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold, upperColor, lowerColor), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryErrorDiffusionProcessor(diffuser, threshold, upperColor, lowerColor), rectangle);
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Binarization/BinaryDither.cs b/src/ImageSharp/Processing/Binarization/BinaryDitherExtensions.cs
similarity index 81%
rename from src/ImageSharp/Processing/Binarization/BinaryDither.cs
rename to src/ImageSharp/Processing/Binarization/BinaryDitherExtensions.cs
index 715dff472..039fc57b7 100644
--- a/src/ImageSharp/Processing/Binarization/BinaryDither.cs
+++ b/src/ImageSharp/Processing/Binarization/BinaryDitherExtensions.cs
@@ -3,15 +3,15 @@
using SixLabors.ImageSharp.Dithering;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Binarization.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Binarization
{
///
- /// Extension methods for the type.
+ /// Adds binary dithering extensions to the type.
///
- public static partial class ImageExtensions
+ public static class BinaryDitherExtensions
{
///
/// Dithers the image reducing it to two colors using ordered dithering.
@@ -22,10 +22,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IOrderedDither dither)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither));
- return source;
- }
+ => source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither));
///
/// Dithers the image reducing it to two colors using ordered dithering.
@@ -38,10 +35,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IOrderedDither dither, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither, upperColor, lowerColor));
- return source;
- }
+ => source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither, upperColor, lowerColor));
///
/// Dithers the image reducing it to two colors using ordered dithering.
@@ -55,10 +49,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IOrderedDither dither, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither), rectangle);
///
/// Dithers the image reducing it to two colors using ordered dithering.
@@ -74,9 +65,6 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IOrderedDither dither, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither, upperColor, lowerColor), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryOrderedDitherProcessor(dither, upperColor, lowerColor), rectangle);
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Binarization/BinaryThreshold.cs b/src/ImageSharp/Processing/Binarization/BinaryThresholdExtensions.cs
similarity index 82%
rename from src/ImageSharp/Processing/Binarization/BinaryThreshold.cs
rename to src/ImageSharp/Processing/Binarization/BinaryThresholdExtensions.cs
index 3f86528f5..005061394 100644
--- a/src/ImageSharp/Processing/Binarization/BinaryThreshold.cs
+++ b/src/ImageSharp/Processing/Binarization/BinaryThresholdExtensions.cs
@@ -2,15 +2,15 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Binarization.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Binarization
{
///
- /// Extension methods for the type.
+ /// Adds binary thresholding extensions to the type.
///
- public static partial class ImageExtensions
+ public static class BinaryThresholdExtensions
{
///
/// Applies binarization to the image splitting the pixels at the given threshold.
@@ -21,10 +21,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryThresholdProcessor(threshold));
- return source;
- }
+ => source.ApplyProcessor(new BinaryThresholdProcessor(threshold));
///
/// Applies binarization to the image splitting the pixels at the given threshold.
@@ -38,10 +35,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryThresholdProcessor(threshold), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryThresholdProcessor(threshold), rectangle);
///
/// Applies binarization to the image splitting the pixels at the given threshold.
@@ -54,10 +48,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryThresholdProcessor(threshold, upperColor, lowerColor));
- return source;
- }
+ => source.ApplyProcessor(new BinaryThresholdProcessor(threshold, upperColor, lowerColor));
///
/// Applies binarization to the image splitting the pixels at the given threshold.
@@ -73,9 +64,6 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new BinaryThresholdProcessor(threshold, upperColor, lowerColor), rectangle);
- return source;
- }
+ => source.ApplyProcessor(new BinaryThresholdProcessor(threshold, upperColor, lowerColor), rectangle);
}
}
diff --git a/src/ImageSharp/Processing/Processors/Binarization/BinaryErrorDiffusionProcessor.cs b/src/ImageSharp/Processing/Binarization/Processors/BinaryErrorDiffusionProcessor.cs
similarity index 96%
rename from src/ImageSharp/Processing/Processors/Binarization/BinaryErrorDiffusionProcessor.cs
rename to src/ImageSharp/Processing/Binarization/Processors/BinaryErrorDiffusionProcessor.cs
index 80a423645..9e96ddcde 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/BinaryErrorDiffusionProcessor.cs
+++ b/src/ImageSharp/Processing/Binarization/Processors/BinaryErrorDiffusionProcessor.cs
@@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Helpers;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Processors
+namespace SixLabors.ImageSharp.Processing.Binarization.Processors
{
///
/// Performs binary threshold filtering against an image using error diffusion.
@@ -75,7 +75,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public TPixel LowerColor { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
float threshold = this.Threshold * 255F;
var rgba = default(Rgba32);
diff --git a/src/ImageSharp/Processing/Processors/Binarization/BinaryOrderedDitherProcessor.cs b/src/ImageSharp/Processing/Binarization/Processors/BinaryOrderedDitherProcessor.cs
similarity index 95%
rename from src/ImageSharp/Processing/Processors/Binarization/BinaryOrderedDitherProcessor.cs
rename to src/ImageSharp/Processing/Binarization/Processors/BinaryOrderedDitherProcessor.cs
index baa8df8cc..8d72ba66f 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/BinaryOrderedDitherProcessor.cs
+++ b/src/ImageSharp/Processing/Binarization/Processors/BinaryOrderedDitherProcessor.cs
@@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Helpers;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Processors
+namespace SixLabors.ImageSharp.Processing.Binarization.Processors
{
///
/// Performs binary threshold filtering against an image using ordered dithering.
@@ -57,7 +57,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public TPixel LowerColor { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
var rgba = default(Rgba32);
bool isAlphaOnly = typeof(TPixel) == typeof(Alpha8);
diff --git a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs b/src/ImageSharp/Processing/Binarization/Processors/BinaryThresholdProcessor.cs
similarity index 94%
rename from src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs
rename to src/ImageSharp/Processing/Binarization/Processors/BinaryThresholdProcessor.cs
index 609b09092..39d829c73 100644
--- a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor.cs
+++ b/src/ImageSharp/Processing/Binarization/Processors/BinaryThresholdProcessor.cs
@@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Helpers;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Processors
+namespace SixLabors.ImageSharp.Processing.Binarization.Processors
{
///
/// Performs simple binary threshold filtering against an image.
@@ -56,7 +56,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public TPixel LowerColor { get; set; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
float threshold = this.Threshold * 255F;
TPixel upper = this.UpperColor;
diff --git a/src/ImageSharp/Processing/ColorMatrix/Lomograph.cs b/src/ImageSharp/Processing/ColorMatrix/Lomograph.cs
deleted file mode 100644
index ca79841c7..000000000
--- a/src/ImageSharp/Processing/ColorMatrix/Lomograph.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Six Labors and contributors.
-// Licensed under the Apache License, Version 2.0.
-
-using System;
-using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors;
-using SixLabors.Primitives;
-
-namespace SixLabors.ImageSharp
-{
- ///
- /// Extension methods for the type.
- ///
- public static partial class ImageExtensions
- {
- ///
- /// Alters the colors of the image recreating an old Lomograph camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- /// The .
- public static IImageProcessingContext Lomograph(this IImageProcessingContext source)
- where TPixel : struct, IPixel
- {
- return Lomograph(source, GraphicsOptions.Default);
- }
-
- ///
- /// Alters the colors of the image recreating an old Lomograph camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
- /// The .
- public static IImageProcessingContext Lomograph(this IImageProcessingContext source, Rectangle rectangle)
- where TPixel : struct, IPixel
- {
- return Lomograph(source, rectangle, GraphicsOptions.Default);
- }
-
- ///
- /// Alters the colors of the image recreating an old Lomograph camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- /// The options effecting pixel blending.
- /// The .
- public static IImageProcessingContext Lomograph(this IImageProcessingContext source, GraphicsOptions options)
- where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new LomographProcessor(source.MemoryManager, options));
- return source;
- }
-
- ///
- /// Alters the colors of the image recreating an old Lomograph camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
- /// The options effecting pixel blending.
- /// The .
- public static IImageProcessingContext Lomograph(this IImageProcessingContext source, Rectangle rectangle, GraphicsOptions options)
- where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new LomographProcessor(source.MemoryManager, options), rectangle);
- return source;
- }
- }
-}
diff --git a/src/ImageSharp/Processing/ColorMatrix/Polaroid.cs b/src/ImageSharp/Processing/ColorMatrix/Polaroid.cs
deleted file mode 100644
index d12cc7612..000000000
--- a/src/ImageSharp/Processing/ColorMatrix/Polaroid.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Six Labors and contributors.
-// Licensed under the Apache License, Version 2.0.
-
-using System;
-using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors;
-using SixLabors.Primitives;
-
-namespace SixLabors.ImageSharp
-{
- ///
- /// Extension methods for the type.
- ///
- public static partial class ImageExtensions
- {
- ///
- /// Alters the colors of the image recreating an old Polaroid camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- /// The .
- public static IImageProcessingContext Polaroid(this IImageProcessingContext source)
- where TPixel : struct, IPixel
- {
- return Polaroid(source, GraphicsOptions.Default);
- }
-
- ///
- /// Alters the colors of the image recreating an old Polaroid camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
- /// The .
- public static IImageProcessingContext Polaroid(this IImageProcessingContext source, Rectangle rectangle)
- where TPixel : struct, IPixel
- {
- return Polaroid(source, rectangle, GraphicsOptions.Default);
- }
-
- ///
- /// Alters the colors of the image recreating an old Polaroid camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- /// The options effecting pixel blending.
- /// The .
- public static IImageProcessingContext Polaroid(this IImageProcessingContext source, GraphicsOptions options)
- where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new PolaroidProcessor(source.MemoryManager, options));
- return source;
- }
-
- ///
- /// Alters the colors of the image recreating an old Polaroid camera effect.
- ///
- /// The pixel format.
- /// The image this method extends.
- ///
- /// The structure that specifies the portion of the image object to alter.
- ///
- /// The options effecting pixel blending.
- /// The .
- public static IImageProcessingContext Polaroid(this IImageProcessingContext source, Rectangle rectangle, GraphicsOptions options)
- where TPixel : struct, IPixel
- {
- source.ApplyProcessor(new PolaroidProcessor(source.MemoryManager, options), rectangle);
- return source;
- }
- }
-}
diff --git a/src/ImageSharp/Processing/Convolution/BoxBlur.cs b/src/ImageSharp/Processing/Convolution/BoxBlurExtensions.cs
similarity index 90%
rename from src/ImageSharp/Processing/Convolution/BoxBlur.cs
rename to src/ImageSharp/Processing/Convolution/BoxBlurExtensions.cs
index b0c6ffc8d..edb798fb4 100644
--- a/src/ImageSharp/Processing/Convolution/BoxBlur.cs
+++ b/src/ImageSharp/Processing/Convolution/BoxBlurExtensions.cs
@@ -1,17 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Convolution.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Convolution
{
///
- /// Extension methods for the type.
+ /// Adds box blurring extensions to the type.
///
- public static partial class ImageExtensions
+ public static class BoxBlurExtensions
{
///
/// Applies a box blur to the image.
@@ -21,7 +20,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext BoxBlur(this IImageProcessingContext source)
where TPixel : struct, IPixel
- => source.ApplyProcessor(new BoxBlurProcessor(7));
+ => source.ApplyProcessor(new BoxBlurProcessor());
///
/// Applies a box blur to the image.
@@ -48,4 +47,4 @@ namespace SixLabors.ImageSharp
where TPixel : struct, IPixel
=> source.ApplyProcessor(new BoxBlurProcessor(radius), rectangle);
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Convolution/DetectEdges.cs b/src/ImageSharp/Processing/Convolution/DetectEdgesExtensions.cs
similarity index 74%
rename from src/ImageSharp/Processing/Convolution/DetectEdges.cs
rename to src/ImageSharp/Processing/Convolution/DetectEdgesExtensions.cs
index 79e7ac6cf..a2b2b244b 100644
--- a/src/ImageSharp/Processing/Convolution/DetectEdges.cs
+++ b/src/ImageSharp/Processing/Convolution/DetectEdgesExtensions.cs
@@ -1,35 +1,31 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Convolution.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Convolution
{
///
- /// Extension methods for the type.
+ /// Adds edge detection extensions to the type.
///
- public static partial class ImageExtensions
+ public static class DetectEdgesExtensions
{
///
/// Detects any edges within the image. Uses the filter
- /// operating in Grayscale mode.
+ /// operating in grayscale mode.
///
/// The pixel format.
/// The image this method extends.
/// The .
public static IImageProcessingContext DetectEdges(this IImageProcessingContext source)
where TPixel : struct, IPixel
- {
- return DetectEdges(source, new SobelProcessor { Grayscale = true });
- }
+ => DetectEdges(source, new SobelProcessor(true));
///
/// Detects any edges within the image. Uses the filter
- /// operating in Grayscale mode.
+ /// operating in grayscale mode.
///
/// The pixel format.
/// The image this method extends.
@@ -39,9 +35,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, Rectangle rectangle)
where TPixel : struct, IPixel
- {
- return DetectEdges(source, rectangle, new SobelProcessor { Grayscale = true });
- }
+ => DetectEdges(source, rectangle, new SobelProcessor(true));
///
/// Detects any edges within the image.
@@ -50,7 +44,7 @@ namespace SixLabors.ImageSharp
/// The image this method extends.
/// The filter for detecting edges.
/// The .
- public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetection filter)
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetectionOperators filter)
where TPixel : struct, IPixel
=> DetectEdges(source, GetProcessor(filter, true));
@@ -60,9 +54,9 @@ namespace SixLabors.ImageSharp
/// The pixel format.
/// The image this method extends.
/// The filter for detecting edges.
- /// Whether to convert the image to Grayscale first. Defaults to true.
+ /// Whether to convert the image to grayscale first. Defaults to true.
/// The .
- public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetection filter, bool grayscale)
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetectionOperators filter, bool grayscale)
where TPixel : struct, IPixel
=> DetectEdges(source, GetProcessor(filter, grayscale));
@@ -75,9 +69,9 @@ namespace SixLabors.ImageSharp
///
/// The structure that specifies the portion of the image object to alter.
///
- /// Whether to convert the image to Grayscale first. Defaults to true.
+ /// Whether to convert the image to grayscale first. Defaults to true.
/// The .
- public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetection filter, Rectangle rectangle, bool grayscale = true)
+ public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, EdgeDetectionOperators filter, Rectangle rectangle, bool grayscale = true)
where TPixel : struct, IPixel
=> DetectEdges(source, rectangle, GetProcessor(filter, grayscale));
@@ -111,51 +105,51 @@ namespace SixLabors.ImageSharp
return source;
}
- private static IEdgeDetectorProcessor GetProcessor(EdgeDetection filter, bool grayscale)
+ private static IEdgeDetectorProcessor GetProcessor(EdgeDetectionOperators filter, bool grayscale)
where TPixel : struct, IPixel
{
IEdgeDetectorProcessor processor;
switch (filter)
{
- case EdgeDetection.Kayyali:
- processor = new KayyaliProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Kayyali:
+ processor = new KayyaliProcessor(grayscale);
break;
- case EdgeDetection.Kirsch:
- processor = new KirschProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Kirsch:
+ processor = new KirschProcessor(grayscale);
break;
- case EdgeDetection.Lapacian3X3:
- processor = new Laplacian3X3Processor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Laplacian3x3:
+ processor = new Laplacian3x3Processor(grayscale);
break;
- case EdgeDetection.Lapacian5X5:
- processor = new Laplacian5X5Processor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Laplacian5x5:
+ processor = new Laplacian5x5Processor(grayscale);
break;
- case EdgeDetection.LaplacianOfGaussian:
- processor = new LaplacianOfGaussianProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.LaplacianOfGaussian:
+ processor = new LaplacianOfGaussianProcessor(grayscale);
break;
- case EdgeDetection.Prewitt:
- processor = new PrewittProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Prewitt:
+ processor = new PrewittProcessor(grayscale);
break;
- case EdgeDetection.RobertsCross:
- processor = new RobertsCrossProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.RobertsCross:
+ processor = new RobertsCrossProcessor(grayscale);
break;
- case EdgeDetection.Robinson:
- processor = new RobinsonProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Robinson:
+ processor = new RobinsonProcessor(grayscale);
break;
- case EdgeDetection.Scharr:
- processor = new ScharrProcessor { Grayscale = grayscale };
+ case EdgeDetectionOperators.Scharr:
+ processor = new ScharrProcessor(grayscale);
break;
default:
- processor = new SobelProcessor { Grayscale = grayscale };
+ processor = new SobelProcessor(grayscale);
break;
}
diff --git a/src/ImageSharp/Processing/Convolution/Options/EdgeDetection.cs b/src/ImageSharp/Processing/Convolution/EdgeDetectionOperators.cs
similarity index 83%
rename from src/ImageSharp/Processing/Convolution/Options/EdgeDetection.cs
rename to src/ImageSharp/Processing/Convolution/EdgeDetectionOperators.cs
index b01bb945c..55cbbeaf7 100644
--- a/src/ImageSharp/Processing/Convolution/Options/EdgeDetection.cs
+++ b/src/ImageSharp/Processing/Convolution/EdgeDetectionOperators.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-namespace SixLabors.ImageSharp.Processing
+namespace SixLabors.ImageSharp.Processing.Convolution
{
///
/// Enumerates the various types of defined edge detection filters.
///
- public enum EdgeDetection
+ public enum EdgeDetectionOperators
{
///
/// The Kayyali operator filter.
@@ -19,14 +19,14 @@ namespace SixLabors.ImageSharp.Processing
Kirsch,
///
- /// The Lapacian3X3 operator filter.
+ /// The Laplacian3X3 operator filter.
///
- Lapacian3X3,
+ Laplacian3x3,
///
- /// The Lapacian5X5 operator filter.
+ /// The Laplacian5X5 operator filter.
///
- Lapacian5X5,
+ Laplacian5x5,
///
/// The LaplacianOfGaussian operator filter.
@@ -58,4 +58,4 @@ namespace SixLabors.ImageSharp.Processing
///
Sobel
}
-}
+}
\ No newline at end of file
diff --git a/src/ImageSharp/Processing/Convolution/GaussianBlur.cs b/src/ImageSharp/Processing/Convolution/GaussianBlurExtensions.cs
similarity index 89%
rename from src/ImageSharp/Processing/Convolution/GaussianBlur.cs
rename to src/ImageSharp/Processing/Convolution/GaussianBlurExtensions.cs
index 9bca97242..ae3eace64 100644
--- a/src/ImageSharp/Processing/Convolution/GaussianBlur.cs
+++ b/src/ImageSharp/Processing/Convolution/GaussianBlurExtensions.cs
@@ -1,18 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Convolution.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Convolution
{
///
- /// Extension methods for the type.
+ /// Adds Gaussian blurring extensions to the type.
///
- public static partial class ImageExtensions
+ public static class GaussianBlurExtensions
{
///
/// Applies a Gaussian blur to the image.
@@ -22,7 +20,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source)
where TPixel : struct, IPixel
- => source.ApplyProcessor(new GaussianBlurProcessor(3f));
+ => source.ApplyProcessor(new GaussianBlurProcessor());
///
/// Applies a Gaussian blur to the image.
diff --git a/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs b/src/ImageSharp/Processing/Convolution/GaussianSharpenExtensions.cs
similarity index 89%
rename from src/ImageSharp/Processing/Convolution/GaussianSharpen.cs
rename to src/ImageSharp/Processing/Convolution/GaussianSharpenExtensions.cs
index 1cea2dae9..334a02b79 100644
--- a/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs
+++ b/src/ImageSharp/Processing/Convolution/GaussianSharpenExtensions.cs
@@ -1,18 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors;
+using SixLabors.ImageSharp.Processing.Convolution.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp
+namespace SixLabors.ImageSharp.Processing.Convolution
{
///
- /// Extension methods for the type.
+ /// Adds Gaussian sharpening extensions to the type.
///
- public static partial class ImageExtensions
+ public static class GaussianSharpenExtensions
{
///
/// Applies a Gaussian sharpening filter to the image.
@@ -22,7 +20,7 @@ namespace SixLabors.ImageSharp
/// The .
public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source)
where TPixel : struct, IPixel
- => source.ApplyProcessor(new GaussianSharpenProcessor(3f));
+ => source.ApplyProcessor(new GaussianSharpenProcessor());
///
/// Applies a Gaussian sharpening filter to the image.
diff --git a/src/ImageSharp/Processing/Processors/Convolution/BoxBlurProcessor.cs b/src/ImageSharp/Processing/Convolution/Processors/BoxBlurProcessor.cs
similarity index 91%
rename from src/ImageSharp/Processing/Processors/Convolution/BoxBlurProcessor.cs
rename to src/ImageSharp/Processing/Convolution/Processors/BoxBlurProcessor.cs
index 8056141a0..df3d56bda 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/BoxBlurProcessor.cs
+++ b/src/ImageSharp/Processing/Convolution/Processors/BoxBlurProcessor.cs
@@ -1,15 +1,15 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Processors
+namespace SixLabors.ImageSharp.Processing.Convolution.Processors
{
///
- /// Applies a Box blur sampler to the image.
+ /// Applies box blur processing to the image.
///
/// The pixel format.
internal class BoxBlurProcessor : ImageProcessor
@@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public Fast2DArray KernelY { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
new Convolution2PassProcessor(this.KernelX, this.KernelY).Apply(source, sourceRectangle, configuration);
}
diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs b/src/ImageSharp/Processing/Convolution/Processors/Convolution2DProcessor.cs
similarity index 95%
rename from src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs
rename to src/ImageSharp/Processing/Convolution/Processors/Convolution2DProcessor.cs
index 2c13ead16..4e4698467 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor.cs
+++ b/src/ImageSharp/Processing/Convolution/Processors/Convolution2DProcessor.cs
@@ -12,7 +12,7 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Processors
{
///
- /// Defines a sampler that uses two one-dimensional matrices to perform convolution against an image.
+ /// Defines a processor that uses two one-dimensional matrices to perform convolution against an image.
///
/// The pixel format.
internal class Convolution2DProcessor : ImageProcessor
@@ -40,7 +40,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public Fast2DArray KernelY { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
int kernelYHeight = this.KernelY.Height;
int kernelYWidth = this.KernelY.Width;
diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs b/src/ImageSharp/Processing/Convolution/Processors/Convolution2PassProcessor.cs
similarity index 95%
rename from src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs
rename to src/ImageSharp/Processing/Convolution/Processors/Convolution2PassProcessor.cs
index 0d87aa1dc..3ea025512 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor.cs
+++ b/src/ImageSharp/Processing/Convolution/Processors/Convolution2PassProcessor.cs
@@ -13,7 +13,7 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Processors
{
///
- /// Defines a sampler that uses two one-dimensional matrices to perform two-pass convolution against an image.
+ /// Defines a processor that uses two one-dimensional matrices to perform two-pass convolution against an image.
///
/// The pixel format.
internal class Convolution2PassProcessor : ImageProcessor
@@ -41,7 +41,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public Fast2DArray KernelY { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
ParallelOptions parallelOptions = configuration.ParallelOptions;
diff --git a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor.cs b/src/ImageSharp/Processing/Convolution/Processors/ConvolutionProcessor.cs
similarity index 94%
rename from src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor.cs
rename to src/ImageSharp/Processing/Convolution/Processors/ConvolutionProcessor.cs
index 2f369113d..2eff3bf21 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor.cs
+++ b/src/ImageSharp/Processing/Convolution/Processors/ConvolutionProcessor.cs
@@ -13,7 +13,7 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Processors
{
///
- /// Defines a sampler that uses a 2 dimensional matrix to perform convolution against an image.
+ /// Defines a processor that uses a 2 dimensional matrix to perform convolution against an image.
///
/// The pixel format.
internal class ConvolutionProcessor : ImageProcessor
@@ -34,7 +34,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
public Fast2DArray KernelXY { get; }
///
- protected override void OnApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
+ protected override void OnFrameApply(ImageFrame source, Rectangle sourceRectangle, Configuration configuration)
{
int kernelLength = this.KernelXY.Height;
int radius = kernelLength >> 1;
diff --git a/src/ImageSharp/Processing/Processors/Convolution/EdgeDetection/EdgeDetector2DProcessor.cs b/src/ImageSharp/Processing/Convolution/Processors/EdgeDetector2DProcessor.cs
similarity index 69%
rename from src/ImageSharp/Processing/Processors/Convolution/EdgeDetection/EdgeDetector2DProcessor.cs
rename to src/ImageSharp/Processing/Convolution/Processors/EdgeDetector2DProcessor.cs
index 741a6e308..74a019445 100644
--- a/src/ImageSharp/Processing/Processors/Convolution/EdgeDetection/EdgeDetector2DProcessor.cs
+++ b/src/ImageSharp/Processing/Convolution/Processors/EdgeDetector2DProcessor.cs
@@ -1,15 +1,16 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Filters.Processors;
+using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Processors
+namespace SixLabors.ImageSharp.Processing.Convolution.Processors
{
///
- /// Defines a sampler that detects edges within an image using two one-dimensional matrices.
+ /// Defines a processor that detects edges within an image using two one-dimensional matrices.
///
/// The pixel format.
internal abstract class EdgeDetector2DProcessor : ImageProcessor