From e3ba43ee0404ad8ea22c1dc2e2cae143c407ccf7 Mon Sep 17 00:00:00 2001 From: pacozhong Date: Wed, 5 Nov 2014 10:34:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=20#11=20:=E9=80=8F=E6=98=8E=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E7=9A=84png=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8images?= =?UTF-8?q?avealpha=E4=BF=9D=E5=AD=98alpha=E9=80=9A=E9=81=93=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E4=B8=8D=E5=8F=98=E6=88=90=E8=83=8C=E6=99=AF=E9=BB=91?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doitphp/library/Image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doitphp/library/Image.php b/doitphp/library/Image.php index da5d6a9..0de894c 100644 --- a/doitphp/library/Image.php +++ b/doitphp/library/Image.php @@ -208,6 +208,8 @@ protected function _parseImageInfo($url) { case 3: $this->_image = imagecreatefrompng($url); + //bug fix #11 :透明背景的png需要使用imagesavealpha保存alpha通道才能不变成背景黑色 + imagesavealpha($this->_image, true); $this->_type = 'png'; break;