![]() |
QS-Barcode SDK Falsche Parameter
Moin,
momentan versuche ich mich an der Barcode Erkennung. Dafür benutze ich die ![]() Das ist der Code:
Code:
Der Fehlercode ist Barcode wrong parameters. Vielleicht habt ihr ja eine Idee, was ich falsch mache :)
procedure TForm1.Button2Click(Sender: TObject);
var isExecuted : Boolean; FileName : String; iResults : Integer; Barcode : BarCode2; pBarcode : PBarCode2; BarcodeResult : BarcodeResult2; pBarcodeResult : PBarcodeResult2; AM : AdvancedMode; pAM : PAdvancedMode; nRet : Integer; //szVersion: array [0..10] of Char; szVersion : arVersion; begin // Folgende Einstellungen hat der bcTester fuer den Aztec Code: // Type : Aztec Code (iBC_Type = BC_AZTEC) // Laenge : 1 (1BC_Length = 1) // Prüfsumme : None (iBC_Checksum = BC_CHECKNONE) // Barcodeverdacht melden (Existenzpruefung) : TRUE (iBC_Checksum = BC_EXISTENCE) // Anzahl : MULTI (iBC_ReadMultiple = BC_MULTI) // Rotation : 0,90,180,270 (iBC_Orientation = BC_0, BC_90, BC_180, BC_270 // Maximale Verdrehung : 8 (iBC_Orientation = BC_SKREW_LIGHT // Open the File isExecuted := FileOpenDialog1.Execute; if isExecuted then begin FileName := FileOpenDialog1.FileName; try // Fill Barcode-Structure with suitable values. BEGIN Barcode.iBC_Type := BC_AZTEC; Barcode.iBC_Length := 0; Barcode.iBC_Checksum := BC_CHECKNONE; Barcode.iBC_Checksum := BC_EXISTENCE; // Existenzpruefung Barcode.iBC_ReadMultiple := BC_MULTI; Barcode.iBC_Orientation := BC_0 or BC_90 or BC_180 or BC_270; Barcode.iBC_Orientation := BC_SKEW_LIGHT; Barcode.iBC_ScanDistBarcode := BC_SCANDISTBAR; // Scanabstand Barcode.iBC_ScanDistance := BC_SCANDISTANCE; // Suchabstand // Fill Barcode-Structure with suitable values. END // Advanced Search Settings BEGIN AM.AdvancedSearch := 1; AM.DynamicThreshold := 1; AM.iBC_Threshold := 0; AM.iBC_RemovePixel := 0; AM.iBC_LightMargin1 := 30; AM.iBC_LightMargin2 := 0; AM.iBC_LightMargin3 := 0; AM.iBC_ScanDIstance2 := 0; AM.iBC_ScanDistBarcode2 := 0; // Advanced Search Settings End pAM := addr(AM); pBarcode := addr(Barcode); QSVersion(szVersion); // now start to search nRet := QSReadBarcode5(PAnsiChar(FileName), pBarcode, iResults, '','', pAM); if nRet = BC_OK then begin // give out the results while QSGetNextBarResult2(pBarcodeResult) <> BC_NO_BARCODE do MessageDlg('Barcode Found:' + BarcodeResult.szBC_Barcode, mtWarning, [mbOK], 0); QSFreeBarResult2; end finally // Free Objects end; end; end; Grüße JeHo |
AW: QS-Barcode SDK Falsche Parameter
Ohne jetzt irgendwelche Ahnung davon zu haben, fällt mir auf:
- Oben in den Kommentaren steht
Code:
Unten im Code jedoch
// Laenge : 1 (1BC_Length = 1)
Code:
- Oben:
1BC_Length = 0
Code:
Unten:
// Maximale Verdrehung : 8 (iBC_Orientation = BC_SKREW_LIGHT
Code:
Vielleicht ists ja nur ein Tippfehler und das hilft dir trotzdem weiter. Ansonsten lass ich mal die Experten vor ;)
Barcode.iBC_Orientation := BC_SKEW_LIGHT;
|
AW: QS-Barcode SDK Falsche Parameter
Hmm..
Delphi-Quellcode:
müsste dass nicht so sein:
Barcode.iBC_Type := BC_AZTEC;
Barcode.iBC_Length := 0; Barcode.iBC_Checksum := BC_CHECKNONE; Barcode.iBC_Checksum := BC_EXISTENCE; // Existenzpruefung Barcode.iBC_ReadMultiple := BC_MULTI; Barcode.iBC_Orientation := BC_0 or BC_90 or BC_180 or BC_270; Barcode.iBC_Orientation := BC_SKEW_LIGHT; Barcode.iBC_ScanDistBarcode := BC_SCANDISTBAR; // Scanabstand Barcode.iBC_ScanDistance := BC_SCANDISTANCE; // Suchabstand
Delphi-Quellcode:
Ansonsten überschreibst Du doch z.B. bei Barcode.iBC_Checksum das BC_CHECKNONE mit BC_EXISTENCE.
Barcode.iBC_Type := BC_AZTEC;
Barcode.iBC_Length := 0; Barcode.iBC_Checksum := BC_CHECKNONE or BC_EXISTENCE; Barcode.iBC_ReadMultiple := BC_MULTI; Barcode.iBC_Orientation := BC_0 or BC_90 or BC_180 or BC_270 or BC_SKEW_LIGHT; Barcode.iBC_ScanDistBarcode := BC_SCANDISTBAR; // Scanabstand Barcode.iBC_ScanDistance := BC_SCANDISTANCE; // Suchabstand Eine Typ-Variable kann nochmalerweise nur einen Wert haben ;) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:42 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz