[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] ps: import of an EPS file with binary data
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] ps: import of an EPS file with binary data |
Date: |
Fri, 6 Jul 2012 11:34:36 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> > The above gs commandline works on other images I've tried,
> > but when I run it on the set at hand, I get a "MAXVAL not
> > 255" error.
>
> Take your PBM files and produce a 255-maxval PPM that
> ppmtops.ps demands
Sorry, no, I advise against that. The "ppmtops.ps" I posted
I had just put together on the spur of the moment, and it
wasn't intended to be very general or forgiving of errors.
In particular it was only meant for maxval-255 pixmaps.
Of course the unspoken implication was that it could be adapted
to bilevel (1 bit per pixel) bitmap images, as you said you were
using. (But it should have given you a "Not a raw PPM" error,
because raw PBMs have a magic number of "P4" instead of "P6").
Anyhow, here goes:
convert solarwind.pbm solarwind.eps2
gs -q -dNODISPLAY -dBATCH -dNOPAUSE pbmtops.ps <solarwind.pbm >solarwind.ps
821460 solarwind.pbm
247424 solarwind.eps2
86934 solarwind.ps
The image is a black-and-white scan from a book, and the
"flate" algorithm compresses it much better than either the
"runlength" algorithm (which "convert" uses here for eps2
output) or the "CCITT fax" algorithm.
pbmtops.ps
Description: PostScript document
Re: [Groff] ps: import of an EPS file with binary data, Holger Herrlich, 2012/07/07