PHPまたはBASHファイルを使用してスキャナーから画像を取得して処理できますか?はいの場合、どうすればよいですか?
3733 次
2 に答える
2
scanadf
SANE プロジェクトの を使用して、コマンド ラインからスキャナを駆動できます。利用可能なオプションについては、man ページを参照してください。
于 2012-12-29T17:11:52.283 に答える
0
Thomasが述べたように、SANE PROJECTscanimage
を使用すると、いくつかのパラメーターを指定して呼び出すことで、コマンド ラインをスキャンできます。
ドキュメントをスキャンして特定の場所に移動するという目標を達成するには:
<?php
$mode = 'gray';
$reso = 150;
$path = '/my/document/path/myFile.jpg';
/* scan the document in Gray Scale, with 150dpi of resolution
* pipe a call to convert the resulting document to a JPEG
* save the document to your desired location
*/
exec("scanimage --mode ".$mode." --resolution ".$reso." | pnmtojpeg > ".path);
// check if the document exists...
// save the contents of $path to the database...
?>
于 2013-08-14T23:28:53.877 に答える