[Xcb] equivalent of XImage ?

Jamey Sharp jamey at minilop.net
Sat Dec 4 20:04:59 PST 2004


On Sat, Dec 04, 2004 at 12:19:44PM +0100, Vincent Torri wrote:
> i would like to know if there's an equivalent struct of Xlib's XImage in
> xcb.

No, there isn't. I'd be happy to see proposed interfaces on top of XCB,
if someone has an idea for a convenience API for image handling. Note
that such a thing would probably never become part of XCB proper,
because it shouldn't need access to any XCB internals.

I wrote, and Keith fixed, most of the code you probably need (assuming
support for the BIG-REQUESTS extension) in Cairo's XCB backend. Take a
look at cairo/src/cairo_xcb_surface.c, and find the calls to XCBGetImage
and XCBPutImage. When you don't need to do format conversion and you can
send your entire image in one request, the code is really pretty simple.

--Jamey


More information about the xcb mailing list