Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!SABER.COM!jimf From: jimf@SABER.COM Newsgroups: comp.windows.x Subject: Re: Pixmap vs. Image Message-ID: <9006031425.AA05232@bowie> Date: 3 Jun 90 14:25:05 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 32 |My understanding, so far, is that images (Ximage structure) reside |on the client and shipping them to my window can take lots of time |(many <> seconds) for large images. Pixmaps, however, |reside on the workstation (server) and can be loaded into the |window much faster. Here's the question: | |If I have to do these computations (an add and multiply) on each pixel, |and load the result into a window. First, where do the computations |take place (server or client)? Second, if they take place on the |client, is it faster to use Images which are already there, or use |Pixmaps which seems to imply a round trip for each pixel? Which is |faster, which is easier, which is politically correct???? If you're doing heavy image manipulation, do it in the client and ship a finished XImage to the server. This is much faster than doing per-pixel manipulations (which are still done on the client but which will be sent one-at-a time to the server). I suggest, however, sending the image to a pixmap and using the pixmap to blit to the window. This means you only send the processed image once, although it can potentially use a lot of memory in the server. I don't know why it's taking so long to send an XImage to your server; in practice I can send large 8-bit images over the network in a couple of seconds, and even faster locally. I suggest looking at the code to xloadimage, which does a variety of simple image processing functions. jim frost saber software jimf@saber.com