如何在c#中逐像素地绘制图像? [英] How can I draw Image pixel by pixel in c#?
本文介绍了如何在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 usingSetPixel
. You should better useSystem.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 classSystem.Windows.Media.Imaging.WriteableBitmap
:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap%28v=vs.110%29.aspx[^].
—SA
>
这篇关于如何在c#中逐像素地绘制图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文