Code: Select all
<?
$image = imagecreatetruecolor(192, 36);
$trans_color = imagecolorallocate($image, 255, 0, 0);
$color = imagecolorallocate($image, 255, 255, 255);
imagecolortransparent($image, $trans_color);
imagettftext($image, 10, 0, 10, 23, $color, "impact.ttf", " MENU ITEM");
imagegif($image, "output.gif");
imagedestroy($image);
?>the background and text become transparent but the transparent color is red not black or white? i dont get it. i've been asking people everywhere but no one seems to be able to give me an answer. if someone could explain how setting the transparent color to red causes the black background to become transparent, that would be great
