We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com


I have adopted old code which makes use of Aspose.BarCode. I had to install the most recent version of BarCode since the resourse was not loaded properly when I imported my project. The original code makes use of the .ManualHints method of the BarCodeReader class. It looks like this method is no longer supported. Was it replaced with a different method or should I just remove the code?

This is what the code looks like:

    static void ReadBarcode(string target_jpg, ref string barcode)
        using (BarCodeReader reader = new BarCodeReader(target_jpg, DecodeType.Code39Standard))
            reader.QualitySettings = QualitySettings.HighPerformance;
            reader.ManualHints = ManualHint.MedianSmoothing;

            while (reader.Read())
                barcode = reader.GetCodeText();

Also, I assume I should be replacing the while loop with a foreach loop. I can replace the barcode assignment with barcode = somevariable.CodeText but what would I do with the reader.GetRegion() code?



Yes, the API was removed sometimes ago, you may just remove the relevant line(s) in your code.

Yes, you may use foreach loop while using the latest APIs set. See the document with example code on how to get details about barcode placement region and orientation angle from the image for your reference.

Moreover, we recommend you browse/check the Aspose.BarCode for .NET Docs (with up-to-date examples), API Reference Pages and Github examples for your complete reference.

You can use QualitySettings.AllowMedianSmoothing and QualitySettings.MedianSmoothingWindowSize.