View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Reading the “Xlib - C library X reference” X11 documentation, I am still confused as to a particular point of the X11 XPutImage() documentation. Yeah, I understand ZPixmap is the conventional RGB image format representation, but really, what is this XYPixmap representational form? I can’t help but be curious about it.

20200519/DuckDuckGo xybitmap format
20200519/DuckDuckGo xypixmap format
20200519/https://rkennke.wordpress.com/2007/07/12/xypixmap/

Alas, the article is only a prompt asking the question seeking an answer. But indeed, there is a hint. “Search for XYFormat in rfc1013.”

Also, there’s a StackOverflow question on this, surely a direct answer will be there.

20200519/https://stackoverflow.com/questions/28323960/what-is-the-difference-between-xypixmap-zpixmap-ximage-xshmimage-and-bitmap-i

No… the StackOverflow question has a half-hearted answer. Yeah, it hints that an XYPixmap is a list of separated planes, i.e. first instead of RGB data being interleaved and adjacent, first comes all the red data in an image, then comes all the green data in an image, then comes all the blue data in an image. But what do they mean by planes? Does one “bit plane” include only one bit, or is it really all the bits of the same channel together? So this is why we need to keep searching for rfc1013.

20200519/DuckDuckGo XYFormat rfc1013
20200519/https://tools.ietf.org/html/rfc1013

Well, yes, that rfc1013 was indeed very helpful in explaining those esoteric XImage fields. However, I’m still left in wonder how exactly “bit planes” are to be interpreted. If I had to guess based off of the Wikipedia article on the subject and historic hardware that did organize color image data into separate “planes,” then I’d assume all bits of the same channel come together, rather than more literally being a “bit plane” of only one bit of each channel.

20200519/https://en.wikipedia.org/wiki/Planar_(computer_graphics)

Okay, that Wikipedia article was not quite the one. There was another Wikipedia article that showed a diagram of VRAM where one RAM chip is used for all red pixels, another RAM chip is used for all green pixels, and another RAM chip is used for all blue pixels. And I would assume that each RAM chip could read or write 8 bits in parallel, so that would obviate the need for slicing individual bits of the same channel apart.

In the grand scheme of things, I guess it’s interesting how short-lived plane-separated hardware was.