首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

怎么将影像的RGB值读到内存中

2012-04-27 
如何将影像的RGB值读到内存中就是比如一幅200*200的影像先读到一个数组color[200][200]并读到内存中?谢谢

如何将影像的RGB值读到内存中
就是比如一幅200*200的影像先读到一个数组color[200][200]并读到内存中?谢谢各位大侠了!!!

[解决办法]

Bitmap img = XXX;
int[,] color = new int[200,200]
for(int x = 0; x < 200; x++)
{
for(int y = 0; y < 200; y++)
{
color[x,y] = img.GetPixel(x,y);
}
}

热点排行