Fill areas outiside of specified region.

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

Syntax

C#
public class CanvasCrop : BaseInPlaceFilter

Remarks

The filter fills areas outside of specified region using the specified color.

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

Sample usage:

CopyC#
// create filter
CanvasCrop filter = new CanvasCrop( new Rectangle(
                        5, 5, image.Width - 10, image.Height - 10 ), Color.Red );
// apply the filter
filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseInPlaceFilter
    AForge.Imaging.Filters..::.CanvasCrop

See Also