Rotate 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 RotateNearestNeighbor : BaseRotateFilter

Remarks

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

Note:Rotation is performed in counterclockwise direction.

The filter accepts 8/16 bpp grayscale images and 24/48 bpp color image for processing.

Sample usage:

CopyC#
// create filter - rotate for 30 degrees keeping original image size
RotateNearestNeighbor filter = new RotateNearestNeighbor( 30, true );
// apply the filter
Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

Inheritance Hierarchy

See Also