transparent png file have a black background after resize, how to fix it??? please.
Hi all,
Thanks for coming and see my question, i think there must be other people also have seen this issue. when there is a transparent png file, after resize by "thumbnail.php", the background became black!!!!!which looks very bad...
can anyone tell me how to fix this problem?
i have did some research online, most people all recommend use the following code:
+++++++++++++++++++++++++++++++++++
imagealphablending($thumb_img, false);
imagesavealpha($thumb_img,true);
$transparent = imagecolorallocatealpha($thumb_img, 255, 255, 255, 127);
imagefilledrectangle($thumb_img, 0, 0, $thumb_width, $thumb_height, $transparent);
++++++++++++++++++++++++++++++++++++++
but even after i put these lines after line 185 in thumbnail.php, and did clean the cache, still have that issue.
please give some help
|