Class TransformExtensions
Defines extensions that allow the application of composable transform operations on an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class TransformExtensions
Methods
| Improve this Doc View SourceTransform(IImageProcessingContext, AffineTransformBuilder)
Performs an affine transform of an image.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext source, AffineTransformBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image to transform. |
AffineTransformBuilder | builder | The affine transform builder. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The Image<TPixel> |
Transform(IImageProcessingContext, AffineTransformBuilder, IResampler)
Performs an affine transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, AffineTransformBuilder builder, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
AffineTransformBuilder | builder | The affine transform builder. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, ProjectiveTransformBuilder)
Performs a projective transform of an image.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext source, ProjectiveTransformBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The image to transform. |
ProjectiveTransformBuilder | builder | The affine transform builder. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, ProjectiveTransformBuilder, IResampler)
Performs a projective transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, ProjectiveTransformBuilder builder, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
ProjectiveTransformBuilder | builder | The projective transform builder. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, Rectangle, AffineTransformBuilder, IResampler)
Performs an affine transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, Rectangle sourceRectangle, AffineTransformBuilder builder, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
Rectangle | sourceRectangle | The source rectangle |
AffineTransformBuilder | builder | The affine transform builder. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, Rectangle, ProjectiveTransformBuilder, IResampler)
Performs a projective transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, Rectangle sourceRectangle, ProjectiveTransformBuilder builder, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
Rectangle | sourceRectangle | The source rectangle |
ProjectiveTransformBuilder | builder | The projective transform builder. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, Rectangle, Matrix3x2, Size, IResampler)
Performs an affine transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, Rectangle sourceRectangle, Matrix3x2 transform, Size targetDimensions, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
Rectangle | sourceRectangle | The source rectangle |
Matrix3x2 | transform | The transformation matrix. |
Size | targetDimensions | The size of the result image. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Transform(IImageProcessingContext, Rectangle, Matrix4x4, Size, IResampler)
Performs a projective transform of an image using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Transform(this IImageProcessingContext ctx, Rectangle sourceRectangle, Matrix4x4 transform, Size targetDimensions, IResampler sampler)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | ctx | |
Rectangle | sourceRectangle | The source rectangle |
Matrix4x4 | transform | The transformation matrix. |
Size | targetDimensions | The size of the result image. |
IResampler | sampler | The IResampler to perform the resampling. |
Returns
Type | Description |
---|---|
IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |