Advertisement

Xlib Images (zpixmap format)

Started by February 15, 2001 09:12 AM
-1 comments, last by Shadow Mint 23 years, 11 months ago
I''ve only ever played with xlib directly to the extent of opening windows and drawing text (occasionally a bit of line drawing too). I''ve been asked to do some stuff on a friends piece of xlib code. Apart from the other numerous thing I have to play with , the code uses a (nasty) custom image format. The format is not so much a problem. The problem is that it is loaded into a linked list of pixel values. The code then creates a blank zpixmap of the appropriate size and uses XPutPixel to fill the empty image with the pixel values, then use the Ximage as it should be used (sort of). Anyhow, my question is: 1) Can someone pls, to satisfy my curiosity, explain the zpixmap data format to me. None of my xlib books give any of the image functions more than about 4 lines. Lets say, for a 16 bit image. 2) Since the image format is basically a bitmap (sorta; ints cast to chars and written to file, three bytes per pixel (ouch!)), whats the best way to stuff all that data directly into an ximage? Am I better off just rewritting the entire image loading code? (Nb; last option; undesirable. Requires I write something to translate this format into a better one). Thanks!

This topic is closed to new replies.

Advertisement