Class CropProcessor
Defines a crop operation on an image.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class CropProcessor : CloningImageProcessor, ICloningImageProcessor, IImageProcessor
Constructors
| Improve this Doc View SourceCropProcessor(Rectangle, Size)
Initializes a new instance of the CropProcessor class.
Declaration
public CropProcessor(Rectangle cropRectangle, Size sourceSize)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | cropRectangle | The target cropped rectangle. |
Size | sourceSize | The source image size. |
Properties
| Improve this Doc View SourceCropRectangle
Gets the width.
Declaration
public Rectangle CropRectangle { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Methods
| Improve this Doc View SourceCreatePixelSpecificCloningProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific ICloningImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public override ICloningImageProcessor<TPixel> CreatePixelSpecificCloningProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
Image<TPixel> | source | The source image. Cannot be null. |
Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
Type | Description |
---|---|
ICloningImageProcessor<TPixel> |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |
Overrides
SixLabors.ImageSharp.Processing.Processors.CloningImageProcessor.CreatePixelSpecificCloningProcessor<TPixel>(SixLabors.ImageSharp.Configuration, SixLabors.ImageSharp.Image<TPixel>, SixLabors.ImageSharp.Rectangle)