[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Better Images for HTML.
From: |
Ralph Corderoy |
Subject: |
[Groff] Better Images for HTML. |
Date: |
Sun, 23 Dec 2001 18:17:16 +0000 |
Hi,
I was a bit disappointed in the quality of the images I was producing
for troff.org; the anti-aliasing I was doing using netpbm wasn't very
good.
I tried -Thtml but that seemed to be using a similar pipeline to me,
without the anti-aliasing step.
After a bit of digging into GhostScript I found it had options I hadn't
heard of before to do just what I wanted. Here's my grofftogif script
I'm using now.
#! /bin/sh
# this should produce png files but pnmtopng is broken on this system.
groff "$@" |
gs -q -r144 \
-sDEVICE=pnmraw -sPAPERSIZE=a4 -sOutputFile=- \
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 - |
pnmcrop -quiet |
pnmmargin -white 10 |
ppmtogif -quiet
Perhaps it would be worth -Thtml using the *AlphaBits options too?
Images produced like this can be seen at
http://www.inputplus.co.uk/troff/prog.html
(Thanks to all those that have sent suggestions for troff.org so far.
I'm working my way through them.)
Cheers,
Ralph.
- [Groff] Better Images for HTML.,
Ralph Corderoy <=