【发布时间】:2015-12-26 04:38:11
【问题描述】:
我正在尝试截屏。在 Windows 下工作就像一个魅力。
Windows:http://i.imgur.com/QzmMDmO.jpg
但是,在 Ubuntu(14.04 LTS,使用 Wine)下无法正常工作。
示例:http://i.imgur.com/R62IDUt.jpg
我知道这是一个没有正确包装所有函数的 Wine 问题。但是,有没有其他方法可以在 Ubuntu/Windows 下尝试获取屏幕截图?谢谢。
我的实际代码:
int screenLeft = SystemInformation.VirtualScreen.Left;
int screenTop = SystemInformation.VirtualScreen.Top;
int screenWidth = SystemInformation.VirtualScreen.Width;
int screenHeight = SystemInformation.VirtualScreen.Height;
using (Bitmap bmp = new Bitmap(screenWidth, screenHeight)){
using (Graphics g = Graphics.FromImage(bmp)){
g.CopyFromScreen(screenLeft, screenTop, 0, 0, bmp.Size);
}
}
【问题讨论】:
标签: c# ubuntu screenshot ubuntu-14.04 wine