<div dir="ltr"><div><div><div>I thought Zpixmap mapped directly to BGRA. But my assumption didn't turn out to be correct in some older X versions.<br><br></div>I am using xcb_get_image and xcb_shm_get_image to grab screen pixels. I used Zpixmap option for image format. In new-ish Xorg versions it works perfectly. <br><br></div>But in some machines with older Xorg (1.15 and below) , I get discolored, overlapped data, and it is less than 4 * width * height bytes. If I try to read with bytes per pixel as 4 , overflow occurs.<br><br></div>CouldĀ  this be some environment issue , or is there any other "proper" way to convert Zpixmap to bgra/rgb formats?<br></div>