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