Time to scan

What is the average time - in milliseconds - for the library to give scanned value against a single barcode

@hussainahmadkhan,

Thanks for your query.

Aspose.BarCode scans barcodes efficiently. The time cost totally depends upon the barcode itself, its type and complexity and quality of the image. Please try using the API and in case you find any issue (regarding performance), share your sample code and barcode image. We will check your issue and assist you to figure out your issue soon.

Thanks Amjad,

Please see the attached image; it is taking 6 seconds for this. Below are the settings.

BarCodeReader reader = new BarCodeReader(bitmap,DecodeType.AllSupportedTypes);
reader.QualitySettings = QualitySettings.NormalQuality;

We are using Bitmap
7_29_2022 5-28-27 PM.jpg (165.4 KB)

@hussainahmadkhan,

Thanks for the barcode image.

This is understandable and expected, since you are using DecodeType.AllSupportedTypes with QualitySettings.NormalQuality, so it tries to scan/match for all possible barcode types which might take a bit more time.

But if you are sure about the barcode type in the image, you may try using the following lines of code, it will scan the barcode quickly and efficiently.
e.g.
Sample code:

            var bmp1 = new Bitmap("e:\\test2\\7_29_2022 5-28-27 PM.jpg");
            using (Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(bmp1, Aspose.BarCode.BarCodeRecognition.DecodeType.UPCA))
            {
                reader.QualitySettings = Aspose.BarCode.BarCodeRecognition.QualitySettings.HighPerformance;
                Console.WriteLine(reader.ReadBarCodes().Length);

                foreach (Aspose.BarCode.BarCodeRecognition.BarCodeResult result in reader.ReadBarCodes())
                {
                    // Read symbology type and code text
                    Console.WriteLine("Symbology Type: " + result.CodeType);
                    Console.WriteLine("CodeText: " + result.CodeText);
                }
            }

Thanks Amjad,

reason for setting it to DecodeType.AllSupportedTypes is that user can scan any type of barcode; hence this setting.

Any better settings - keeping in mind our usecase that you can suggest?

@hussainahmadkhan,

We will check if we could devise some settings/code segment to minimize the time cost further.

By the way, could you try with following settings if it makes any difference.

BarCodeReader reader = new BarCodeReader(bitmap,DecodeType.AllSupportedTypes);
reader.QualitySettings = QualitySettings.HighPerformance;