Table of Contents

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

size int

The size of the pixels. Must be greater than 0.

Exceptions

ArgumentException

size is less than 0 or equal to 0.

Properties

Size

Gets or the pixel size.

public int Size { get; }

Property Value

int

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

configuration Configuration

The configuration which allows altering default behaviour or extending the library.

source Image<TPixel>

The source image. Cannot be null.

sourceRectangle Rectangle

The Rectangle structure that specifies the portion of the image object to draw.

Returns

IImageProcessor<TPixel>

The IImageProcessor<TPixel>

Type Parameters

TPixel

The pixel type.