Click or drag to resize
Accord.NET (logo)

UnmanagedImageFromManagedImage Method (Bitmap)

Create unmanaged image from the specified managed image.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public static UnmanagedImage FromManagedImage(
	Bitmap image
)
Request Example View Source

Parameters

image
Type: System.DrawingBitmap
Source managed image.

Return Value

Type: UnmanagedImage
Returns new unmanaged image, which is a copy of source managed image.
Exceptions
ExceptionCondition
UnsupportedImageFormatExceptionUnsupported pixel format of source image.
Remarks

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

See Also