Create unmanaged image from the specified managed image.
Namespace:
AForge.ImagingAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
| C# |
|---|
public static UnmanagedImage FromManagedImage( BitmapData imageData ) |
Parameters
- imageData
- Type: System.Drawing.Imaging..::.BitmapData
Source locked image data.
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. This means that managed image may be unlocked right after call to this method.
Exceptions
| Exception | Condition |
|---|---|
| AForge.Imaging..::.UnsupportedImageFormatException | Unsupported pixel format of source image. |