From b6949c47ec5762126f89cc9bb79cba8d5f9039ba Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 17 Sep 2008 14:59:53 +0000 Subject: [PATCH] Preserve alpha transparency for created thumbnails. (Bug #16575) git-svn-id: file:///svn/phpbb/trunk@8865 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 51c69761fc..85f2089628 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -686,6 +686,10 @@ function create_thumbnail($source, $destination, $mimetype) return false; } + // Preserve alpha transparency (png for example) + @imagealphablending($new_image, false); + @imagesavealpha($new_image, true); + imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); }