// $this->qrcode exists and is a string
$qrcode_image_path = sys_get_temp_dir().'/filename.png';
QrCode::format('png')->size(300)->margin(3)->generate($this->qrcode, $qrcode_image_path);
and get the result below:
[app.error][ERROR] Unable to set image format
#0 /vendor/bacon/bacon-qr-code/src/Renderer/Image/ImagickImageBackEnd.php(75): Imagick->setImageFormat()
#1 /vendor/bacon/bacon-qr-code/src/Renderer/ImageRenderer.php(50): BaconQrCode\Renderer\Image\ImagickImageBackEnd->new()
#2 /vendor/bacon/bacon-qr-code/src/Writer.php(54): BaconQrCode\Renderer\ImageRenderer->render()
#3 /vendor/simplesoftwareio/simple-qrcode/src/Generator.php(171): BaconQrCode\Writer->writeString()
...
Laravel 9.52.4
PHP 8.2
Any idea why get the error?
Thanks
EDIT: the sysadmin confirmed that Imagick is installed on the server. hm..
EDIT 2:
if I create a test php on the server, it generates the png with native call:
<?php
$image = new Imagick();
$image->newImage(100, 100, new ImagickPixel('red'));
$image->setImageFormat('png');
header('Content-type: image/png');
echo $image;
I call the following line
and get the result below:
Laravel 9.52.4 PHP 8.2
Any idea why get the error? Thanks
EDIT: the sysadmin confirmed that Imagick is installed on the server. hm..
EDIT 2: if I create a test php on the server, it generates the png with native call: