'bad magic number' update

jim barchuk (jbarchuk@worldnet.att.net)
Tue, 9 Sep 1997 17:21:49 -0500

Hello All!

> Using HP Scanjet 5p, RedHat 4.2, distribution 2.0.30 kernel on
> PPRO/200.

Installed sane 0.63.

> -Was- using RH 4.0. At that time everything installed smoothly and
> worked perfectly as soon as I figured out /dev/sgb. :)
>
> -Now-, under 4.2, all pnmto??? utils fail with:
>
> pnmtotiff: bad magic number - not a ppm, pgm, or pbm file

Okee doke, found a clue. I see:

http://glacier.unl.edu/~samal/class/DIST/lectures/pgm.html

This info is pgm-specific but I guessed it couldn't be too far off
the mark of other p?? formats.

The first two lines of the file that scanimage produces seem to be
the x and y dimensions of the area scanned, usually looks like:

0.1
0.1
P6
# SANE data follows
60 60
255
normal-looking-data...

When I remove those two leading lines pnmto???? works perfectly.

Any ideas what I could be doing wrong to cause these x/y lines to
be inserted?

Or is scanimage creating some other file type that I should be using
other converters?

Have a :) day!

jim barchuk
mailto:jbarchuk@worldnet.att.net
http://www.10mb.com/jbarchuk/
http://www.thesurvey.com

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com