Converting Bitmap to UnmanagedImage

2.4k Views Asked by At

I am writing some algorithms in AForge.Net and I need to convert Bitmap to UnmanagedImage, does anyone know how to do that?

1

There are 1 best solutions below

0
On

There is a method for that :

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

Bitmap bitmap = ...;
UnmanagedImage unmanagedImage = UnmanagedImage.FromManagedImage(bitmap);

Hope this help.