Transparency fix for thumbnails
This commit is contained in:
parent
80099c87e6
commit
d1d6429421
@ -351,9 +351,13 @@
|
|||||||
$return['height'] = $tn_height;
|
$return['height'] = $tn_height;
|
||||||
|
|
||||||
$tmp = imagecreatetruecolor($tn_width, $tn_height);
|
$tmp = imagecreatetruecolor($tn_width, $tn_height);
|
||||||
|
imagecolortransparent($tmp, imagecolorallocatealpha($tmp, 0, 0, 0, 0));
|
||||||
|
imagealphablending($tmp, false);
|
||||||
|
imagesavealpha($tmp, true);
|
||||||
|
|
||||||
imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
|
imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);
|
||||||
|
|
||||||
imagepng($tmp, $destination_pic, 100);
|
imagepng($tmp, $destination_pic, 4);
|
||||||
imagedestroy($src);
|
imagedestroy($src);
|
||||||
imagedestroy($tmp);
|
imagedestroy($tmp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user