[Xcb] Identifying format of image data returned by get_image

Jonathan Baldwin jbaldwin9182 at gmail.com
Sat Dec 10 09:39:28 PST 2011


Hi! I'm trying to read and process image data from a drawable using
xcb_get_image. To parse and encode the data, I need to match the
format against a list of formats (RGBA32, BGRA15, monochrome, etc...)
supported by the encoder. In Xlib, the XImage structure provides
bits_per_pixel and colour masks which can be tested to identify the
format, but the xcb_get_image_reply_t structure only contains a depth
and visualid. How can I get the bpp and colour masks using xcb?

Thanks,
Jonathan Baldwin


More information about the Xcb mailing list