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;