Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!hp-pcd!hpcvlx!harry From: harry@hpcvlx.cv.hp.com (Harry Phinney) Newsgroups: comp.sys.apollo Subject: Re: XGetImage Message-ID: <101020006@hpcvlx.cv.hp.com> Date: 9 Jun 90 01:12:27 GMT References: <9006071631.AA13824@umix.cc.umich.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 25 >> is there a way to get the image data without doing an XGetImage, which >> allocates memory and takes time to copy all the pixels? >> Scott Ferguson > If you want the pixel contents for the drawable, you > must copy them over the (possible) network from the server to the client. > Kem Ahlers u36009@u2.ncsa.uiuc.edu (Internet) Kem is correct, with one exception. In the case that you're running on the local system, and happen to be running an R4 server and libraries built to support the MIT-unsupported-hack shared memory extensions, then you can share pixmap and image data (but not window bits directly) with the server. You would still need to have the server do a CopyArea from the window to a shared memory pixmap before you could access the bits, and changes clients make to the window will not automatically be reflected in the pixmap copy. The general approach would be to create a shared memory pixmap, CopyArea the window contents into the pixmap, draw to the pixmap, then CopyArea the pixmap to the window. You could do your own multi-buffering by allocating two (or more) shared memory pixmaps and alternating drawing ops to and CopyAreas from the pixmaps to the window. Caveat: I've never used X on Domain - I've only used it on HP-UX Harry Phinney harry@hp-pcd.cv.hp.com