UnmanagedImageToManagedImage Method (Boolean)
public Bitmap ToManagedImage( bool makeCopy )
Public Function ToManagedImage ( makeCopy As Boolean ) As Bitmap
|InvalidImagePropertiesException||The unmanaged image has some invalid properties, which results in failure of converting it to managed image. This may happen if user used the UnmanagedImage(IntPtr, Int32, Int32, Int32, PixelFormat) constructor specifying some invalid parameters.|
If the makeCopy is set to , then the method creates a managed copy of the unmanaged image, so the managed image stays valid even when the unmanaged image gets disposed. However, setting this parameter to creates a managed image which is just a wrapper around the unmanaged image. So if unmanaged image is disposed, the managed image becomes no longer valid and accessing it will generate an exception.