2amigos / qrcode-library

Create QrCodes with ease
https://2am.tech/open-source/qrcode-generator
Other
222 stars 66 forks source link

Incorrect QR code generated #43

Closed dayaram3388 closed 1 year ago

dayaram3388 commented 5 years ago

To start with, thank you for providing open source libraries for individuals like us to quickly deliver the client tasks. I have a question pertaining to the QR codes generated using your library. Incidentally, few of the random QR codes are not readable.

I checked the 4 elements to be present: - Position marking- Alignment marking- Timing Marking- Quiet zone

It seems all are present, but still the reference attached QR code is not readable? Could you advise the problem in here! Incidentally, my client has printed more than 30K+ QR codes physically, and to control the situation, am trying to first understand the problem - and then find possible solution.

For your reference, the data stored on this reference QR code image is CARD-7818-1407-1311-191015-184607

Any help would be appreciated. CARD-7818-1407-1311-191015-184607

tonydspaniard commented 4 years ago

sorry for the delay, i think the problem is the logo within.

2amjsouza commented 1 year ago

Hi, the logo should be up to 16% the qrcode size, you have a little bit more in this sample

image

Here's a sample using the data you provided:

$text = (new QrCode('CARD-7818-1407-1311-191015-184607'))
    ->setSize(91)
    ->setLogo(public_path('assets/logo.png'))
    ->setLogoWidth(14);

Storage::put('qrcode/test.png', $text->writeString());

test