chillerlan / php-qrcode

A PHP QR Code generator and reader with a user-friendly API.
https://smiley.codes/qrcode/
Apache License 2.0
2.02k stars 302 forks source link

If the logo is enabled and there are less than 17 characters, the qr image will not be displayed. #95

Closed nicolasvac closed 3 years ago

nicolasvac commented 3 years ago

As i said in the title, if the logo option is enabled (with QRImageWithLogo) and you provide less than 17 characters to the qrcode, the generation with the dump method will fail.

We are using version 3.4.1

codemasher commented 3 years ago

That's probably because the QR Code is too small to properly. Please note that logos in QR Codes are not part of the specification and more of a gimmick. The problem is that the logo space simply overwrites the QR data and relies on the error correction and at a certain size there are not enough ECC bytes left to properly restore the content. So what you can do is manually increase the QR Code version until your logo fits and the data is readable.