mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:11:47 +02:00
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:
@@ -686,6 +686,10 @@ function create_thumbnail($source, $destination, $mimetype)
|
|||||||
return false;
|
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);
|
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user