aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-17 14:59:16 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-17 14:59:16 +0000
commitba882709d808e4267cc01a4a7023e1950c8c5783 (patch)
tree72de818e92c56f82e1ba79e4959458024222c073
parente7d84c3869a71c1892f09a6cd9e96c4c3958a45c (diff)
downloadforums-ba882709d808e4267cc01a4a7023e1950c8c5783.tar
forums-ba882709d808e4267cc01a4a7023e1950c8c5783.tar.gz
forums-ba882709d808e4267cc01a4a7023e1950c8c5783.tar.bz2
forums-ba882709d808e4267cc01a4a7023e1950c8c5783.tar.xz
forums-ba882709d808e4267cc01a4a7023e1950c8c5783.zip
Preserve alpha transparency for created thumbnails. (Bug #16575)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8864 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_posting.php4
2 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index fc3efd08d3..d97c36d540 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -111,6 +111,7 @@
<li>[Fix] Do not display reported topic icon for shadow topics. (Bug #13970)</li>
<li>[Fix] Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)</li>
<li>[Fix] Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)</li>
+ <li>[Fix] Preserve alpha transparency for created thumbnails. (Bug #16575)</li>
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 046922b8e3..4ce5fbd133 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -688,6 +688,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);
}