![scanimage 返回损坏的图像](https://linux22.com/image/181725/scanimage%20%E8%BF%94%E5%9B%9E%E6%8D%9F%E5%9D%8F%E7%9A%84%E5%9B%BE%E5%83%8F.png)
我想使用树莓派(Debian)作为扫描服务器。为了这项工作,我安装了 SANE 和 ImageMagick。
如果我用... Bash 扫描:
scanimage -p --resolution=25 --mode=Color -l 0 -t 0 -x 210mm -y 297mm >test.pnm
...我将得到一个不可读的 pnm 文件。 (https://mega.nz/file/c15GmKKZ#_S7Ygiymoid38F2mv_StgEo_9m_8lgnw133GFNrPRUI)
根据标题,我发现该文件比应有的小,我尝试用...修复此问题
dd if=/dev/zero bs=40000 count=1 >> test.pnm
现在我有一个 pnm 文件,我可以使用... Bash 将其转换为图像:
convert test.pnm test.jpg
有人知道如何解决这个问题吗?
可能“scanimage -T”的结果也很有趣:
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