示例#1
0
 private void PictureBox1_MouseUp(object sender, MouseEventArgs e)
 {
     using (var bmp = new Bitmap(PictureBox1.Image.Width, PictureBox1.Image.Height))
     {
         PictureBox1.DrawToBitmap(bmp, PictureBox1.ClientRectangle);
         var color = bmp.GetPixel(e.X, e.Y);
         var red   = color.R;
         var green = color.G;
         var blue  = color.B;
         MessageBox.Show(Convert.ToString(red + " " + green + " " + blue + ""));
     }
 }