如何处理在像素级图像在C#中? [英] How to manipulate images at pixel level in C#?

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

问题描述

如何处理在像素级图像在C#?

How to manipulate images at pixel level in C#?

我需要能够读取/分别修改每个位图像素的RGB值。

I need to be able to read/modify each bitmap pixel RGB values separately.

code样品AP preciated。

Code sample appreciated.

在此先感谢!

推荐答案

如果你想要的速度,然后的 LockBits 的。请参见这里鲍勃·鲍威尔一​​个很好的演练。如果你只是想编辑了几下,然后 GetPixel / <一个HREF =htt​​p://msdn.microsoft.com/en-us/library/system.drawing.bitmap.setpixel.aspx> 的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屋!

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