What pixel format does X server use?

*爱你&永不变心* 提交于 2019-12-11 02:39:39

问题


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.


回答1:


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).




回答2:


Use xdpyinfo to find information about an X server.




回答3:


That's a difficult question to answer as you don't say explicitly what kind of a graphical interface you are running on, since X is the bare-bones X driver behind the GUI such as GNOME, KDE, WindowMaker, fluxbox, NextStep to name a few, I know for certain that KDE's interface uses compiz to communicate with the X driver interface to draw on the screen and perform eye-candy movements...but the resolution of X is still the same regardless..8 bits, 16 bits, 24 bits, 32 bits pixel format depending on your screen resolution and how X is configured.

To clue you in on the graphics display, look for /etc/X11/xorg.conf or similar to find out .... you can usually, hit 'Ctrl', 'Alt', '+' to increase resolution or use a '-' to decrease resolution (bear in mind that you need to hold down the Ctrl+Alt and hit either the + or - key to achieve the resolution where warranted...)



来源:https://stackoverflow.com/questions/2434511/what-pixel-format-does-x-server-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!