groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Graphics


From: Daniel Senderowicz
Subject: Re: [Groff] Graphics
Date: Thu, 14 Nov 2002 18:33:55 -0800 (PST)

>Is there a way to insert a bmp or pcx graphics into a .ps document with groff?

You can convert from bmp to ppm (bmptoppm), downgrade that to pbm
and then use pbmtoplot. Finally you use plot2dev to generate a
gremlin file that you can include with the grn preprocessor. In
other words you do (look at the PBMPLUS man pages):

bmptoppm <yourfilename.here> | ppmtopgm | pgmtopbm | pbmtoplot | \
plot2dev -d gremlin -m 1 > <yourgremlinfile.here>

similar thing with pcx:

pcxtoppm <yourfilename.here> | ppmtopgm | pgmtopbm | pbmtoplot | \
plot2dev -d gremlin -m 1 > <yourgremlinfile.here>

The colors or shades of gray in your original bmp or pcx files will
be approximated by discrete lines in your plot file by pbmplus, so
they won't look very good. You will have to experiment with the
line thickness in the .GS <-> .GE macro calls. But if your originals
are lineart such as function plots or schematics then you're ok.

Hope this helps. Cheers,

Dan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]