Table of Contents

Class ConvolutionExtensions

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

Defines general convolution extensions to apply on an Image using Mutate/Clone.

public static class ConvolutionExtensions
Inheritance
ConvolutionExtensions
Inherited Members

Methods

Convolve(IImageProcessingContext, DenseMatrix<float>)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, DenseMatrix<float> kernelXY)

Parameters

source IImageProcessingContext

The current image processing context.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

Returns

IImageProcessingContext

The IImageProcessingContext.

Convolve(IImageProcessingContext, DenseMatrix<float>, bool)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, DenseMatrix<float> kernelXY, bool preserveAlpha)

Parameters

source IImageProcessingContext

The current image processing context.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

preserveAlpha bool

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

Returns

IImageProcessingContext

The IImageProcessingContext.

Convolve(IImageProcessingContext, DenseMatrix<float>, bool, BorderWrappingMode, BorderWrappingMode)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, DenseMatrix<float> kernelXY, bool preserveAlpha, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)

Parameters

source IImageProcessingContext

The current image processing context.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

preserveAlpha bool

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

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.

Returns

IImageProcessingContext

The IImageProcessingContext.

Convolve(IImageProcessingContext, Rectangle, DenseMatrix<float>)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, Rectangle rectangle, DenseMatrix<float> kernelXY)

Parameters

source IImageProcessingContext

The current image processing context.

rectangle Rectangle

The rectangle structure that specifies the portion of the image object to alter.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

Returns

IImageProcessingContext

The IImageProcessingContext.

Convolve(IImageProcessingContext, Rectangle, DenseMatrix<float>, bool)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, Rectangle rectangle, DenseMatrix<float> kernelXY, bool preserveAlpha)

Parameters

source IImageProcessingContext

The current image processing context.

rectangle Rectangle

The rectangle structure that specifies the portion of the image object to alter.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

preserveAlpha bool

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

Returns

IImageProcessingContext

The IImageProcessingContext.

Convolve(IImageProcessingContext, Rectangle, DenseMatrix<float>, bool, BorderWrappingMode, BorderWrappingMode)

Applies a convolution filter to the image.

public static IImageProcessingContext Convolve(this IImageProcessingContext source, Rectangle rectangle, DenseMatrix<float> kernelXY, bool preserveAlpha, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY)

Parameters

source IImageProcessingContext

The current image processing context.

rectangle Rectangle

The rectangle structure that specifies the portion of the image object to alter.

kernelXY DenseMatrix<float>

The convolution kernel to apply.

preserveAlpha bool

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

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.

Returns

IImageProcessingContext

The IImageProcessingContext.