Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!samsung!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: picture display under X Message-ID: <9008290805.AA01030@Larry.McRCIM.McGill.EDU> Date: 29 Aug 90 08:05:28 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 19 > I am using OpenWindows(X11) on a SparcStation 1+ and I'd like to > display a 512x512 picture with 8-bit pixel values, but I can't find > any X function which will do the trick. Setting the color map is > easy, but how do you display a row or region of pixels which is > stored as, say, a char array? It seems like using either an image or > pixmap would be required, but the documentation on the formats is > unclear -- if XYPixmap really requires separating all the bits out > into bitplanes, that seems rather cumbersome and inefficient. Right; that's what ZPixmap format is for. I would suggest creating an XImage structure pointing to your data and using XPutImage (either directly to a window or to a pixmap which you then XCopyArea to the window - trading speed for server-side memory). der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu