见鬼了, 一张15*15的纯白色小图片, 放大N倍, 没有一个黑点,但是遍历时,却发现有像素为黑色
真他妈的见鬼了,还让人睡觉不,真想摔电脑了!!!!
遍历图片的代码如下:
public bool CheckNoise(Bitmap bmp, int dgGrayValue) { bmp.Save("c:\\1.jpg"); // 保存到磁盘上以后, 并看不出有黑点 for (int x = 0; x < bmp.Width; x++) { for (int y = 0; y < bmp.Height; y++) { if (bmpobj.GetPixel(x, y).R < dgGrayValue) { bmp.Dispose(); bmp = null; return true; } } } bmp.Dispose(); bmp = null; return false; }