using(Bitmap b = new Bitmap(yourFileName))
{
MessageBox.Show(string.Format("image size {0} by {1} pixels", b.Width, b.Height));
MessageBox.Show(string.Format("color of pixel (100,100) is {0}", b.GetPixel(100, 100).ToString()));
}
位图对象具有多个属性和方法,可帮助您分析图像内容。 尝试使用此功能开始分析您的图像,并不要忘记在之后销毁位图或将其包装到使用语句中,如上所示...
"