Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!darkstar!ucscc.UCSC.EDU!chucko From: chucko@ucscc.UCSC.EDU (30502000) Newsgroups: comp.windows.x Subject: Pixmap vs. Image Message-ID: <3994@darkstar.ucsc.edu> Date: 1 Jun 90 19:08:29 GMT Sender: usenet@darkstar.ucsc.edu Reply-To: chucko@ucscc.UCSC.EDU Distribution: usa Organization: University of California, Santa Cruz CATS Lines: 36 Summary: To use Pixmap or Image structures when pixel computations are performed often. I am in the design stage of an X application that involves quite a bit of image manipulation. Images come to me as 16-bit, and will usually be treated as 8-bit by my application. I need to keep around the 16-bit data in case I need to get to the real (unquantized) data. In order to "blend" or "overlay" 2 or more images and display them in an 8-bit deep window I need to do computations on corresponding pixels in each image to create the blended image (the computation is similar to finding the pixel value when using XStandardColormaps). 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???? Your help is much appreciated. Reply to the newsgroup if you think it's of interest to others, otherwise direct and perhaps I'll summarize. Chuck Stein chucko@ucscc.ucsc.edu Mirror Imaging / NOARL West { I do represent the opinion of my employer. }