I’m trying to use the barcode reader to read various files in a directory and find the ones that have barcodes in it but it gets hung up on some files that don’t have barcodes and never comes back from the BarCodeReader.read call.
Here’s a file that it’s getting hung up on:http://www.goldinauctions.com/useruploads/upload17/12335_gld0456.jpg
Here’s the code that I’m using to read it:
using (BarCodeReader reader = new BarCodeReader(fi.Directory.FullName + @"" + fi.Name, BarCodeReadType.Code39Extended))
{
if (reader.Read())
{
Response.Write("Barcode Found: " + reader.GetCodeText() + “
”);
MyDebug.Add("Barcode Found: " + reader.GetCodeText());
int inventoryId = -1;
if (!Int32.TryParse(reader.GetCodeText(), out inventoryId))
Please let me know what I need to do. Thanks, Steve
Thank you. I tried the new library and it appears to be working. If I have any other issues I’ll let you know. I take it that my license from my previous version will work with this version as well…
Hi Steve,
We are now having an issue with this image. I am using 6.5.0 as suggested: http://www.goldinauctions.com/UserUploads/Upload19/12564_GLD1757.jpg
Thanks,
Steve
Hi Steve,
For us the application is getting hung up in the read method. We realize there is no barcode in the image but it doesn’t seem to ever stop trying to read it. What do you mean by execution mode?
Hi Steve,
Hi Steve,
Thank you for being patient. We have tested your sample image using the source code below:
[C#]
string filePath = @"C:\temp\12564_GLD1757.jpg";
BarCodeReader reader = new BarCodeReader(filePath, BarCodeReadType.Code39Extended);
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
while (reader.Read())
{
stopWatch.Stop();
Console.WriteLine("barcode has been detected");
}
Console.WriteLine("Time: " + stopWatch.ElapsedMilliseconds);
reader.Close();
Console.ReadKey();
Result(milliseconds):
debug mode:
Time: 1713
Exe mode:
Time: 1153
We have an exe file in Project/bin/release/Debug and it runs on a computer without Visual Studio. However, C#/VB express software must be installed in it. Please refer to the Microsoft help topic:
In case it does not help, then please also provide us other environment details where it fails, i.e. Operating System (edition, 32 or 64 bit, language), Visual Studio (edition, build id etc.). We need to be more specific. We’ll investigate this issue at our end and guide you accordingly.