I have added the Zxing.Net from NuGet Package Manager in VS 2015. I tried the following code for decoding a CODE_128
barcode. But its giving null as result.
The same image is getting decoded successfully in almost all the online barcode reading websites including Zxing Online Decoder.
using System;
using System.Drawing;
using ZXing.QrCode;
using ZXing.QrCode.Internal;
public string barcode_scan()
{
string qr = @"C:\Users\Admin\Desktop\barcode.jpg";
ZXing.BarcodeReader reader = new ZXing.BarcodeReader();
var result = reader.Decode((Bitmap)Bitmap.FromFile(qr));
return result;
}
I'm not able to make out where I'm going wrong.
Edit: Image Attached Image with barcode