add support for endroid/qr-code (with logo) version 6 (#143)

This commit is contained in:
YellowMaker
2024-10-24 17:14:25 +02:00
committed by GitHub
parent 92487acba4
commit 6d70f9ca8e
@@ -33,11 +33,15 @@ class EndroidQrCodeWithLogoProvider extends EndroidQrCodeProvider
$logo = null;
if ($this->logoPath) {
$logo = Logo::create($this->logoPath);
if ($this->logoSize) {
$logo->setResizeToWidth($this->logoSize[0]);
if (isset($this->logoSize[1])) {
$logo->setResizeToHeight($this->logoSize[1]);
if ($this->endroid6) {
$logo = new Logo($this->logoPath, ...$this->logoSize);
} else {
$logo = Logo::create($this->logoPath);
if ($this->logoSize) {
$logo->setResizeToWidth($this->logoSize[0]);
if (isset($this->logoSize[1])) {
$logo->setResizeToHeight($this->logoSize[1]);
}
}
}
}