Skip to content

Exposed processing classes so that they can be extended #829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/Buffer2DExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Memory
/// <summary>
/// Defines extension methods for <see cref="Buffer2D{T}"/>.
/// </summary>
internal static class Buffer2DExtensions
public static class Buffer2DExtensions
{
/// <summary>
/// Gets a <see cref="Span{T}"/> to the backing buffer of <paramref name="buffer"/>.
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/Buffer2D{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Memory
/// interpreted as a 2D region of <see cref="Width"/> x <see cref="Height"/> elements.
/// </summary>
/// <typeparam name="T">The value type.</typeparam>
internal sealed class Buffer2D<T> : IDisposable
public sealed class Buffer2D<T> : IDisposable
where T : struct
{
private MemorySource<T> memorySource;
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/BufferArea{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Memory
/// This type is kind-of 2D Span, but it can live on heap.
/// </summary>
/// <typeparam name="T">The element type</typeparam>
internal readonly struct BufferArea<T>
public readonly struct BufferArea<T>
where T : struct
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/MemoryAllocatorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Memory
/// <summary>
/// Extension methods for <see cref="MemoryAllocator"/>.
/// </summary>
internal static class MemoryAllocatorExtensions
public static class MemoryAllocatorExtensions
{
public static Buffer2D<T> Allocate2D<T>(
this MemoryAllocator memoryAllocator,
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/MemoryOwnerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Memory
/// <summary>
/// Extension methods for <see cref="IMemoryOwner{T}"/>
/// </summary>
internal static class MemoryOwnerExtensions
public static class MemoryOwnerExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Span<T> GetSpan<T>(this IMemoryOwner<T> buffer)
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/MemorySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Memory
/// https://gist.github.com/GrabYourPitchforks/4c3e1935fd4d9fa2831dbfcab35dffc6
/// https://www.codemag.com/Article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T
/// </remarks>
internal struct MemorySource<T> : IDisposable
public struct MemorySource<T> : IDisposable
{
/// <summary>
/// Initializes a new instance of the <see cref="MemorySource{T}"/> struct
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Memory/RowInterval.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Memory
/// <summary>
/// Represents an interval of rows in a <see cref="Rectangle"/> and/or <see cref="Buffer2D{T}"/>
/// </summary>
internal readonly struct RowInterval
public readonly struct RowInterval
{
/// <summary>
/// Initializes a new instance of the <see cref="RowInterval"/> struct.
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Primitives/LongRational.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Primitives
/// <remarks>
/// This is a very simplified implementation of a rational number designed for use with metadata only.
/// </remarks>
internal readonly struct LongRational : IEquatable<LongRational>
public readonly struct LongRational : IEquatable<LongRational>
{
/// <summary>
/// Initializes a new instance of the <see cref="LongRational"/> struct.
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Primitives/ValueSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Primitives
/// <summary>
/// Represents a value in relation to a value on the image
/// </summary>
internal readonly struct ValueSize : IEquatable<ValueSize>
public readonly struct ValueSize : IEquatable<ValueSize>
{
/// <summary>
/// Initializes a new instance of the <see cref="ValueSize"/> struct.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Binarization
/// Performs binary threshold filtering against an image using error diffusion.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class BinaryErrorDiffusionProcessor<TPixel> : ImageProcessor<TPixel>
public class BinaryErrorDiffusionProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Binarization
/// Performs binary threshold filtering against an image using ordered dithering.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class BinaryOrderedDitherProcessor<TPixel> : ImageProcessor<TPixel>
public class BinaryOrderedDitherProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Binarization
/// Performs simple binary threshold filtering against an image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class BinaryThresholdProcessor<TPixel> : ImageProcessor<TPixel>
public class BinaryThresholdProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// Allows the application of processing algorithms to a clone of the original image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract class CloningImageProcessor<TPixel> : ICloningImageProcessor<TPixel>
public abstract class CloningImageProcessor<TPixel> : ICloningImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Applies box blur processing to the image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class BoxBlurProcessor<TPixel> : ImageProcessor<TPixel>
public class BoxBlurProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that uses two one-dimensional matrices to perform convolution against an image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class Convolution2DProcessor<TPixel> : ImageProcessor<TPixel>
public class Convolution2DProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that uses two one-dimensional matrices to perform two-pass convolution against an image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class Convolution2PassProcessor<TPixel> : ImageProcessor<TPixel>
public class Convolution2PassProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that uses a 2 dimensional matrix to perform convolution against an image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class ConvolutionProcessor<TPixel> : ImageProcessor<TPixel>
public class ConvolutionProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that detects edges within an image using two one-dimensional matrices.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract class EdgeDetector2DProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
public abstract class EdgeDetector2DProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that detects edges within an image using a eight two dimensional matrices.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract class EdgeDetectorCompassProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
public abstract class EdgeDetectorCompassProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Defines a processor that detects edges within an image using a single two dimensional matrix.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal abstract class EdgeDetectorProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
public abstract class EdgeDetectorProcessor<TPixel> : ImageProcessor<TPixel>, IEdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Applies Gaussian blur processing to the image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class GaussianBlurProcessor<TPixel> : ImageProcessor<TPixel>
public class GaussianBlurProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Applies Gaussian sharpening processing to the image.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class GaussianSharpenProcessor<TPixel> : ImageProcessor<TPixel>
public class GaussianSharpenProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for Kayyali edge detection
/// </summary>
internal static class KayyaliKernels
public static class KayyaliKernels
{
/// <summary>
/// Gets the horizontal gradient operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Applies edge detection processing to the image using the Kayyali operator filter. <see href="http://edgedetection.webs.com/"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class KayyaliProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
public class KayyaliProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the eight matrices used for Kirsch edge detection
/// </summary>
internal static class KirschKernels
public static class KirschKernels
{
/// <summary>
/// Gets the North gradient operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// Applies edge detection processing to the image using the Kirsch operator filter. <see href="http://en.wikipedia.org/wiki/Kirsch_operator"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class KirschProcessor<TPixel> : EdgeDetectorCompassProcessor<TPixel>
public class KirschProcessor<TPixel> : EdgeDetectorCompassProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Discrete_Laplace_operator"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class Laplacian3x3Processor<TPixel> : EdgeDetectorProcessor<TPixel>
public class Laplacian3x3Processor<TPixel> : EdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Discrete_Laplace_operator"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class Laplacian5x5Processor<TPixel> : EdgeDetectorProcessor<TPixel>
public class Laplacian5x5Processor<TPixel> : EdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// A factory for creating Laplacian kernel matrices.
/// </summary>
internal static class LaplacianKernelFactory
public static class LaplacianKernelFactory
{
/// <summary>
/// Creates a Laplacian matrix, 2nd derivative, of an arbitrary length.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains Laplacian kernels of different sizes
/// </summary>
internal static class LaplacianKernels
public static class LaplacianKernels
{
/// <summary>
/// Gets the 3x3 Laplacian kernel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://fourier.eng.hmc.edu/e161/lectures/gradient/node8.html"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class LaplacianOfGaussianProcessor<TPixel> : EdgeDetectorProcessor<TPixel>
public class LaplacianOfGaussianProcessor<TPixel> : EdgeDetectorProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for Prewitt edge detection
/// </summary>
internal static class PrewittKernels
public static class PrewittKernels
{
/// <summary>
/// Gets the horizontal gradient operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Prewitt_operator"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class PrewittProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
public class PrewittProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for RobertsCross edge detection
/// </summary>
internal static class RobertsCrossKernels
public static class RobertsCrossKernels
{
/// <summary>
/// Gets the horizontal gradient operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Roberts_cross"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class RobertsCrossProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
public class RobertsCrossProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for Robinson edge detection
/// </summary>
internal static class RobinsonKernels
public static class RobinsonKernels
{
/// <summary>
/// Gets the North gradient operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://www.tutorialspoint.com/dip/Robinson_Compass_Mask.htm"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class RobinsonProcessor<TPixel> : EdgeDetectorCompassProcessor<TPixel>
public class RobinsonProcessor<TPixel> : EdgeDetectorCompassProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for Scharr edge detection
/// </summary>
internal static class ScharrKernels
public static class ScharrKernels
{
/// <summary>
/// Gets the horizontal gradient operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Sobel_operator#Alternative_operators"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class ScharrProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
public class ScharrProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <summary>
/// Contains the kernels used for Sobel edge detection
/// </summary>
internal static class SobelKernels
public static class SobelKernels
{
/// <summary>
/// Gets the horizontal gradient operator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// <see href="http://en.wikipedia.org/wiki/Sobel_operator"/>
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class SobelProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
public class SobelProcessor<TPixel> : EdgeDetector2DProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Processing/Processors/DelegateProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// Allows the application of processing algorithms to images via an action delegate
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class DelegateProcessor<TPixel> : ImageProcessor<TPixel>
public class DelegateProcessor<TPixel> : ImageProcessor<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
/// An <see cref="IImageProcessor{TPixel}"/> that dithers an image using error diffusion.
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
internal class ErrorDiffusionPaletteProcessor<TPixel> : PaletteDitherProcessorBase<TPixel>
public class ErrorDiffusionPaletteProcessor<TPixel> : PaletteDitherProcessorBase<TPixel>
where TPixel : struct, IPixel<TPixel>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
/// <summary>
/// A factory for creating ordered dither matrices.
/// </summary>
internal static class OrderedDitherFactory
public static class OrderedDitherFactory
{
/// <summary>
/// Creates an ordered dithering matrix with equal sides of arbitrary length.
Expand Down
Loading