开发者

Screen capture on Linux

开发者 https://www.devze.com 2022-12-09 11:56 出处:网络
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 imag

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消