Class BokehBlurProcessor
Applies bokeh blur processing to the image.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Convolution
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class BokehBlurProcessor : IImageProcessor
Constructors
| Edit this page View SourceBokehBlurProcessor()
Initializes a new instance of the BokehBlurProcessor class.
Declaration
public BokehBlurProcessor()
BokehBlurProcessor(int, int, float)
Initializes a new instance of the BokehBlurProcessor class.
Declaration
public BokehBlurProcessor(int radius, int components, float gamma)
Parameters
| Type | Name | Description |
|---|---|---|
| int | radius | The 'radius' value representing the size of the area to sample. |
| int | components | The number of components to use to approximate the original 2D bokeh blur convolution kernel. |
| float | gamma | The gamma highlight factor to use to further process the image. |
Fields
| Edit this page View SourceDefaultComponents
The default component count used by the parameterless constructor.
Declaration
public const int DefaultComponents = 2
Field Value
| Type | Description |
|---|---|
| int |
DefaultGamma
The default gamma used by the parameterless constructor.
Declaration
public const float DefaultGamma = 3
Field Value
| Type | Description |
|---|---|
| float |
DefaultRadius
The default radius used by the parameterless constructor.
Declaration
public const int DefaultRadius = 32
Field Value
| Type | Description |
|---|---|
| int |
Properties
| Edit this page View SourceComponents
Gets the number of components.
Declaration
public int Components { get; }
Property Value
| Type | Description |
|---|---|
| int |
Gamma
Gets the gamma highlight factor to use when applying the effect.
Declaration
public float Gamma { get; }
Property Value
| Type | Description |
|---|---|
| float |
Radius
Gets the radius.
Declaration
public int Radius { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
| Type | Name | Description |
|---|---|---|
| Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
| Image<TPixel> | source | The source image. Cannot be null. |
| Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
| Type | Description |
|---|---|
| IImageProcessor<TPixel> |
Type Parameters
| Name | Description |
|---|---|
| TPixel | The pixel type. |