diff --git a/src/Writer/PngWriter.php b/src/Writer/PngWriter.php index 4c448d7..e076518 100644 --- a/src/Writer/PngWriter.php +++ b/src/Writer/PngWriter.php @@ -80,7 +80,7 @@ private function createInterpolatedImage($baseImage, array $data, QrCodeInterfac $backgroundColor = imagecolorallocatealpha($image, $qrCode->getBackgroundColor()['r'], $qrCode->getBackgroundColor()['g'], $qrCode->getBackgroundColor()['b'], $qrCode->getBackgroundColor()['a']); imagefill($image, 0, 0, $backgroundColor); imagecopyresampled($image, $baseImage, $data['margin_left'], $data['margin_left'], 0, 0, $data['inner_width'], $data['inner_height'], imagesx($baseImage), imagesy($baseImage)); - + imagesavealpha($image, true); return $image; }