SKImageFilter.CreateMatrixConvolution(SKSizeI, Single[], Single, Single, SKPointI, SKMatrixConvolutionTileMode, Boolean, SKImageFilter, SKImageFilter+CropRect) Method

Definition

Creates an image that filter applies an NxM image processing kernel.

public static SkiaSharp.SKImageFilter CreateMatrixConvolution (SkiaSharp.SKSizeI kernelSize, float[] kernel, float gain, float bias, SkiaSharp.SKPointI kernelOffset, SkiaSharp.SKMatrixConvolutionTileMode tileMode, bool convolveAlpha, SkiaSharp.SKImageFilter input = null, SkiaSharp.SKImageFilter.CropRect cropRect = null);

Parameters

kernelSize
SKSizeI

The kernel size in pixels, in each dimension (N by M).

kernel
Single[]

The image processing kernel, with N * M elements in row order.

gain
Single

A scale factor applied to each pixel after convolution.

bias
Single

A bias factor added to each pixel after convolution.

kernelOffset
SKPointI

An offset applied to each pixel coordinate before convolution.

tileMode
SKMatrixConvolutionTileMode

How accesses outside the image are treated.

convolveAlpha
Boolean

Whether or not all channels are convolved, or just the RGB channels.

input
SKImageFilter

The input filter to use.

cropRect
SKImageFilter.CropRect

The rectangle to which the output processing will be limited.

Returns

Returns the new SKImageFilter, or null on error.

Applies to