Resize image using nearest neighbor algorithm.

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

Syntax

C#
public class ResizeNearestNeighbor : BaseResizeFilter

Remarks

The class implements image resizing filter using nearest neighbor algorithm, which does not assume any interpolation.

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

Sample usage:

CopyC#
// create filter
ResizeNearestNeighbor filter = new ResizeNearestNeighbor( 400, 300 );
// apply the filter
Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

Inheritance Hierarchy

See Also