Crop an image.
Namespace:
AForge.Imaging.FiltersAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.3.0 (2.2.3.0)
Syntax
| C# |
|---|
public class Crop : BaseTransformationFilter |
Remarks
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
System..::.Object
AForge.Imaging.Filters..::.BaseTransformationFilter
AForge.Imaging.Filters..::.Crop
AForge.Imaging.Filters..::.BaseTransformationFilter
AForge.Imaging.Filters..::.Crop