I'm having trouble scanning barcode 39, they are never detected. I made sure the size and resolution were more than sufficient and I tested multiple file formats to no avail…
In case my barcodes had something wrong, I even tried to scan the code 39 codes sample on Wikipedia: http://en.wikipedia.org/wiki/Code_39
But they can't be read either!
I must be doing something wrong? I tried using zbarimg and also python this way:
fname = 'Wiki262px-Code_3_of_9.svg.png'
img = Image.open(fname).convert('L')
width, height = img.size
scanner = zbar.ImageScanner()
zbar_img = zbar.Image(width, height, 'Y800', img.tostring())
# scan the image for barcodes
for symbol in zbar_img:
print "components: ", dir(symbol.components)
print "count: ", symbol.count
print "data: ", symbol.data
print "location: ", symbol.location
print "quality: ", symbol.quality
print "type: ", symbol.type
Any idea what might go wrong here? I'm using Ubuntu if it matters.
By setting the transparent background to white I managed to read the wikipedia example and a few more code39 example I could find…
However I still can read the barcode I want, see the link below, I was told its a Code39 . Any help would be appreciated.
I meet the similar issue. code39 cannot be read;
I looked at the link to bc.png. The characters are code-39, but it's missing the start & stop characters which renders the code meaningless.
@gaoyangm, if you have a sample image of the barcode you're trying to decode I can take a look at it.
And please create a new forum thread if it's a different image from tickon's.
have you tried this code 39 barcode reader?
Log in to post a comment.