transparency on resized png's is now displayed correctly

This commit is contained in:
Christian Haschek
2015-11-03 00:27:37 +01:00
parent a5280eeedc
commit 2b2e2011b6

View File

@@ -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;