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

Free Support Forum - aspose.com

BarCoderReader takes too long, to scan 8 MB image


we’re having problems with BarCodeReader on some files.
My code as it follows:

BarCodeReader bralnik = new BarCodeReader(stream);
bralnik.StripFNC = true;
while (bralnik.Read()) //this takes 5 minutes to scan on certain files


I also don’t understand, what exactly timeout property on reader does.
If I set it to 400 (I suppose those are milliseconds) it quits imediatelly, but if I set it to 500, it takes forever.
I tried the new DLL version 17.8 and it does the same as 7.9.

Thank you for reply,


Please share the complete code snippet and the sample input file with us. We will evaluate it at our end and update you about our findings.

Hi, I’m posting the image file.

Prepoznava-edit.jpg (1.6 MB)


We have tested the code snippet with the latest version of Aspose.BarCode. The timeout property is working fine. However, we have look into the shared image. The image contains no barcode data.


yes, image has no bar code but it still must be scanned in the proccess.
What timeout have you applied ? If I set value to 5000 (units are in milliseconds I suppose), it wont quit after five seconds but it goes on and on… Try changing timeout and you will see. If I set timeout above 500 ms, it wont quit instantly as it should.

I was also testing it with latest version 17.8.


We have tested with both Timeout = 500 and Timeout = 400 setting. Both are working fine. The recognition process exits on it timeout.

I’m sending you my example code with temp licence 17.8… Please test with the image I have posted here.
Does your while loop end in 0,5 seconds ? Mine does end after 4 or 5 minutes.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.BarCode;
using Aspose.BarCode.BarCodeRecognition;

namespace AsposeTester
class Program
static void Main(string[] args)
License lic = new License();
if (!(lic.IsLicensed))
BarCodeReader bralnik = new BarCodeReader(“e:\Prepoznava-edit.png”);
bralnik.StripFNC = true;
bralnik.Timeout = 500;
//nastavitev kateri tip kode se išče
while (bralnik.Read())
//do something
string a = “OK”;




Thank you for sharing sample code snippet. We have evaluated this code. It took 759 milli seconds to complete the execution. Test project that we had created is attached for your reference.

Furthermore ‘Aspose.BarCode.BarCodeRecognition.BarCodeReadType’ enum is obsolete now. You may use DecodeType to get more symbologies. Similarly, the function


is deprecated, you may use SetBarCodeReadType(BaseDecodeType type) instead.

test.console.barcode_17_8.zip (15.6 KB)

I noticed you are testing it on JPEG image which is only 1.6 MB long. The JPEG really takes only 760 ms. The PNG file takes 298636 ms.
Then I realized that the image I’ve uploaded here was transformed from 7.7 MB png to 1.6 MB jpeg.

And I see you have limit to file size. I’ll try to upload chunks. Prepoznava-edit001.zip (1.4 MB)
Prepoznava-edit002.zip (1.4 MB)
Prepoznava-edit003.zip (1.4 MB)
Prepoznava-edit004.zip (1.4 MB)
Prepoznava-edit005.zip (1.4 MB)
Prepoznava-edit006.zip (760.2 KB)

Just rename files to replacing indexes as an extension (example: Prepoznava-edit.zip.001)


Please upload the required file to Dropbox or google drive and share the link in your post. We will download it and evaluate it. It seems that there is some issue with the image chunks.

Ok, here’s the link: https://www.dropbox.com/s/c7u3rdok1upbjze/Prepoznava-edit.png?dl=1

The image chunks should work too, I downloaded them myself, renamed and extracted with 7-zip successfully.


We have evaluated the sample image (Prepoznava-edit.png). The program took 539 milli seconds to complete the execution. We have used the same sample project that was shared in my previous post. Screenshot of the program and output screen is attached for your kind reference.
163203.jpg (96.3 KB)

I don’t understand, if you tested on 7.7 MB image from my dropbox image, how can there be so different result ?

aspose.png (42.7 KB)


Yes, we have tested the scenario with the sample 7.7 MB image shared by you. Following are the details of test machine:

64 bit windows 10
Aspose.BarCode 7.8
2.6 GHz processor

Mine is:
Windows 8.1 pro 64 bit
Intel Core i3-2100 @ 3.1 GHz

What else could cause this ? I’m using 17.8 dll with temp lic.


Temp license should not create any issue. The issue has been discussed with the product team. They are looking into it. We will update you about their findings in this forum thread.

Yes please.
Let me know what can be done.
Thank you,


The issue has been logged into our system with ID BARCODENET-36680. We’ll update you here once there is some information available in this regard.


is there any news about this thread ?


We have asked our product team about updates. We will share it with you as soon as any information is available.