Class PixelateProcessor
- Namespace
- SixLabors.ImageSharp.Processing.Processors.Effects
- Assembly
- SixLabors.ImageSharp.dll
Defines a pixelation effect of a given size.
public sealed class PixelateProcessor : IImageProcessor
- Inheritance
-
PixelateProcessor
- Implements
- Inherited Members
Constructors
PixelateProcessor(int)
Initializes a new instance of the PixelateProcessor class.
public PixelateProcessor(int size)
Parameters
sizeintThe size of the pixels. Must be greater than 0.
Exceptions
- ArgumentException
sizeis less than 0 or equal to 0.
Properties
Size
Gets or the pixel size.
public int Size { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
sourceImage<TPixel>The source image. Cannot be null.
sourceRectangleRectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixelThe pixel type.