imagesavealpha() in Writer\AbstractWriter
This commit is contained in:
parent
28f801b5d0
commit
adfcc62e64
|
|
@ -360,6 +360,10 @@ abstract class AbstractWriter implements WriterInterface
|
|||
// Retrive GD image content or get local media
|
||||
if (isset($element['isMemImage']) && $element['isMemImage']) {
|
||||
$image = call_user_func($element['createFunction'], $element['source']);
|
||||
if ($element['imageType'] === 'image/png') {
|
||||
// PNG images need to preserve alpha channel information
|
||||
imagesavealpha($image, true);
|
||||
}
|
||||
ob_start();
|
||||
call_user_func($element['imageFunction'], $image);
|
||||
$imageContents = ob_get_contents();
|
||||
|
|
|
|||
Loading…
Reference in New Issue