Table of Contents

Class MedianBlurProcessor

Namespace
SixLabors.ImageSharp.Processing.Processors.Convolution
Assembly
SixLabors.ImageSharp.dll

Applies an median filter.

public sealed class MedianBlurProcessor : IImageProcessor
Inheritance
MedianBlurProcessor
Implements
Inherited Members

Constructors

MedianBlurProcessor(int, bool)

Initializes a new instance of the MedianBlurProcessor class.

public MedianBlurProcessor(int radius, bool preserveAlpha)

Parameters

radius int

The 'radius' value representing the size of the area to filter over.

preserveAlpha bool

Whether the filter is applied to alpha as well as the color channels.

Properties

BorderWrapModeX

Gets the BorderWrappingMode to use when mapping the pixels outside of the border, in X direction.

public BorderWrappingMode BorderWrapModeX { get; }

Property Value

BorderWrappingMode

BorderWrapModeY

Gets the BorderWrappingMode to use when mapping the pixels outside of the border, in Y direction.

public BorderWrappingMode BorderWrapModeY { get; }

Property Value

BorderWrappingMode

PreserveAlpha

Gets a value indicating whether the filter is applied to alpha as well as the color channels.

public bool PreserveAlpha { get; }

Property Value

bool

Radius

Gets the size of the area to find the median of.

public int Radius { 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.