Crop
Crops the current image to the given location and size.
public ImageFactory Crop(Rectangle rectangle)
Parameters
- rectangle
- The
System.Drawing.Rectanglecontaining the coordinates to crop the image to.
public ImageFactory Crop(CropLayer cropLayer)
Parameters
- CropLayer
-
The
ImageProcessor.Imaging.CropLayercontaining the following properties required to crop the image.- Left
-
The
System.Floatdefining the left coordinate of the crop layer to offset from the original image. When the crop mode is defined asCropMode.Percentagethis becomes the percentage you want to remove from the left hand side of the image. - Top
-
The
System.Floatdefining the top coordinate of the crop layer to offset from the original image. When the crop mode is defined asCropMode.Percentagethis becomes the percentage you want to remove from the top of the image. - Right
-
The
System.Floatdefining the width of the crop layer. When the crop mode is defined asCropMode.Percentagethis becomes the percentage you want to remove from the right hand side of the image. - Bottom
-
The
System.Floatdefining the height of the crop layer. When the crop mode is defined asCropMode.Percentagethis becomes the percentage you want to remove from the bottom of the image. - CropMode
- The
ImageProcessor.Imaging.CropModeto determine how to perform the crop.
Examples
Original
Cropped