Table of Contents

Class BokehBlurProcessor

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

Applies bokeh blur processing to the image.

public sealed class BokehBlurProcessor : IImageProcessor
Inheritance
BokehBlurProcessor
Implements
Inherited Members

Constructors

BokehBlurProcessor()

Initializes a new instance of the BokehBlurProcessor class.

public BokehBlurProcessor()

BokehBlurProcessor(int, int, float)

Initializes a new instance of the BokehBlurProcessor class.

public BokehBlurProcessor(int radius, int components, float gamma)

Parameters

radius int

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

components int

The number of components to use to approximate the original 2D bokeh blur convolution kernel.

gamma float

The gamma highlight factor to use to further process the image.

Fields

DefaultComponents

The default component count used by the parameterless constructor.

public const int DefaultComponents = 2

Field Value

int

DefaultGamma

The default gamma used by the parameterless constructor.

public const float DefaultGamma = 3

Field Value

float

DefaultRadius

The default radius used by the parameterless constructor.

public const int DefaultRadius = 32

Field Value

int

Properties

Components

Gets the number of components.

public int Components { get; }

Property Value

int

Gamma

Gets the gamma highlight factor to use when applying the effect.

public float Gamma { get; }

Property Value

float

Radius

Gets the radius.

public int Radius { get; }

Property Value

int

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