Click or drag to resize
Accord.NET (logo)

UnmanagedImageFromManagedImage Method (BitmapData)

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(
	BitmapData imageData
)
Request Example View Source

Parameters

imageData
Type: System.Drawing.ImagingBitmapData
Source locked image data.

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. This means that managed image may be unlocked right after call to this method.

See Also