摘要:
// 根据RGB,计算灰度值private int GetGrayColor(System.Drawing.Color color){ int i = (int)(0.299 * color.R + 0.587 * color.G + 0.114 * color.B); int i2 = (color.R * 19595 + color.G * 38469 + color.B * 7472) >> 16; return i;}private void SetBitmap(Bitmap img){ BitmapData bmData = img.LockBits(new ... 阅读全文