[GB.SCANNER]
* BUG: All parameters sended to scanimage are quoted now, if they are text. git-svn-id: svn://localhost/gambas/trunk@6760 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
23179c7340
commit
97465d098a
2 changed files with 5 additions and 4 deletions
|
@ -7,6 +7,7 @@ Dim hImg As Image
|
||||||
|
|
||||||
'Dim hscan As New Scanner("hpaio:/net/HP_LaserJet_M1536dnf_MFP?ip=192.168.1.25")
|
'Dim hscan As New Scanner("hpaio:/net/HP_LaserJet_M1536dnf_MFP?ip=192.168.1.25")
|
||||||
Dim hscan As New Scanner("v4l:/dev/video0")
|
Dim hscan As New Scanner("v4l:/dev/video0")
|
||||||
|
hscan.Debug = True
|
||||||
hScan["Mode"].Value = "color"
|
hScan["Mode"].Value = "color"
|
||||||
'hScan[" Resolution "].Value = 30
|
'hScan[" Resolution "].Value = 30
|
||||||
hScan!Width.Value = 2560
|
hScan!Width.Value = 2560
|
||||||
|
|
|
@ -38,7 +38,7 @@ Event Progress
|
||||||
|
|
||||||
Public Sub _New(sDevice As String)
|
Public Sub _New(sDevice As String)
|
||||||
|
|
||||||
$sDeviceName = "--device-name=" & sDevice
|
$sDeviceName = "--device-name='" & sDevice & "'"
|
||||||
$sName = sDevice
|
$sName = sDevice
|
||||||
If Not IsAvailable() Then
|
If Not IsAvailable() Then
|
||||||
Error.Raise("Unknown Device")
|
Error.Raise("Unknown Device")
|
||||||
|
@ -96,7 +96,7 @@ Private Sub GetOptions()
|
||||||
'$Options = New _Options
|
'$Options = New _Options
|
||||||
$aOptionsNames = New String[]
|
$aOptionsNames = New String[]
|
||||||
$aOptions = New _Option[]
|
$aOptions = New _Option[]
|
||||||
Exec ["scanimage", $sDeviceName, "-A"] To sRet
|
Shell "scanimage " & $sDeviceName & " -A" To sRet
|
||||||
'Return
|
'Return
|
||||||
For Each s In Split(sRet, "\n")
|
For Each s In Split(sRet, "\n")
|
||||||
s = Trim(s)
|
s = Trim(s)
|
||||||
|
@ -222,9 +222,9 @@ Public Function Scan() As Image
|
||||||
If hOption.Modified Then
|
If hOption.Modified Then
|
||||||
|
|
||||||
If hOption._Command Begins "--" Then
|
If hOption._Command Begins "--" Then
|
||||||
sOptions &= hOption._Command & "=" & hOption.Value & " "
|
sOptions &= hOption._Command & "=" & IIf(hOption.IsRange, hOption.Value, "'" & hOption.Value & "'") & " "
|
||||||
Else
|
Else
|
||||||
sOptions &= hOption._Command & " " & hOption.Value & " "
|
sOptions &= hOption._Command & " " & IIf(hOption.IsRange, hOption.Value, "'" & hOption.Value & "'") & " "
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
Endif
|
Endif
|
||||||
|
|
Loading…
Reference in a new issue