Path: utzoo!attcan!uunet!clyde.concordia.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!rutgers!gatech!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Can some one help me with Image package Message-ID: <9010240903.AA15894@Larry.McRCIM.McGill.EDU> Date: 24 Oct 90 09:03:12 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 39 >>> The XPutPixel is not too bad to use as it is very smart about 8 and >>> 1 bit images. [...] We have found the that slowness is tolerable >>> knowing that an application will always work with any depth and >>> bit-byte ordering. >> If you're trying to be interactive it's *not* tolerable. I get >> around this by defining my own image format and slamming it into the >> XImage structure. The code that transforms into server-native >> format is much more efficient than the PutPixel/GetPixel code so >> there's a big jump in throughput. > Yes we did this originally, too, but found that some servers do *NOT* > accept any old format that you stuff into an XImage structure. Does > an X server have to accept any XImage structure (but do it slowly if > it does not match the hardware format)? According to my skimming of the protocol document, images must be presented to the server in its native format (which the client finds out about at connection setup). It is up to the client to do any reordering necessary. However, the Xlib document says, when talking about XImage structures, You may request that some of the members (for example, height, width, and xoffset) be changed when the image is sent to the server. That is, you may send a subset of the image. Other members (for example, byte_order, bitmap_unit, and so forth) are characteristics of both the image and the server. If these members differ between the image and the server, XPutImage makes the appropriate conversions. So if this isn't happening, there's a bug in XPutImage, or perhaps the server is rejecting data which in fact actually conforms to the format it has requested. Either one calls for a bug report - but make sure you have it right which one it is; an erroneous bug report is often almost worse than no bug report at all. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu