BinaryEye
BinaryEye copied to clipboard
[feature request] Add masking type for QR codes
Thanks for creating such a great app!
I was curious if it would be possible display the mask for QR codes.
I did a little searching and it appears there are 8 possible masks to a QR code:
The library ZXing C++ has to be able to decipher this mask in order to read the QR code. I guess it's a question of whether or not it provides the mask.
These are the 3 bits that encode the mask:
This video from Veritasium describes it really well. https://youtu.be/w5ebcowAJD8?&t=1612
In this example I believe the mask would be 4 (0b100)
I did some quick searching and this was the closest I could find, but unfortunately it only returns if it's a valid mask, but not actually the mask. The maskIndex
referenced in that function would be it.
https://github.com/zxing-cpp/zxing-cpp/blob/master/core/src/qrcode/QRDataMask.h#L23-L43