Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amelia!eos!shelby!med!hanauma!rick From: rick@hanauma.stanford.edu (Richard Ottolini) Newsgroups: comp.windows.x Subject: Re: XView and image display Keywords: XView, Sun Message-ID: <381@med.Stanford.EDU> Date: 9 Feb 90 15:37:25 GMT References: <1990Feb6.202148.14508@elroy.jpl.nasa.gov> <131499@sun.Eng.Sun.COM> Sender: news@med.stanford.edu (USENET News System) Reply-To: rick@hanauma.UUCP (Richard Ottolini) Distribution: na Organization: Stanford University, Dept. of Geophysics Lines: 16 In article <131499@sun.Eng.Sun.COM> hvr@sun.UUCP (Heather Rose) writes: >In article <1990Feb6.202148.14508@elroy.jpl.nasa.gov> alan@judy.Jpl.Nasa.Gov (Alan S. Mazer) writes: >>Has anyone out there successfully displayed an image in OpenWindows without >>using pw_ calls? I can't find any examples that do this and everything I've >>tried simply core dumps. If you have, would you PLEASE send (or post) sample >>code? Thanks. > >Just use XPutImage(display, xid, gc, image, src_x, src_y, dst_x, dst_y, > width, height); Incomplete answer. Colors should be set up with X calls too in place of pixwin calls. In XView the color-map-segment code finds a contigious block of free color space and puts the color table there. The pw_rop command calls XPutImage, but adds the color table offset to each pixel in the XImage data before XPutImage and subtracts it after.