Apply filter to an image in unmanaged memory.

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

Syntax

C#
public void Apply(
	UnmanagedImage sourceImage,
	UnmanagedImage destinationImage
)

Parameters

sourceImage
Type: AForge.Imaging..::.UnmanagedImage
Source image in unmanaged memory to apply filter to.
destinationImage
Type: AForge.Imaging..::.UnmanagedImage
Destination image in unmanaged memory to put result into.

Implements

IFilter..::.Apply(UnmanagedImage, UnmanagedImage)

Remarks

The method keeps the source image unchanged and puts result of image processing into destination image.

Note:The destination image must have the same width and height as source image. Also destination image must have pixel format, which is expected by particular filter (see FormatTranslations property for information about pixel format conversions).

Exceptions

ExceptionCondition
AForge.Imaging..::.UnsupportedImageFormatExceptionUnsupported pixel format of the source image.
AForge.Imaging..::.InvalidImagePropertiesExceptionIncorrect destination pixel format.
AForge.Imaging..::.InvalidImagePropertiesExceptionDestination image has wrong width and/or height.

See Also