Support Center

Reading Barcodes

Steve Fowler Apr 01, 2015 12:13PM EDT

Barcode Decoder is not always reading barcodes, even though the old software we used to use handle it correctly (DTK)

Below is a snippet of code, we can supply the failed image if required.

Dim result as String
Dim decoder As New DTI.ImageMan.Barcode.BarcodeDecoder()
Dim barcode As Barcode.Result

barcode = decoder.Decode(viewer1.Images.CurrentImage, PossibleFormats())
result = barcode.Text
End Try

We have even tried using it with DecodingOptions, snippet of code below

Dim lSource As LuminanceSource = New RGBLuminanceSource(AxImageViewer1.Images.CurrentImage, AxImageViewer1.Images.CurrentImage.Width, AxImageViewer1.Images.CurrentImage.Height)

Dim image As New BinaryBitmap(New DTI.ImageMan.Barcode.Common.HybridBinarizer(lSource))

Dim decodingOptions As New System.Collections.Generic.Dictionary(Of DecodeOptions, Object)
decodingOptions.Add(DecodeOptions.TryHarder, True)
decodingOptions.Add(DecodeOptions.PossibleFormats, PossibleFormats())

Dim instance As New Barcode.OneD.BarcodeOneDDecoder(decodingOptions)
Dim barcode As Barcode.Result = instance.Decode(image)
result = barcode.Text
End Try

Is there anything we are doing wrong?


1 Data Techniques Response

Up 1 Rated Down
DTI Support  Data Techniques Employee Apr 01, 2015 12:22PM EDT


That looks OK. Can you please email us one or more images that you are having issues with so we can see whats happening ? Send them to us at

Thanks for your interest in our products and please let us know if you have any questions.

Data Techniques Support

This question is closed to new answers.

Contact Us