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

Problem scanning certain Code 128 barcodes

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

Here is an example of an image that I cannot get to scan:

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

Has anyone else seen anything similar?

This is the image I have been testing with
The WindowsFormsDemo will read most of them but has an issue with the barcodes I mentioned above.
Apr 15, 2014 at 7: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.