On 11/03/2014 21:06, Hongze Zhao wrote:
> Hi List,
> 
> I am curious about how screenshot  in an OS running Xorg works? I guess Linux 
> does not provide such
> a system call or interface. Is screenshot implemented by calling a special 
> xorg interface?

I use XLib function XGetImage 
<http://tronche.com/gui/x/xlib/graphics/XGetImage.html>.
It performs a raw dump of a drawable (a Window or a Pixmap). But you must 
convert the data into a
high level image format (png, jpg) using an external lib.

>From the X.Org inner (DDX, Module, ...) You can also call this function 
>through the ScreenRec structure.

-- 
Alexandre Confiant-Latour
@         : a...@user-unfriendly.net
Jabber    : chouke...@im.apinc.org
GPG Key ID: 0x18CA62CC (pgp.mit.edu)

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Reply via email to