Class CropExtensions
Defines extensions that allow the application of cropping operations on an Image using Mutate/Clone.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing
Assembly: SixLabors.ImageSharp.dll
Syntax
public static class CropExtensions
Methods
| Edit this page View SourceCrop(IImageProcessingContext, Rectangle)
Crops an image to the given rectangle.
Declaration
public static IImageProcessingContext Crop(this IImageProcessingContext source, Rectangle cropRectangle)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
Rectangle | cropRectangle | The Rectangle structure that specifies the portion of the image object to retain. |
Returns
Type | Description |
---|---|
IImageProcessingContext |
Crop(IImageProcessingContext, int, int)
Crops an image to the given width and height.
Declaration
public static IImageProcessingContext Crop(this IImageProcessingContext source, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
IImageProcessingContext | source | The current image processing context. |
int | width | The target image width. |
int | height | The target image height. |
Returns
Type | Description |
---|---|
IImageProcessingContext |