Problem while decoding QRCode in small image size

Aug 31, 2012 at 11:14 AM

Hello team,

I want to show QRCode with exact size ex when I encode image using Version Number is 7 this as

var writer = new BarcodeWriter { Format = BarcodeFormat.QR_CODE, Renderer = new ZXing.Rendering.WriteableBitmapRenderer { Foreground = Colors.Black } };
WriteableBitmap wrb = writer.Write("zXing WinRT");
imgEncoderBarcode.Source = wrb;
imgEncoderBarcode.Height = wrb.PixelHeight;
imgEncoderBarcode.Width = wrb.PixelWidth;

 here wrb.PixelHeight and wrb.PixelWidth is 53*53. imgEncoderBarcode is my image contron in my xaml page I have sets its height and width.

I have displayed this WriteableBitmap image in same size and save on local drive.

For decoding I am using earlier version but its giving error

"Exception of type 'com.google.zxing.ReaderException' was thrown."

in qrcode\detector\Detector.cs  file sizeOfBlackWhiteBlackRun function.

 

Any idea why this ? Or am I wrong to implement ?

 

 

 


Coordinator
Aug 31, 2012 at 7:55 PM

I can not exactly imagine what you have done.

I tried to reproduce the steps like I did understand it:

* I generated a QR_CODE barcode with the contents "zXing WinRT" and a size of 53x53 (WinForms demo client)
* I tried to decode the generated barcode with the current version of ZXing.Net
Works like expected. No exception. If you have trouble with some barcode images please send me the image file which doesn't work.

On the other hand a class like com.google.zxing.ReaderException doesn't exist in ZXing.Net.
Please do not post errors which are related to other libraries or very old version of ZXing.Net.
If you want to know if the generated barcode image is correct you can use different online decoders like http://zxing.org/w/decode.jspx
If the barcode doesn't work with them then it is possible that the generator made something wrong.