如何在C#中处理像素级别的图像 [英] How to manipulate images at the pixel level in C#
本文介绍了如何在C#中处理像素级别的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C#中以像素级操作图像?
How do I manipulate images at the pixel level in C#?
我需要能够分别读取/修改每个位图像素RGB值。
I need to be able to read/modify each bitmap pixel RGB values separately.
我们将非常感谢代码示例。
A code sample would be appreciated.
推荐答案
如果你想要速度,然后 LockBits 。 请参阅此处,了解鲍勃鲍威尔的演练。如果您只想编辑一些,请 GetPixel / SetPixel 应该做什么你想要的。
If you want speed, then LockBits. See here for a good walkthrough by Bob Powell. If you just want to edit a few, then GetPixel/SetPixel should do what you want.
这篇关于如何在C#中处理像素级别的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文