-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
incorrect encoding for repeating 0 #4
Comments
Hello mutoo, thanks for the report. I'll try to find out what goes wrong, but I cannot promise anything. The last time I looked into the code I felt like somebody else has written it... |
You have used a function |
oh sorry, it's my typo. it should be |
OK, then I get the following error:
You don't get the same error? |
@pgundlach the pseudo-code above may not express my idea. could you try this one:
|
OK, I can produce a qr code now. |
Hi, Patrick, I spent some time to dig a little bit into the code with the help of this article: I found there are some issues within the The article doesn't mention how to deal with such a case, I may keep digging when I've got time. |
I have no idea what could be wrong. |
Hi Patrick, with the fix I had committed, the QRcode now works well:
Could you please review the pull request and let me know if I need to do anything. Thanks, |
* mutoo-issue/issue-4-leading-0s: fix #4 message with leading 0s encoding issue
Thank you very much! |
Hi Patrick, thanks for your great work on this project. I am using luaqrcode in my aseprite plugin to generate qrcode from pixel art.
But I found an issue when I try to generate a qrcode with a long repeating 0x00 (pixels with 0th palette) with
ec_level = M
, the decoder returns a lot of 1s among the 0s, which causing dirty dots when we decode the image from qrcode.Here is the code to replica the bug:
this code generates a qrcode which is decoded by https://zxing.org/w/decode.jspx as following data:
As you can see there are
01
s inside the data, which should be all00
.I had tried to figure it out for a while, but it's far out of my scope, I'd appreciate it if you could help.
Thanks,
mutoo
The text was updated successfully, but these errors were encountered: