如何在c#中逐像素地绘制图像? [英] How can I draw Image pixel by pixel in c#?

查看:114
本文介绍了如何在c#中逐像素地绘制图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请在这里写一些solutoins。

Please write here some solutoins.

推荐答案

最好的解决办法是在其中 [ ^ ]。



-KR
Best possible solution is here[^].

-KR


最糟糕的事情是使用 SetPixel 。你最好使用 System.Drawing.Bitmap.LockBits

http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.lockbits%28v=vs .110%29.aspx [ ^ ]。



使用WPF,可以使用类 System.Windows.Media.Imaging.WriteableBitmap :

http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.110% 29.aspx [ ^ ]。



-SA
Worst thing to draw anything is using SetPixel. You should better use System.Drawing.Bitmap.LockBits:
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.lockbits%28v=vs.110%29.aspx[^].

With WPF, it can be done using the class System.Windows.Media.Imaging.WriteableBitmap:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.110%29.aspx[^].

—SA

这篇关于如何在c#中逐像素地绘制图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆