mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 11:35:54 +02:00
72 lines
3.8 KiB
Diff
72 lines
3.8 KiB
Diff
diff -Naur phpSANE_org/config.php phpSANE/config.php
|
|
--- phpSANE_org/config.php 2005-02-21 07:05:00.000000000 +0100
|
|
+++ phpSANE/config.php 2008-03-04 14:44:30.000000000 +0100
|
|
@@ -1,7 +1,7 @@
|
|
<?PHP
|
|
// CONFIG ------------------------------------------------------------------------------------
|
|
$SCANIMAGE="/usr/bin/scanimage"; // auch mit
|
|
-$PNMTOJPEG="/usr/bin/pnmtojpeg"; // eigenen
|
|
+$PNMTOJPEG="/usr/local/netpbm/bin/pnmtojpeg"; // eigenen
|
|
$OCR="/usr/bin/gocr"; // Parametern
|
|
|
|
//$SAVE_PLACE="/srv/www/htdocs/web/phpSANE/";
|
|
@@ -63,7 +63,7 @@
|
|
if($_GET['mode']) if($clear == 1) $mode="Color"; else $mode=$_GET['mode']; else $mode="Color";
|
|
if($_GET['resolution']) if($clear == 1) $resolution=100; else $resolution=$_GET['resolution']; else $resolution=100;
|
|
if($clear == 1) $negative="no"; else $negative=$_GET['negative'];
|
|
-if($clear == 1) $quality_cal= "yes"; else $quality_cal=$_GET['quality_cal'];
|
|
+if($clear == 1) $quality_cal= "no"; else $quality_cal=$_GET['quality_cal'];
|
|
if($clear == 1) $first="";
|
|
//if($_GET['depth']) $depth=$_GET['depth']; else $depth="8"; // wers braucht
|
|
//$brightness=$_GET['brightness']; // die werden von meinem scanner leider nicht unterstützt
|
|
diff -Naur phpSANE_org/menu.php phpSANE/menu.php
|
|
--- phpSANE_org/menu.php 2005-02-21 06:39:01.000000000 +0100
|
|
+++ phpSANE/menu.php 2008-03-04 15:03:12.000000000 +0100
|
|
@@ -74,7 +74,7 @@
|
|
echo "<option value=\"Gray\" $selected_2>".$lang[$lang_id][16]."\n";
|
|
echo "<option value=\"Lineart\" $selected_3>".$lang[$lang_id][17]."\n";
|
|
echo "</SELECT></td>\n";
|
|
-if(!$_GET['first']) { $first=1; $checked1="checked"; }
|
|
+//if(!$_GET['first']) { $first=1; $checked1="checked"; }
|
|
if($quality_cal=="yes") { $checked1="checked"; $first=1; } else { $checked=""; $first=1; }
|
|
echo "<input type=hidden name=\"first\" value=\"$first\">\n";
|
|
echo "<td align=\"right\" class=\"text_padd\">".$lang[$lang_id][21]." <INPUT type=\"checkbox\" name=\"quality_cal\" value=\"yes\" ".$checked1."></td>\n";
|
|
diff -Naur phpSANE_org/scan.php phpSANE/scan.php
|
|
--- phpSANE_org/scan.php 2005-02-21 07:06:19.000000000 +0100
|
|
+++ phpSANE/scan.php 2008-03-04 15:57:37.000000000 +0100
|
|
@@ -75,25 +75,25 @@
|
|
|
|
if($action == $lang[$lang_id][27]) {
|
|
if($format == "jpg") {
|
|
-$cmd_scan=$cmd_scan." | pnmtojpeg --quality=100 > ".$file_scan;
|
|
-$scan_yes=`$cmd_scan`;
|
|
-echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
|
|
-echo "window.open(\"save.php?file=".$file_scan."&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
|
|
-echo "</script>\n";
|
|
-} else {
|
|
+$cmd_scan=$cmd_scan." | $PNMTOJPEG --quality=100 > ".$file_scan;
|
|
+}
|
|
+if($format == "tif") {
|
|
+$cmd_scan=$cmd_scan." --format=tiff > ".$file_scan;
|
|
+}
|
|
+if($format == "pnm") {
|
|
$cmd_scan=$cmd_scan." > ".$file_scan;
|
|
+}
|
|
$scan_yes=`$cmd_scan`;
|
|
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
|
|
-echo "window.open(\"save.php?file=".$file_scan."%26lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
|
|
+echo "window.open(\"save.php?file=".$file_scan."&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=200,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
|
|
echo "</script>\n";
|
|
}
|
|
-}
|
|
|
|
if($action == $lang[$lang_id][26]) {
|
|
$cmd_scan=$cmd_scan." | ".$OCR." - > ".$file.".txt";
|
|
$scan_yes=`$cmd_scan`;
|
|
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
|
|
-echo "window.open(\"save.php?file=".$file.".txt%26lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
|
|
+echo "window.open(\"save.php?file=".$file.".txt&lang_id=".$lang_id."\",\"_blank\", \"width=400,height=100,left=320,top=200,scrollbars=no,location=no,status=no,menubar=no\");\n";
|
|
echo "</script>\n";
|
|
}
|
|
}
|