Table of Contents

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 IImageProcessingContext

The current image processing context.

cropRectangle Rectangle

The Rectangle structure that specifies the portion of the image object to retain.

Returns

IImageProcessingContext

The IImageProcessingContext.

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 IImageProcessingContext

The current image processing context.

width int

The target image width.

height int

The target image height.

Returns

IImageProcessingContext

The IImageProcessingContext.