public partial class formMain : Form { Bitmap b = new Bitmap(@"F:\Hrit1\MSG1MostO.bmp"); private void mapMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { Coordinate c= mapMain.PixelToProj(new System.Drawing.Point(e.X , e.Y )); int pixel = Convert.ToInt32(c.X); int line = Convert.ToInt32(c.Y); if (line < 0 || pixel < 0 || line > 850 || pixel > 1145) { line = 0; pixel = 0; } Color col = b.GetPixel(pixel, line); textBox1.Text = col.ToString(); } }
GetPixel()
R
G
B
byte
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)