SimpleSoftwareIO / simple-qrcode

An easy-to-use PHP QrCode generator with first-party support for Laravel.
https://www.simplesoftware.io/simple-qrcode
MIT License
2.66k stars 363 forks source link

Resolution/quality, different between versions #263

Closed tiagocaus closed 1 year ago

tiagocaus commented 1 year ago

Used version 2 and the qrcode had a good resolution. Now that I migrated to version 4, because I'm using php 8.1, the same qrcode is blurred.

Code used in both versions: <img src="data:image/png;base64, '.base64_encode($qrcode->format('png')->size(90)->margin(1)->generate($row['codigo'])).' ">

qrcode generated in version 2

https://i.imgur.com/8xw1BEM.png

qrcode generated in version 4

https://i.imgur.com/LCkKPHN.png

Did you notice that in version 4 the edges are a little blurred? They should be clear.

How to solve it?

Thanks.

Ander07 commented 1 year ago

I had a similar case, and what I did was increase the 'size', while increasing the 'size' improved the definition. Regards

JshGrn commented 4 months ago

Not really sure why this is completed, the generated QR codes are blurry, the only 'workaround' is making them much larger then scaling them down which is really bad solution.