diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-17 14:59:53 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-17 14:59:53 +0000 |
| commit | b6949c47ec5762126f89cc9bb79cba8d5f9039ba (patch) | |
| tree | 0c337dca01fc82d0c3f77fb243b54ba172ffa10c /phpBB/includes/functions_posting.php | |
| parent | 235f55297495c05ae9642dece363a9862f37d0e6 (diff) | |
| download | forums-b6949c47ec5762126f89cc9bb79cba8d5f9039ba.tar forums-b6949c47ec5762126f89cc9bb79cba8d5f9039ba.tar.gz forums-b6949c47ec5762126f89cc9bb79cba8d5f9039ba.tar.bz2 forums-b6949c47ec5762126f89cc9bb79cba8d5f9039ba.tar.xz forums-b6949c47ec5762126f89cc9bb79cba8d5f9039ba.zip | |
Preserve alpha transparency for created thumbnails. (Bug #16575)
git-svn-id: file:///svn/phpbb/trunk@8865 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |
