[Xcb] Determining pixel format when xcb_get_image_reply_t.visual = 0

Florian Albrechtskirchinger falbrechtskirchinger at gmail.com
Wed Dec 19 06:12:23 PST 2012


I'm trying to fix an issue in the XCB screen capture code of VLC. When 
capturing a semi-transparent window the red and blue colors are 
inverted. The code currently doesn't determine the precise pixel format, 
i.e. RGB or BGR.
So I found out how to iterate visuals and figured all I needed to do now 
is find the visual matching xcb_get_image_reply_t.visual and convert the 
pixel format if needed. But xcb_get_image_reply_t.visual is zero and 
there's no visual by that ID.
VLC uses xcb_composite_name_window_pixmap(). Could that be the reason 
why the visual ID isn't set? How do I determine the pixel format in this 

If anyone wants to have a closer look at the source it can be found here:
File ./modules/access/screen/xcb.c
Line 407


More information about the Xcb mailing list