[Xcb] Get image/color data

Rémi Denis-Courmont remi at remlab.net
Mon Nov 23 07:29:58 PST 2009

On Sun, 22 Nov 2009 08:05:22 -0500, Peter Harris <git at peter.is-a-geek.org>
> On Sun, Nov 22, 2009 at 12:45 AM, Nadeem Syed wrote:
>> How would I get the image of the provided handle device context
> (window)?
> Please don't. GetImage is a very slow operation

But is there really any alternative for screenshot purposes? I don't
suppose Composite + GetImage is any better?

>> I
>> need to get the image (screen shot basically) and then save it to as an
>> image to the hard disk.
> Are you sure? What are you really trying to do?
>> How would I got about doing this?
> You don't. It's a bad idea. See above. But if you really, really need
> to (and you probably don't), you can use:
> xwd -id <window id>
> http://cgit.freedesktop.org/xorg/app/xwd/

AFAICT, xwd does use GetImage internally. Why is that better?

Is there anything hybrid of Xephyr and Xvfb that would both display and use
a shared memory frame buffer?

Rémi Denis-Courmont

More information about the Xcb mailing list