Table of Contents

Class CropProcessor

Namespace
SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly
SixLabors.ImageSharp.dll

Defines a crop operation on an image.

public sealed class CropProcessor : CloningImageProcessor, ICloningImageProcessor, IImageProcessor
Inheritance
CropProcessor
Implements
Inherited Members

Constructors

CropProcessor(Rectangle, Size)

Initializes a new instance of the CropProcessor class.

public CropProcessor(Rectangle cropRectangle, Size sourceSize)

Parameters

cropRectangle Rectangle

The target cropped rectangle.

sourceSize Size

The source image size.

Properties

CropRectangle

Gets the width.

public Rectangle CropRectangle { get; }

Property Value

Rectangle

Methods

CreatePixelSpecificCloningProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)

public override ICloningImageProcessor<TPixel> CreatePixelSpecificCloningProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>

Parameters

configuration Configuration
source Image<TPixel>
sourceRectangle Rectangle

Returns

ICloningImageProcessor<TPixel>

Type Parameters

TPixel