简体   繁体   中英

Screen capture on Linux

I need to port a screen capture utility to Linux.

I'm not familiar with 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.

On Linux, as far as I know there are different desktop environments like KDE. Which should I target for development? Or which distribution? And also, which development environment do you suggest? I do programming in C/C++.

Using Xlib to talk to the X server works the same way regardless of your desktop environment. 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.

IDEs are a matter of taste; there are many suggestions here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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