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,
string filePath = @“C:\temp\12564_GLD1757.jpg”;<o:p></o:p>
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();