Skip to content
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

Doesn't detect white codes on dark backgrounds #80

Open
mircerlancerous opened this issue Jan 11, 2022 · 2 comments
Open

Doesn't detect white codes on dark backgrounds #80

mircerlancerous opened this issue Jan 11, 2022 · 2 comments

Comments

@mircerlancerous
Copy link

It's becoming more common for QR codes to be printed in white instead of black, with dark backgrounds instead of white; the scanner cannot decode these it seems, at least not in my implementation. I've seen this recently on a pizza box and a promo poster, so I'm assuming it's not a fluke. Seem like it'd be pretty easy to add support by just inverting the canvas colour every third scan, or something like that.

@ioulian
Copy link

ioulian commented Oct 25, 2022

I have the same issue, we have white QR code on red background

@mircerlancerous
Copy link
Author

@ioulian it would be great if you can upload a sample of your QR code.
For my part I have fixed this for my purposes by employing the change I recommended; this should really be implemented in the core decoding functions, so I won't do a PR with it. If you try it and it works or doesn't, add a comment here
zxing-browser.min.neg.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants