I can't scan barcode from my images with different DPI.

back to home  >  Tech FAQ  >  Scan barcode from all kinds of dpi image in C# .NET project


Hi,support, I need recognize a lot of barcode image files which uploaded by the customers. But there is a problem, these barcode images are taken by different people with different resolution, some images are in high resolution, but some are very low. Now I can't read the barcode out from the low ones in my C# project, any suggestion?

---- Neil


Hi, Neil.

According to the barcode reading standard, it's need the barcode image clear enough to recognize the bar and the space. But how is considered to the clear enough? It's hard to say. Many factors will impact the reading result, such as image size, image color and background color, image dpi, barcode reader software sensitivity and precision.

Plainly, we can make a judgment by our eyes. It may not need a too high dpi, usually the 72 dpi image can be very clear. If we find the barcode image with pixel picot edge or some blur, it can't be decoded in the most time. Please look at this barcode picture:

It's blurred obviously, and out .net barcode reader control can't scan the barcode in it.

So if you want to scan your barcode image 100% successfully, the picture need look like the follow one.

In the end, we still post some C# sample code for you.

Bitmap image = Bitmap.FromFile("barcode-image.jpg");

BarcodeResult[] results = BarCodeScanner.Scan(image);


Hope the C# code can be helpful.

---- pqScan Support Team

Online Demo Download Trial Can I Read Barcode in PDF document using C#? Need help for reading barcode with unconventional position? How to read barcode from Microsoft Office? Can I read barcode image from report in C# .NET? Can I read color barcode image in C# .NET? Is it available for reading all of the barcode in a picture by one time? How to scan barcode from webcam or other device? Can I use your barcode reading SDK in Mono? I can't scan barcode from my images with different DPI. How to scan barcode in asp.net web application? How to scan barcode in WPF project using C# language? Can I run your .net barcode reader library in Windows7 or Windows8? How to scan rotated barcode in .net project?