Zhu Jinhui 6 жил өмнө
parent
commit
60238c529a

+ 1 - 1
src/Library/Qr.php

@@ -127,7 +127,7 @@ class Qr
             'stroke' => 0,//是否描边
         );
         $options = array_merge($defaults, $options);
-        
+
         \QrCode\QRencode::factory($errorLevel, $pointSize, $margin);
 
         $qrCls = new \QrCode\QRencode();

+ 2 - 1
src/Library/QrCode/Traits/Fill.php

@@ -114,8 +114,9 @@ trait Fill
     public function resizeLogo($im, $maxWidth, $maxHeight) {
         $picWidth = imagesx($im);
         $picHeight = imagesy($im);
-        $newIM = imagecreatetruecolor($maxWidth, $maxHeight);
+        imagesavealpha($im, true);
 
+        $newIM = imagecreatetruecolor($maxWidth, $maxHeight);
 
         $almostBlack = imagecolorallocate($newIM,254,254,254);
         imagefill($newIM,0,0, $almostBlack);