Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!esvax.berkeley.edu!bchen From: bchen@esvax.berkeley.edu (Benjamin Chen) Newsgroups: comp.windows.x Subject: Re: Question re. xwps (or xpr) and color displays Message-ID: <31048@ucbvax.BERKELEY.EDU> Date: 31 Aug 89 22:28:49 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: bchen@esvax.berkeley.edu (Benjamin Chen) Organization: University of California, Berkeley Lines: 25 However, "xwps" dumps out 2 bytes for each pixel, which produces rather large PostScript files. "Xpr" produces much smaller PostScript files, but I don't understand enough of what it is doing to modify it suitably. I originally wrote the X10 version, and since been "ported" (mangled, acutally) by a friend of mine to X11. The PostScript *image* facility accepts values from 0 to 255, so only a byte is really necessary for each pixel. The X10 version does this precisely. Are you certain that the X11 version insists on outputing a two-byte image? I'm looking at the source right now, and it looks like it takes only one byte of info. I guess you could mean that the two hex characters which describe one byte is two-bytes, but I don't see another way around this. What might be a good optimization technique is to have an option for using a scanline algorithm on "simple" windows, i.e. windows with only a few shapes or lines drawn in them. Oh well, I guess R4 will have reasonable support for this, so the program may become somewhat useless. BC Benjamin Chen Office: 550-A4 Cory Hall, 2-4332 UUCP: !ucbvax!esvax!bchen HEPNET: LBL::"bchen@esvax.Berkeley.EDU"