Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between XYPixmap, ZPixmap, XImage, XShmImage and Bitmap in X?

Tags:

bitmap

xorg

xlib

The only fact I know is that XImage is stored on the client side and the pixmaps are stored on the server side. Is it so simple?

Then what is XY and Z Pixmaps and why X needs so many types of image formats?

Why there is no XY and Z Images?

And what is Bitmap in the context of Xlib and why there is a function XCreateBitmapFromData that returns Pixmap handle? (or pointer? or structure?)

like image 228
johnfound Avatar asked Feb 04 '15 14:02

johnfound


1 Answers

From the X11 protocol specification:

The data for a pixmap is said to be in XY format if it is organized as a set of bitmaps representing individual bit planes, with the planes appearing from most-significant to least-significant in bit order.

Which means for an RGB image you have all the red channel data followed by the green and then blue instead of the more traditional RGB triplets (ZPixmap).

like image 149
Robert Ancell Avatar answered Sep 23 '22 16:09

Robert Ancell