Need to Change From "PictureBox" Image ( i.e. Bitamap^ ) to " IplImage* " in VC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Need to Change From "PictureBox" Image ( i.e. Bitamap^ ) to " IplImage* " in VC

eslami_aut

Hi All

Thanks to one of the posts, I can change my image data from
"IplImage*" to "PictureBox" (i.e. Bitamap^) by aid of these two lines
of code:  

//////////////////////////////////////////////////////////////////

System::Drawing::Bitmap ^srcBmp = gcnew
System::Drawing::Bitmap(img->width,img->height,img->widthStep,System::Drawing::Imaging::PixelFormat::Format24bppRgb,(System::IntPtr)img->imageData);
pictureBox1->Image =
pictureBox1->Image->FromHbitmap(srcBmp->GetHbitmap());

//////////////////////////////////////////////////////////////////

I will be thankful if any one show me how to do the reverse.

Regards
Hamed