Preserve alpha transparency for created thumbnails. (Bug #16575)

git-svn-id: file:///svn/phpbb/trunk@8865 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-09-17 14:59:53 +00:00
parent 235f552974
commit b6949c47ec

View file

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