diff --git a/src/PhpPresentation/Shape/Drawing/Gd.php b/src/PhpPresentation/Shape/Drawing/Gd.php index f69b345ea..d4509d922 100644 --- a/src/PhpPresentation/Shape/Drawing/Gd.php +++ b/src/PhpPresentation/Shape/Drawing/Gd.php @@ -132,6 +132,10 @@ public function setMimeType($value = self::MIMETYPE_DEFAULT) public function getContents() { ob_start(); + if ($this->getMimeType() === self::MIMETYPE_DEFAULT) { + imagealphablending($this->getImageResource(), false); + imagesavealpha($this->getImageResource(), true); + } call_user_func($this->getRenderingFunction(), $this->getImageResource()); $imageContents = ob_get_contents(); ob_end_clean();