home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:18838 comp.sys.hp:12656
- Newsgroups: comp.windows.x,comp.sys.hp
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!kum.kaist.ac.kr!usenet
- From: milburn@vision.postech.ac.kr (John Milburn)
- Subject: Re: Reversing colors for printing
- Message-ID: <1992Nov7.025847.5851@kum.kaist.ac.kr>
- Sender: usenet@kum.kaist.ac.kr (news)
- Reply-To: milburn@vision.postech.ac.kr (John Milburn)
- Organization: POSTECH, Pohang, Korea
- References: <1697@esl.ESL.COM>
- Date: Sat, 7 Nov 92 02:58:47 GMT
- Lines: 36
-
- In article <1697@esl.ESL.COM> cary@esl.com (Cary Jamison) writes:
- >Is there an easy way of switching the black and white colors of the output
- >of xwd and/or xwd2sb before sending the output on to a printer? The
- >command used is:
- >
- >xwd -frame | xwd2sb | pcltrans <various options> | lp
- >
- >Where the pcltrans options are specific for either a color PaintJet or
- >LaserJet printer. Somewhere in this pipe, I would like to switch the black
- >and white colors so the windows printed don't waste so much ink (they have
- >black backgrounds). pcltrans is used instead of xpr because it provides
- >better quality output for the HP printers.
-
- For simple inversion, use pnminvert(1) from the Jef Poskanzer's pbmplus
- package.
-
- Then, the command could be something like:
-
- xwd -frame|xwdtopnm|pnminvert|pnmtoxwd|xwd2sb|pcltrans <various options>|lp
-
- There are better ways to do it with the pbmplus package. One might be:
-
- xwd -frame | xwdtopnm | pnminvert | pnmscale 4 | pnmsmooth | ppmtopgm \
- | pgmnorm | pgmtopbm | pbmtolj | lp -or
-
- This adds scaling, smoothing, and a good color -> mono conversion. It
- skips the starbase bitmap conversion. If you are playing with bitmaps
- in any way, pbmplus is a must!
-
- Pbmplus is available at a ftp site near you, and compilation on hpux is
- not difficult. Contact me if you need assistance.
-
- John Milburn - Pohang Accelerator Laboratory
- Pohang Institute of Science and Technology (POSTECH)
- Pohang, Korea Fax: 011-82-562-79-4499
- milburn@vision.postech.ac.kr
-