简体   繁体   English

Linux上的屏幕截图

[英]Screen capture on Linux

I need to port a screen capture utility to Linux. 我需要将屏幕捕获实用程序移植到Linux。

I'm not familiar with Linux. 我不熟悉Linux。 On Windows, you can get the handle of a specific window or desktop and using BitBlt in Win32 API, you can copy the image and save it to a BMP file or even convert it to Jpeg format. 在Windows上,您可以获取特定窗口或桌面的句柄,并在Win32 API中使用BitBlt,您可以复制图像并将其保存到BMP文件,甚至可以将其转换为Jpeg格式。

On Linux, as far as I know there are different desktop environments like KDE. 在Linux上,据我所知,有不同的桌面环境,如KDE。 Which should I target for development? 我应该针对哪些发展目标? Or which distribution? 或者哪个发行? And also, which development environment do you suggest? 而且,您建议使用哪种开发环境? I do programming in C/C++. 我用C / C ++编程。

Using Xlib to talk to the X server works the same way regardless of your desktop environment. 无论桌面环境如何,使用Xlib与X服务器通信的方式都相同。 Retrieve a list of windows from the server, work out which one you want and hence its position and size, and use XGetImage to retrieve the image data. 从服务器中检索窗口列表,找出所需的窗口,从而确定其位置和大小,并使用XGetImage检索图像数据。

IDEs are a matter of taste; IDE是一个品味问题; there are many suggestions here . 有许多建议在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM