Path: utzoo!utgpu!watmath!iuvax!rutgers!mcnc!ravi From: ravi@mcnc.org (Ravi Subrahmanyan) Newsgroups: comp.windows.x Subject: Question re. xwps (or xpr) and color displays Keywords: color postscript x Message-ID: <5235@alvin.mcnc.org> Date: 30 Aug 89 23:13:03 GMT Organization: Microelectronics Center of NC; RTP, NC Lines: 34 I have a question re. dumping a window on a color display to a postscript printer. The window is a black on white window. I've tried doing something like (with suitable options) xwd | xpr -device ps | lpr I've tried the various options for Z and XY pixmap formats, etc., but what ends up happening is that by the time my color window shows up as a postscript file (if I look at the file instead of piping it to lpr) the file's bitmap definition has all 0's or all 1's, which gives me a black black square, or a fully white square on the page. I was able to use the recently posted "xwps" program, after changing it to output "00" for black, and "FF" for anything else, which is Ok for black and white windows. 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 think what would really help is a utility that will take a color image and convert it to a monochrome image (say with user supplied thresholds for r,g,and b, like the sun rastfilter8to1 program which takes a sun screendump from 8 bitplanes to 1.) Does something like this exist for X? I thought I'd try to write one, but I got stuck right away because XCreateImage wants to know the display type, and I didn't know how to tell it that I have a monochrome display instead of what I really have. I'd appreciate any tips or pointers to existing code anyone could pass on. Thanks, -ravi ~