-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QR code image coule not be decode #13
Comments
Hi, thanks for the report. I reproduce the issue with the two files. I have create PR #14 to investigate the issues. For the first file, I believe that the problem is due to the gray scale conversion which in this case set the background to black (setting the background color to white resolve the issue, see the |
Thank you solve the first one. |
When adding a black border of 5px around the QR Code, the code is correctly decoded. But when adding a white border even a 1000px one, the code can not be read... This is surprising ! It's seem to be a bug or misusage of the Zbar library, but I have not find anything relative to this issue in the documentation or in the bug tracker. Unfortunately it's seem that there are not activity on the Zbar library since October 2012 (5 years ago). This bug is beyond my expertise, I sorry that I can not help you more. |
What about the forks? |
System:
Ubuntu 16.04.3 LTS
Python:
Python 3.5.2
zbarlight==1.2
Pillow==4.2.1
lib:
libzbar-dev/xenial,now 0.10+doc-10ubuntu1 amd64 [installed]
libzbar0/xenial,now 0.10+doc-10ubuntu1 amd64 [installed]
First:
I meet a strange image coule not be decoded.
But i use telegram to send this image ,and use my bot to get it .It convert to jpeg by the telegram client and it could be decode success.
So I try to convert the raw png to jpeg by image.convert('RGB'), but this jpeg image fail decode .
The raw png image file: (failed decode)
Convert by telegram Android client jpg file:(success decode)
Second:
I also found a image decode failed without any process, but after i use image.thumbnail() it could be decode success.
Part of my code:
The text was updated successfully, but these errors were encountered: