图像处理如何加速?? 制作控件时要给e.Graphic绘制图像。我的做法是e.Graphic.DrawImage(image,0,0)但我觉得这样速度太慢了。有什么好的加速方法吗。能使用在C#能调用的别的语言写的方法也行。谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 windows api不一定快,openGL native interop方式在.net下大概慢了5倍,marshal的原因吧。Graphics class 下的一些属性CompositingModeCompositingQuality如果多个图形有重叠,试试部分渲染。 呵呵。directx到不错,而且,现在机器一般都安装了的,可以试试! GDI要比GDI+要快不少DirectDraw比GDI又要快一点不过DiretDraw和GDI要求你用C/C++编程一般启用双缓冲后就没有这种问题了,用不着想得那么麻烦 我用BitBlt进行图像复制,BitBlt ( dc4 , 0 , 0 , this.Width , this.Height , dc2 , 0 , 0 , 13369376) ;为什么窗体只显示黑色,而不是显示出图像来呢?但,反过来BitBlt ( dc2 , 0 , 0 , this.Width , this.Height , dc4 , 0 , 0 , 13369376) ;则能把窗体复制到图像中。为什么会这样???Bitmap MyImage = (Bitmap)Bitmap.FromFile("D:\\Mybmp.bmp");Graphics g2 = Graphics.FromImage ( MyImage ) ;//获得屏幕的句柄IntPtr dc4 = GetDC(this.Handle);//窗体的Handle//获得位图的句柄IntPtr dc2 = g2.GetHdc ( ) ;//拷贝位图BitBlt ( dc4 , 0 , 0 , this.Width , this.Height , dc2 , 0 , 0 , 13369376) ;g2.ReleaseHdc ( dc2 ) ;ReleaseDC(this.Handle,dc4); 为了更好的交流,请到http://www.dj9394.com/it/注册一个,上面通知好几个.net 学习群共同交流了 怎样在C#的DataGridView的单元格中直接打开对应文件 dataGridView1 绑定动态生成的 DataTable ,没有显示效果?? 如何用自定义响应代替WebBrowser或axWebBrowser提交请求之后的响应 关于hook的问题 如何在指定的时间弹出提示 生成树问题,救命啊~~~~~~~ 无法用data reader读取数据 高手请进:C#如何实现嵌套类的值传递??? imageList显示图片问题 一个相当简单的问题,关于textBox.Text 用Winform做FTP客户端软件,怎么得到传输速度? 请高手指点 请教一些基本问题
Graphics class 下的一些属性
CompositingMode
CompositingQuality
如果多个图形有重叠,试试部分渲染。
DirectDraw比GDI又要快一点
不过DiretDraw和GDI要求你用C/C++编程一般启用双缓冲后就没有这种问题了,用不着想得那么麻烦
BitBlt ( dc4 , 0 , 0 , this.Width , this.Height , dc2 , 0 , 0 , 13369376) ;
为什么窗体只显示黑色,而不是显示出图像来呢?
但,反过来
BitBlt ( dc2 , 0 , 0 , this.Width , this.Height , dc4 , 0 , 0 , 13369376) ;
则能把窗体复制到图像中。为什么会这样???Bitmap MyImage = (Bitmap)Bitmap.FromFile("D:\\Mybmp.bmp");
Graphics g2 = Graphics.FromImage ( MyImage ) ;
//获得屏幕的句柄
IntPtr dc4 = GetDC(this.Handle);//窗体的Handle
//获得位图的句柄
IntPtr dc2 = g2.GetHdc ( ) ;
//拷贝位图
BitBlt ( dc4 , 0 , 0 , this.Width , this.Height , dc2 , 0 , 0 , 13369376) ;
g2.ReleaseHdc ( dc2 ) ;
ReleaseDC(this.Handle,dc4);