Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xlib Images (zpixmap format)

This topic is 6305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!