|
From: | David Griffiths |
Subject: | Re: [Groff] Using pic/groff/gs to produce gif/jpeg |
Date: | Wed, 11 May 2005 15:47:22 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
Ah, using pnmraw instead of pnm makes everything 2-3 times faster!That brings the pnm approach down to only twice the time of my final direct to jpeg approach which I guess I can live with. I know it's nice and flexi but it still seems overkill passing round these raw bitmaps from command to command.
Thanks for the pointer. Dave Ralph Corderoy wrote:
Hi Larry,I've never found a good way to script this. The process I use is to open the postscript file with gimp, crop and save. It would be very pleasant to have a way to quickly generate high quality cropped images from groff. If anyone knows how to do that I'd like to know too.For troff.org, where I want the images to be generated from the given troff source, I use groff "$@" | gs -q -r144 \ -sDEVICE=pnmraw -sPAPERSIZE=a4 -sOutputFile=- \ -dTextAlphaBits=4 -dGraphicsAlphaBits=4 - | pnmcrop -quiet | pnmmargin -white 10 | pnmtopng -quiet -interlace -compression 9 netpbm does the hard work with pnmcrop and pnmmargin. Cheers, Ralph.
-- http://w3.hursley.ibm.com/~dgriff/
[Prev in Thread] | Current Thread | [Next in Thread] |