This project has moved and is read-only. For the latest updates, please go here.

Not able to decode this image

Oct 16, 2013 at 4:27 PM
Edited Oct 16, 2013 at 5:16 PM
Not able to decode this image...

scanned image
BarcodeReader reader = new BarcodeReader();
Result result = reader.Decode((Bitmap)Imaging.FromFile("c:\\oldscanner.png"));
I've tried blurring, smoothing, shrinking (which all fill in the white pixels pretty good) you name it with and cannot get the combo that works. It is 96 DPI and binarized image from our scanner. Any pointers as to what is going on here?

Oct 17, 2013 at 7:55 PM
The problem are the many white pixels within the black area of the qr code.
If you resize the image to 30 percent of the original size than the decoding is successful.

Don't use a pre-binarized, b&w image. Use a grayscale image instead. zxing will use a binarizer
which works better with the decoding process.