// 建立图像
Bitmap b = new Bitmap(Image.FromFile(FileName));
//按比例显示(不变形)
bmp1 = new Bitmap(b, b.Size.Width, b.Size.Height);
// 显示图像
pictureBox1.Image = bmp1;
//显示缩略图
pictureBox2.Image = SmallPic(bmp1, bmp1.Size.Width, bmp1.Size.Height);
this.Text = FileName;
// 取点颜色
Color color1 = bmp1.GetPixel(0, 0);
textBox6.Text = color1.R.ToString();
textBox5.Text = color1.G.ToString();
textBox4.Text = color1.B.ToString();
int h = bmp1.Height;
int w = bmp1.Width;