This project has moved. For the latest updates, please go here.

Problem scanning certain Code 128 barcodes

Apr 12, 2014 at 10:25 PM
Edited Apr 13, 2014 at 12:39 AM
I am having issues scanning certain Code 128 barcodes.

Here is an example of an image that I cannot get to scan:
http://i.imgur.com/T4cqIaX.jpg?1

I have run that same image through other scanning tools to ensure the barcode works, any ideas on what might be happening?
Apr 12, 2014 at 11:08 PM
Edited Apr 13, 2014 at 1:18 AM
I went through and did some testing on various values. I found these values to be problematic:
"123456 78901"
"12345678901234"
"this is a test"
"abc def ghi jk"

Has anyone else seen anything similar?

This is the image I have been testing with http://i.imgur.com/mdGcLHe.jpg
The WindowsFormsDemo will read most of them but has an issue with the barcodes I mentioned above.
Coordinator
Apr 15, 2014 at 6:16 PM
It's because of the black rectangles around the barcode.
If you remove the left and the right border of the rectangle the barcodes can be successfully decoded.
The algorithm scans the border of the rectangle as a part of the barcode.
I have no idea at the moment how to fix that within zxing.
But you can workaround that issue if you use a bigger quiet zone, I think.