I have created a Datamatrix decoder (in the code section below) but it fails to recognize a single barcode.
Am I doing something foolish? All I get is "No barcode detected!"
Source file is attached, plus a parsed out subimage which also fails with my code and the example barcode_recognition.exe
Thanks for your help,
Leo
Code: Select all
Dim ImageID As Integer
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
Dim oLicenseManager As New GdPicture.LicenseManager 'Go to http://evaluation-gdpicture.com
oLicenseManager.RegisterKEY("xxx")
ImageID = oGdPictureImaging.CreateGdPictureImageFromFile(datamatrixPath)
If ImageID <> 0 Then
If oGdPictureImaging.BarcodeDataMatrixReaderDoScan(ImageID) = GdPictureStatus.OK Then
Dim BarcodeCount As Integer = oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeCount()
If BarcodeCount > 0 Then
For i As Integer = 1 To BarcodeCount
node.GetProperties().Define("datamatrix_" & i, oGdPictureImaging.BarcodeDataMatrixReaderGetBarcodeValue(i))
Next
Else
node.GetProperties().Define("datamatrix", "No barcode detected!")
End If
oGdPictureImaging.BarcodeDataMatrixReaderClear()
End If
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If