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

Support QR Code Model1 #633

Merged
merged 9 commits into from Oct 20, 2023
Merged

Support QR Code Model1 #633

merged 9 commits into from Oct 20, 2023

Conversation

sayzzy-nt
Copy link
Contributor

Supported QR code model 1
Although the source code is not very clean, you should be able to read all QR code model 1 with this.

Copy link
Collaborator

@axxel axxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your cooperation. Please also add the following test-image as test/samples/qrcode-2/qr-model-1.png and update BlackboxTestRunner.cpp accordingly.
qr-model1

core/src/qrcode/QRBitMatrixParser.cpp Outdated Show resolved Hide resolved
core/src/qrcode/QRBitMatrixParser.cpp Outdated Show resolved Hide resolved
core/src/qrcode/QRBitMatrixParser.cpp Outdated Show resolved Hide resolved
core/src/qrcode/QRBitMatrixParser.cpp Outdated Show resolved Hide resolved
if (!formatInfo.isValid())
return FormatError("Invalid format information");

if (isModel1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This split between reading version and reading format info is obviously not suitable anymore when those two inter-depend in the presence of Model1. I'll think about how I'd like this to be cleanup after merging.

core/src/qrcode/QRBitMatrixParser.h Outdated Show resolved Hide resolved
core/src/qrcode/QRVersion.cpp Outdated Show resolved Hide resolved
@sayzzy-nt sayzzy-nt requested a review from axxel October 19, 2023 03:55
@axxel
Copy link
Collaborator

axxel commented Oct 19, 2023

As you can see, I thought the build failure can be fixed easily via the web-gui of github but it took me 4 tries to get everything. sigh. Now it builds but one test fails. If you could have look, that would be very nice. If not, I will then properly download your PR locally and debug it.

Also, please replace the png you added with the one I provided earlier. I made an effort to make this file as small as possible (230 bytes vs 3.4kB). The test images use up way to much space and I try to limit the effect of any new addition.

@axxel axxel merged commit ebd7db8 into zxing-cpp:master Oct 20, 2023
10 checks passed
Sec-ant added a commit to Sec-ant/zxing-wasm that referenced this pull request Oct 21, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants