ZXing.Net icon indicating copy to clipboard operation
ZXing.Net copied to clipboard

How to get the contents of a Binary QR Code?

Open pepoluan opened this issue 3 years ago • 3 comments

So I have a QR Code that contains a zip file. With the zbarimg tool on Linux I can extract the zip file (binary content of the QR Code).

How do I get the binary content of that QR Code? That is, after doing all ECC etc...

If I use result.Text, I get a string, which likely has some binary values removed, resulting in the blob no longer being recognized as a valid Zip file ...

pepoluan avatar Dec 15 '21 07:12 pepoluan

To illustrate:

QR_Code (in PNG)
    |
    | recognition + raw bytes extraction
    V
raw bytes
    |
    | ECC etc
    V
corrected bytes
    |
    | decode
    V
string

I want to get the "corrected bytes", one step after "raw bytes", but before it gets converted to "string"

pepoluan avatar Dec 15 '21 07:12 pepoluan

Do you have a sample image?

micjahn avatar Dec 16 '21 19:12 micjahn

Maybe using the .NET wrapper for the zxing-cpp project would be an option for you. It has explicit support for decoding binary content. See the Barcode.Bytes property.

axxel avatar Feb 04 '24 22:02 axxel