scanimage returns a broken image

domidodo

New Member
Joined
Oct 13, 2020
Messages
1
Reaction score
0
Credits
15
Hi,
i want to use a raspberry pi (Debian) as scan-Server.
For this job I installed SANE and ImageMagick.

If I scan with ...
Bash:
scanimage -p --resolution=25 --mode=Color -l 0 -t 0 -x 210mm -y 297mm >test.pnm
... I will get an unreadable pnm-file. (In the attachments)

Based on the header, I found out that the file is smaller than it should be and I tried to fix this with ...
Bash:
dd if=/dev/zero bs=40000 count=1 >> test.pnm

now I have a pnm-file which I can convert to an image with ...
Bash:
convert test.pnm test.jpg

The problem is that the result does not match the scanned document.
Here is the difference between is and should:
test.jpg


Does someone have any idea how to fix this?


---------------------
Possibly the the result of "scanimage -T" is interesting too:
Code:
scanimage: scanning image of size 637x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1911 bytes...  PASS
scanimage: reading one byte...          FAIL No data
scanimage: stepped read, 2 bytes...     FAIL No data
scanimage: stepped read, 4 bytes...     FAIL No data
scanimage: stepped read, 8 bytes...     FAIL No data
scanimage: stepped read, 16 bytes...    FAIL No data
scanimage: stepped read, 32 bytes...    FAIL No data
scanimage: stepped read, 64 bytes...    FAIL No data
scanimage: stepped read, 128 bytes...   FAIL No data
scanimage: stepped read, 256 bytes...   FAIL No data
scanimage: stepped read, 512 bytes...   FAIL No data
scanimage: stepped read, 1024 bytes...  FAIL No data
scanimage: stepped read, 2048 bytes...  PASS
scanimage: stepped read, 2047 bytes...  PASS
scanimage: stepped read, 1023 bytes...  FAIL No data
scanimage: stepped read, 511 bytes...   FAIL No data
scanimage: stepped read, 255 bytes...   FAIL No data
scanimage: stepped read, 127 bytes...   FAIL No data
scanimage: stepped read, 63 bytes...    FAIL No data
scanimage: stepped read, 31 bytes...    FAIL No data
scanimage: stepped read, 15 bytes...    FAIL No data
scanimage: stepped read, 7 bytes...     FAIL No data
scanimage: stepped read, 3 bytes...     FAIL No data
 

Attachments

  • test.pnm.zip
    1.2 MB · Views: 532
Last edited:


G'day @domidodo and welcome :)

I am moving this Thread to Single Board Computers where it may gain better viewing and help.

Good luck

Chris Turner
wizardfromoz
 

Staff online


Top