SetHints - ScanStrengthHints.Strong option obsolete


I'm now evaluating the latest version of Aspose.BarCode library, came across an issue with SetHints method. This method is now obsolete, am wondering how to rewrite the code to get the same (or at least the closest) behaviour as the original one.

original code (using older version of BarCode lib), VB.NET:
rd.SetHints(RecognitionHints.ImageBinarizationHints.MedianSmoothing Or
RecognitionHints.ImageBinarizationHints.Grayscale Or

new code:
rd.ImageBinarizationHints = RecognitionHints.ImageBinarization.MedianSmoothing Or

Is that correct? How to set the RecognitionHints.ScanStrengthHints.Strong option in the new version? Have not found anything that looks like that neither via VS intellisense nor in documentation...



Hi Jiri,

Thanks for your inquiry. It is to update you that the RecognitionHints.ScanStrengthHints enum has been obsoleted. So there is no alternative. First, please try a simple source code e.g.

Dim reader As BarCodeReader

reader = New BarCodeReader("C:\SamplePic\128.jpg", BarCodeReadType.Code128)

'target barcode is Code128 or EAN128 types of barcode

Do While reader.Read()

Console.Write("Code Text: " & reader.GetCodeText())

Console.Write("Symbology Type: " & reader.GetReadType().ToString())



If it does not help then you can apply image processing techniques like MedianSmoothing removes the noise from the image while preserving the image edges. Please visit the documentation link below:

It also contains the support to rotate the barcode image manually and then perform the recognition. It is recommended to apply appropriate symbology and Orientation.

Aspose Documentation

Read Barcode Properties and Metadata

This article describes how to read barcode parameters and encoded metadata

Please let us know in case of further assistance and comments.