Question

does anyone know what is XLib ZPixmap format for 32/24bit images/pixmaps. Is it RGB(A) or BGR(A), etc. or highly implementation dependent?

Was it helpful?

Solution

Pixmaps have no color, period. They're just arrays of pixel values. The only drawables in X that have a color interpretation are Windows (channels defined by Visuals), Pictures (channels defined by Picture Formats), and GLX drawables (channels defined by either a GLX visual or an fbconfig). Any "color" interpretation you want to put on a pixmap is a function of where those pixels are going to end up (or, where they came from). If you're going to put them into a Window, look at the Visual of the Window to discover what the color channel masks are.

[edit: added GLX drawable info]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top