Class RotateExtensions
Defines extensions that allow the application of rotate operations on an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class RotateExtensions
Methods
| Improve this Doc View SourceRotate(IImageProcessingContext, RotateMode)
Rotates and flips an image by the given instructions.
Declaration
public static IImageProcessingContext Rotate(this IImageProcessingContext source, RotateMode rotateMode)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The image to rotate. |
| RotateMode | rotateMode | The RotateMode to perform the rotation. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Rotate(IImageProcessingContext, Single)
Rotates an image by the given angle in degrees.
Declaration
public static IImageProcessingContext Rotate(this IImageProcessingContext source, float degrees)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The image to rotate. |
| Single | degrees | The angle in degrees to perform the rotation. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |
Rotate(IImageProcessingContext, Single, IResampler)
Rotates an image by the given angle in degrees using the specified sampling algorithm.
Declaration
public static IImageProcessingContext Rotate(this IImageProcessingContext source, float degrees, IResampler sampler)
Parameters
| Type | Name | Description |
|---|---|---|
| IImageProcessingContext | source | The image to rotate. |
| Single | degrees | The angle in degrees to perform the rotation. |
| IResampler | sampler | The IResampler to perform the resampling. |
Returns
| Type | Description |
|---|---|
| IImageProcessingContext | The IImageProcessingContext to allow chaining of operations. |