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_bc https://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
| Improve this Doc View SourceCubicResampler(Single, Single, Single)
Initializes a new instance of the CubicResampler struct.
Declaration
public CubicResampler(float radius, float bspline, float cardinal)
Parameters
Type | Name | Description |
---|---|---|
Single | radius | The sampling radius. |
Single | bspline | The B-Spline value. |
Single | cardinal | The Cardinal cubic value. |
Fields
| Improve this Doc 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 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 CubicResampler Hermite
Field Value
Type | Description |
---|---|
CubicResampler |
MitchellNetravali
The function implements the Mitchell-Netravali algorithm as described on Wikipedia
Declaration
public static CubicResampler MitchellNetravali
Field Value
Type | Description |
---|---|
CubicResampler |
Robidoux
The function implements the Robidoux algorithm. http://www.imagemagick.org/Usage/filter/#robidoux
Declaration
public static 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 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 CubicResampler Spline
Field Value
Type | Description |
---|---|
CubicResampler |
Properties
| Improve this Doc View SourceRadius
Gets the radius in which to sample pixels.
Declaration
public readonly float Radius { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceApplyTransform<TPixel>(IResamplingTransformImageProcessor<TPixel>)
Applies a transformation upon an image.
Declaration
public readonly void ApplyTransform<TPixel>(IResamplingTransformImageProcessor<TPixel> processor)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
IResamplingTransformImageProcessor<TPixel> | processor | The transforming image processor. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
GetValue(Single)
Gets the result of the interpolation algorithm.
Declaration
public readonly float GetValue(float x)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The value to process. |
Returns
Type | Description |
---|---|
Single | The Single |