DataMatrix barcodes recognition object
VB Example (Visual Basic) | Copy Code |
---|---|
Public Function T_DataMatrixone(ByRef Ci As CiServer, sFileName) Dim Bc As CiDataMatrix: Set Bc = Ci.CreateDataMatrix ' Open image from file Bc.Image.Open sFileName ' Configure barcode Bc.Algorithm = cibBestSpeed Bc.Directions = cibHorz ' Read barcode Dim Barcode As CiBarcode Set Barcode = Bc.FirstBarcode ' Process barcode If (Not Barcode Is Nothing) Then T_DisplayBarcode Barcode End Function Public Function T_DataMatrixall(ByRef Ci As CiServer, sFileName) Dim Bc As CiDataMatrix: Set Bc = Ci.CreateDataMatrix ' Open image from file Bc.Image.Open sFileName ' Configure barcode Bc.Algorithm = cibBestRecognition Bc.Directions = cibHorz Or cibVert Or cibDiag ' Read barcode Dim Barcode As CiBarcode Bc.Find 0 For Each Barcode In Bc.Barcodes ' Process barcode T_DisplayBarcode Barcode Next End Function |