在 C# 中,您可以获得这样的屏幕截图:
Bitmap image
try
{
image = new Bitmap(1024, 768);
Graphics g = Graphics.FromImage(image);
g.CopyFromScreen(new Point(0, 0), new Point(0, 0), new System.Drawing.Size(1024, 768));
}
catch { }
现在,您可以像这样读取像素:
Color color = image.GetPixel(0, 0);