Closed claudiofelber closed 4 years ago
Thanks for your feedback. I have added support for flipped QR-codes to the inspect
and qrtest
tools, optimized quirc_flip()
according to your suggestions and described its usage in the README file. You were absolutely right with sx
and sy
not being necessary. They were a relic of some earlier experiments and I forgot to clean up the code prior to committing it – shame on me!
LGTM, thank you!
The QR-code specification supports various optional features. A newer one is "mirror imaging". I don't know in which version of the specification (2006, 2009 or 2015) it was added, but it certainly is mentioned in ISO 18004:2015:
ISO 18004: 2015, page 6, "Mirror lmaging":
ISO 18004: 2015, page 62, "Decoding procedure overview":
For the moment I decided on making the flipped detection optional by providing a new function
quirc_flip()
. It flips the modules pixmap and rotates it back to the normalized position. Then a second decode attempt can be initiated. A typical call sequence would look like this:The following two QR-codes represent a normal and a horizontally flipped one. Both can be correctly decoded with this small extension:
This resolves the problem I reported in issue https://github.com/dlbeer/quirc/issues/88.