Crop

Crops the current image to the given location and size.

public ImageFactory Crop(Rectangle rectangle)
    

Parameters

rectangle
The System.Drawing.Rectangle containing the coordinates to crop the image to.
public ImageFactory Crop(CropLayer cropLayer)
    

Parameters

CropLayer
The ImageProcessor.Imaging.CropLayer containing the following properties required to crop the image.
Left
The System.Float defining the left coordinate of the crop layer to offset from the original image. When the crop mode is defined as CropMode.Percentage this becomes the percentage you want to remove from the left hand side of the image.
Top
The System.Float defining the top coordinate of the crop layer to offset from the original image. When the crop mode is defined as CropMode.Percentage this becomes the percentage you want to remove from the top of the image.
Right
The System.Float defining the width of the crop layer. When the crop mode is defined as CropMode.Percentage this becomes the percentage you want to remove from the right hand side of the image.
Bottom
The System.Float defining the height of the crop layer. When the crop mode is defined as CropMode.Percentage this becomes the percentage you want to remove from the bottom of the image.
CropMode
The ImageProcessor.Imaging.CropMode to determine how to perform the crop.

Examples

Original

original image

Cropped

image with crop applied