我在尝试完成这项任务时遇到了很多问题。我知道如何创建屏幕截图并将其保存为位图......
Dim printscreen As New Bitmap(thewidth, theheight, PixelFormat.Format24bppRgb)
Dim xscreenshot As Graphics = Graphics.FromImage(printscreen)
Dim theTest As New Size(thewidth, theheight)
Dim theXLoc As String = "200"
Dim theYLoc As String = "200"
xscreenshot.CopyFromScreen(theXLoc, theYLoc, 0, 0, theTest)
printscreen.Save("C:\Temp\printscreen.bmp", ImageFormat.MemoryBmp)
但是,当您拉起 Pixelformat 的选项时。没有选项可以保存在 8pp 中。我真的在尝试这样做,因为我一直在使用 AFORGE.Imaging 库进行图像比较,并且为了比较灰度图像,它们必须采用 8pp 格式。