Struct CubicResampler
Cubic filters contain a collection of different filters of varying B-Spline and Cardinal values. With these two values you can generate any smoothly fitting (continuious first derivative) piece-wise cubic filter. http://www.imagemagick.org/Usage/filter/#cubic_bchttps://www.cs.utexas.edu/~fussell/courses/cs384g-fall2013/lectures/mitchell/Mitchell.pdf
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct CubicResampler : IResampler
Constructors
| Edit this page View SourceCubicResampler(float, float, float)
Initializes a new instance of the CubicResampler struct.
Declaration
public CubicResampler(float radius, float bspline, float cardinal)
Parameters
Type | Name | Description |
---|---|---|
float | radius | The sampling radius. |
float | bspline | The B-Spline value. |
float | cardinal | The Cardinal cubic value. |
Fields
| Edit this page View SourceCatmullRom
The Catmull-Rom filter is a well known standard Cubic Filter often used as a interpolation function. This filter produces a reasonably sharp edge, but without a the pronounced gradient change on large scale image enlargements that a 'Lagrange' filter can produce.
Declaration
public static readonly CubicResampler CatmullRom
Field Value
Type | Description |
---|---|
CubicResampler |
Hermite
The Hermite filter is type of smoothed triangular interpolation Filter, This filter rounds off strong edges while preserving flat 'color levels' in the original image.
Declaration
public static readonly CubicResampler Hermite
Field Value
Type | Description |
---|---|
CubicResampler |
MitchellNetravali
The function implements the Mitchell-Netravali algorithm as described on Wikipedia
Declaration
public static readonly CubicResampler MitchellNetravali
Field Value
Type | Description |
---|---|
CubicResampler |
Robidoux
The function implements the Robidoux algorithm. http://www.imagemagick.org/Usage/filter/#robidoux
Declaration
public static readonly CubicResampler Robidoux
Field Value
Type | Description |
---|---|
CubicResampler |
RobidouxSharp
The function implements the Robidoux Sharp algorithm. http://www.imagemagick.org/Usage/filter/#robidoux
Declaration
public static readonly CubicResampler RobidouxSharp
Field Value
Type | Description |
---|---|
CubicResampler |
Spline
The function implements the spline algorithm. http://www.imagemagick.org/Usage/filter/#cubic_bc
Declaration
public static readonly CubicResampler Spline
Field Value
Type | Description |
---|---|
CubicResampler |
Properties
| Edit this page View SourceRadius
Gets the radius in which to sample pixels.
Declaration
public float Radius { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceApplyTransform<TPixel>(IResamplingTransformImageProcessor<TPixel>)
Applies a transformation upon an image.
Declaration
public void ApplyTransform<TPixel>(IResamplingTransformImageProcessor<TPixel> processor) where TPixel : unmanaged, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
IResamplingTransformImageProcessor<TPixel> | processor | The transforming image processor. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
GetValue(float)
Gets the result of the interpolation algorithm.
Declaration
public float GetValue(float x)
Parameters
Type | Name | Description |
---|---|---|
float | x | The value to process. |
Returns
Type | Description |
---|---|
float | The float |