当前位置:编程学习 > C#/ASP.NET >>

关于Emgu的ImageBox显示IntPtr图像文件的问题,求助各路大神······

我本来实现了一种方法,如下:
MIplImage dst_res = (MIplImage)Marshal.PtrToStructure(dst, typeof(MIplImage));
Image<Bgr, byte> result = new Image<Bgr, byte>(dst_res.width, dst_res.height, dst_res.widthStep, dst_res.imageData);
result.Save("f:/result.jpg");
imageBox1.Image = new Image<Bgr, byte>("f:/result.jpg");
但是这样缺点是效率太低,反复读取硬盘。。。
另外一种实现是:
MIplImage dst_res = (MIplImage)Marshal.PtrToStructure(dst, typeof(MIplImage));
imageBox1.Image = new Image<Bgr, byte>(dst_res.width, dst_res.height, dst_res.widthStep, dst_res.imageData);
但是这样的话在控件里面无法显示,不知道什么原因···
希望大神能够给在下释疑解惑···不胜感激!
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,