scanimage が破損したイメージを返します。

scanimage が破損したイメージを返します。

Raspberry Pi(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

ベストアンサー1

おすすめ記事