Crop an image.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: (


public class Crop : BaseTransformationFilter


The filter crops an image providing a new image, which contains only the specified rectangle of the original image.

The filter accepts 8 and 16 bpp grayscale images and 24, 32, 48 and 64 bpp color images for processing.

Sample usage:

// create filter
Crop filter = new Crop( new Rectangle( 75, 75, 320, 240 ) );
// apply the filter
Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

Inheritance Hierarchy

See Also