antonioribeiro / google2fa-qrcode

QRCode for Google2FA
MIT License
107 stars 25 forks source link

Call to undefined function BaconQrCode\\Renderer\\Image\\imagecreatetruecolor() #4

Closed luis-digivante closed 4 years ago

luis-digivante commented 4 years ago

I am getting this issue while trying to perform a call to getQRCodeInline() method. A few details of my environment:

My code: use PragmaRX\Google2FAQRCode\Google2FA; $google2fa = new Google2FA(); $secretKey = $google2fa->generateSecretKey();

$qrCodeUrl = $google2fa->getQRCodeUrl("Digivante", "luis.sardinha@digivante.com", $secretKey);

$inlineUrl = $google2fa->getQRCodeInline("Digivante", "luis.sardinha@digivante.com", $secretKey);

It successfully generates the secret key. It successfully generates the qrCodeUrl. It breaks trying to generate inlineUrl.

I know this is a known issue but I tried all suggestion and still not success. Any suggestions? Thanks

luis-digivante commented 4 years ago

It works after installing php-gd extension.

antonyayansi commented 2 years ago

Thanks