aw@romeo.cs.duke.edu (Angus Wang) (01/31/89)
I'm trying to get a window dump a graphing program I wrote using
'xwd' & 'xpr' in the following manner :
1) get application running and then type 'xwd -xy -out graf.scr'
in another local window.
2) After getting 'cross-hair' cursor, I click on the window and
wait for the 2 rapid beep, telling me xwd ius done.
3) type xpr -output graf.scr.ps -device ps < graf.scr
4) type lpr -Pps graf.scr.ps
I'm running this on a Sun 4/110 with a color monitor (/dev/cgfour0) and
trying to get it to print out on a postscript laser printer(apple laser
writer). I can run 'xwud -in graf.scr' and the the correct image, but
when I send it to the laser write via lpr -Pps, I just get a black
rectangle where the image should be.
Does anyone have any suggestions of what I am doing wrong? Does this
process only work on B&W monitors?
Any help would be greatly appreciated,
Angus
Department of Computer Science, Duke University, Durham, NC 27706
UUCP : decvax!duke!aw CSNET: aw@duke
ARPA : aw@cs.duke.edurws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/31/89)
The R3 xwud and xpr have numerous deficiencies. In your particular case, the problem with xpr is that it is taking the most significant bit plane of the image, and you probably want some other one (like the least significant) to get a reasonable image. I've rewritten xwud and xpr to do numerous things right. xwud will correctly remap colors, change depths, pick a visual, etc. xpr will let you specify which plane to use, doesn't require an xy format image, will do color->mono conversion, and will even do a simple 5-level gray scale conversion for color. Of course, I'm telling you things you probably don't want to know, since you might not see the results until R4. I'll have to think on this.