Create unmanaged image from the specified managed image.

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

Syntax

C#
public static UnmanagedImage FromManagedImage(
	Bitmap image
)

Parameters

image
Type: System.Drawing..::.Bitmap
Source managed image.

Return Value

Returns new unmanaged image, which is a copy of source managed image.

Remarks

The method creates an exact copy of specified managed image, but allocated in unmanaged memory.

Exceptions

ExceptionCondition
AForge.Imaging..::.UnsupportedImageFormatExceptionUnsupported pixel format of source image.

See Also