Shrink an image by removing specified color from its boundaries.

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

Syntax

C#
public class Shrink : BaseTransformationFilter

Remarks

Removes pixels with specified color from image boundaries making the image smaller in size.

The filter accepts 8 bpp grayscale and 24 bpp color images for processing.

Sample usage:

CopyC#
// create filter
Shrink filter = new Shrink( Color.Black );
// apply the filter
Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

Inheritance Hierarchy

See Also