Table of Contents

Class GaussianBlurProcessor

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

Defines Gaussian blur by a (Sigma, Radius) pair.

public sealed class GaussianBlurProcessor : IImageProcessor
Inheritance
GaussianBlurProcessor
Implements
Inherited Members

Constructors

GaussianBlurProcessor()

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor()

GaussianBlurProcessor(int)

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor(int radius)

Parameters

radius int

The 'radius' value representing the size of the area to sample.

GaussianBlurProcessor(float)

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor(float sigma)

Parameters

sigma float

The 'sigma' value representing the weight of the blur.

GaussianBlurProcessor(float, BorderWrappingMode, BorderWrappingMode)

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor(float sigma, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)

Parameters

sigma float

The 'sigma' value representing the weight of the blur.

borderWrapModeX BorderWrappingMode

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

borderWrapModeY BorderWrappingMode

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

GaussianBlurProcessor(float, int)

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor(float sigma, int radius)

Parameters

sigma float

The 'sigma' value representing the weight of the blur.

radius int

The 'radius' value representing the size of the area to sample. This should be at least twice the sigma value.

GaussianBlurProcessor(float, int, BorderWrappingMode, BorderWrappingMode)

Initializes a new instance of the GaussianBlurProcessor class.

public GaussianBlurProcessor(float sigma, int radius, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)

Parameters

sigma float

The 'sigma' value representing the weight of the blur.

radius int

The 'radius' value representing the size of the area to sample. This should be at least twice the sigma value.

borderWrapModeX BorderWrappingMode

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

borderWrapModeY BorderWrappingMode

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

Fields

DefaultSigma

The default value for Sigma.

public const float DefaultSigma = 3

Field Value

float

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

Radius

Gets the radius defining the size of the area to sample.

public int Radius { get; }

Property Value

int

Sigma

Gets the sigma value representing the weight of the blur

public float Sigma { get; }

Property Value

float

Methods

CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)

public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>

Parameters

configuration Configuration
source Image<TPixel>
sourceRectangle Rectangle

Returns

IImageProcessor<TPixel>

Type Parameters

TPixel