Can't scan QR-Code with large data input
loust333 opened this issue · 1 comments
Hello,
I tried to generate a QR Code with a data which has a length of ±431 characters and to export as PNG or SVG but I got two problems.
With the PNG export, I set the size equal to 200
but the QR-Code was not 200 pixel big but it used only 75% of the space and is not possible to scan it.
png = qrcode.as_png(size: 200)
With the SVG export, the quality was very nice. I used the params module_size 2
and the QR-Code was ±200 pixel height and width but the QR-Code could not be scanned.
svg = qrcode.as_svg(module_size: 11)
At the moment, we are trying to replace in our system the Google API QRCode
with rqrcode
Best regards,
Steve
Well, my colleague found the problem. It was the wrong level. I had to set to level :l to make the QR-Code readable.
RQRCode::QRCode.new(data_encoded, level: :l)
Best regards.