ian-hamlin / qrgen

A bulk QR Code generator.
MIT License
31 stars 7 forks source link

Data too long #9

Open wstoettinger opened 2 years ago

wstoettinger commented 2 years ago

Is it possible to extend the max capacity by a factor of 4?

I would like to embed an base64 encoded image in the qr-code and get the following error message: error generating for output DataTooLong("Data length = 32476 bits, Max capacity = 10208 bits")

ian-hamlin commented 2 years ago

I think this goes above what can fit into a QR code, so it won't be possible.

Based on the data here https://www.qrcode.com/en/about/version.html

You can get above the 10208 if you change some settings

wstoettinger commented 2 years ago

interesting. Since the new Austrian Identity Card uses a QR-code which is definitely bigger than that and also has an image embedded. See example: image

I would like to achieve a similar result. however, it seems that this qr-code can't be read with a typical scanner but needs a custom app to be read. I am assuming though, that this will get to some kind of standard for European ID cards.

ian-hamlin commented 2 years ago

I've been having a look, there is something called "Structured Append", which I assume is what the above is, it splits large data over 16 QR codes.

I'm not sure if the qr code library I call into supports that, but I can take a look. There might be other libraries that do support it, this one seems too https://segno.readthedocs.io/en/latest/index.html