www-frontend, pbm conversion
Marco Zietz (camro@t-online.de)
Thu, 08 Apr 1999 20:11:19 +0200
Gert Doering schrieb:
> Hi,
>
> On Wed, Apr 07, 1999 at 10:28:00PM +0200, Marco Zietz wrote:
> > I am trying to setup the www-frontend inlcuded in mgetty-1.1.20. I have
> > some problems with the netpbm-tools (release 7, dec 1993) came with my
> > suse5.3. Mgetty itself is working fine. But if I want to view a fax with
> > scaling I only get an empty gif-file in the webtmp-dir. I found out,
> > that the pnmscale (promoting PBM to PGM!!) outputfile is P5, but all
> > other programs involved in this conversion need P2 files!
>
> P5 should be fine (that's just "greyscale").
>
> What happens if you run the commands specified in wwwgui.cf by hand, one
> after each other, on the files (from the command line)? That is:
>
> $g3topbm <file.g3 >outfile1.pbm
> $pnmscale -xscale 0.1 -yscale 0.1 <outfile1.pbm >outfile2.pgm
> $ppmquant <outfile2.pgm >outfile3.pgm
> $ppmtogif <outfile3.pgm >outfile4.gif
>
> I assume that it's failing in the ppmquant step - which program did you
> use for that?
>
> gert
Hello again!
Thanx Gert! Was a good hint! First I used your simplequant.pl amd it complained
about the P5-input. So I tried the others you suggested in wwwgui.conf (I changed
the path before! ;-)), but all didn't work.
Now I have written a small script for converting, yours as base, which does its
job well. The commands are:
g3topbm <file.g3 >outfile1.pbm
pnmscale -xscale 0.45 -yscale 0.45 <outfile1.pbm >outfile2.pgm
ppmquant 2 <outfile2.pgm >outfile3.pgm
ppmquant -map mapfile outfile3.pgm >outfile4.pgm
ppmtogif <outfile4.pgm >outfile5.gif
If you look to line 3 you can see the reason. ppmquant wants the number of colors
or a mapfile!
I also made a mapfile to get real black and white and not 2 grayscales.
This mapfile contains also just a few lines:
P3
2 1
255
0 0 0
255 255 255
Thats it. Now I'm trying to modify your nph-vf-gif.cgi. I'll mail or post you a
copy when finished.
Marco