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/
_______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff