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
| Improve this Doc View SourceBokehBlurProcessor()
Initializes a new instance of the BokehBlurProcessor class.
Declaration
public BokehBlurProcessor()
BokehBlurProcessor(Int32, Int32, Single)
Initializes a new instance of the BokehBlurProcessor class.
Declaration
public BokehBlurProcessor(int radius, int components, float gamma)
Parameters
Type | Name | Description |
---|---|---|
Int32 | radius | The 'radius' value representing the size of the area to sample. |
Int32 | components | The number of components to use to approximate the original 2D bokeh blur convolution kernel. |
Single | gamma | The gamma highlight factor to use to further process the image. |
Fields
| Improve this Doc View SourceDefaultComponents
The default component count used by the parameterless constructor.
Declaration
public const int DefaultComponents = 2
Field Value
Type | Description |
---|---|
Int32 |
DefaultGamma
The default gamma used by the parameterless constructor.
Declaration
public const float DefaultGamma = 3F
Field Value
Type | Description |
---|---|
Single |
DefaultRadius
The default radius used by the parameterless constructor.
Declaration
public const int DefaultRadius = 32
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceComponents
Gets the number of components.
Declaration
public int Components { get; }
Property Value
Type | Description |
---|---|
Int32 |
Gamma
Gets the gamma highlight factor to use when applying the effect.
Declaration
public float Gamma { get; }
Property Value
Type | Description |
---|---|
Single |
Radius
Gets the radius.
Declaration
public int Radius { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc 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 : struct, 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. |