From 2b2e2011b6dbad4f4445f5545f44f83df4fadafd Mon Sep 17 00:00:00 2001 From: Christian Haschek Date: Tue, 3 Nov 2015 00:27:37 +0100 Subject: [PATCH] transparency on resized png's is now displayed correctly --- classes/image.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/image.php b/classes/image.php index 27601e1..fcd11d4 100644 --- a/classes/image.php +++ b/classes/image.php @@ -124,6 +124,10 @@ class Image ImageColorAllocate($newimg, $colors['red'], $colors['green'], $colors['blue']); } + imagefill($newimg, 0, 0, IMG_COLOR_TRANSPARENT); + imagesavealpha($newimg,true); + imagealphablending($newimg, true); + imagecopyresized($newimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); $img = $newimg;