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
intThe 'radius' value representing the size of the area to sample.
components
intThe number of components to use to approximate the original 2D bokeh blur convolution kernel.
gamma
floatThe 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
DefaultGamma
The default gamma used by the parameterless constructor.
public const float DefaultGamma = 3
Field Value
DefaultRadius
The default radius used by the parameterless constructor.
public const int DefaultRadius = 32
Field Value
Properties
Components
Gets the number of components.
public int Components { get; }
Property Value
Gamma
Gets the gamma highlight factor to use when applying the effect.
public float Gamma { get; }
Property Value
Radius
Gets the radius.
public int Radius { get; }
Property Value
Methods
CreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>
Parameters
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
source
Image<TPixel>The source image. Cannot be null.
sourceRectangle
RectangleThe Rectangle structure that specifies the portion of the image object to draw.
Returns
- IImageProcessor<TPixel>
Type Parameters
TPixel
The pixel type.