What pixel format (RGBA, ARBG, BGRA) does the X server use? If any specific format at all.
Update: I’m specifically looking for information about the color component order and bit patterns.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mean the framebuffer format? Or all the supported pixmap formats? Whichever it is, it depends on your graphics hardware, driver and configuration.
To see all the formats supported on your X server (they’re called “visuals” in X lingo), try the xdpyinfo utility. You will probably see lots of separate, but identically looking visuals. They differ in additional data associated with each pixel besides the RGB values (alpha, depth, stencil, multisample, etc.). This can be shown by the glxinfo utility.
That all being said, the most popular format on contemporary PC hardware is the windowsish 8-bit per channel, 32-bit per pixel BGRX or BGRA (X stands for unused). Note that this is byte order, not “logical word” order, which on a little-endian architecture like x86 would be the opposite (XRGB, ARGB).