Class CropExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Defines extensions that allow the application of cropping operations on an Image using Mutate/Clone.
public static class CropExtensions
- Inheritance
-
CropExtensions
- Inherited Members
Methods
Crop(IImageProcessingContext, Rectangle)
Crops an image to the given rectangle.
public static IImageProcessingContext Crop(this IImageProcessingContext source, Rectangle cropRectangle)
Parameters
source
IImageProcessingContextThe current image processing context.
cropRectangle
RectangleThe Rectangle structure that specifies the portion of the image object to retain.
Returns
Crop(IImageProcessingContext, int, int)
Crops an image to the given width and height.
public static IImageProcessingContext Crop(this IImageProcessingContext source, int width, int height)
Parameters
source
IImageProcessingContextThe current image processing context.
width
intThe target image width.
height
intThe target image height.