race2
01-08-2007, 17:42
salve ho un problemino,
in un file "PNG-24 transparent" ci scrivo dentro una frase,
solo che il file PNG non mi prende la trasparenza, non capisco come mai......
mi copre il "background" rosso del Body.....
<html>
<head>
<title></title>
</head>
<body bgcolor="#FF0000">
<?
$im = imagecreatefrompng("bg_transparent_png24.png");
$text = "Chi Siamo";
$font = 'ardleys.ttf';
$sFileNameOutput = "myImgOut.png";
imagettftext($im, 100, 0, 13, 105, imagecolorallocate($im, 0, 0, 0), $font, $text);
imagettftext($im, 100, 0, 10, 100, imagecolorallocate($im, 190, 190, 190), $font, $text);
imagecolortransparent($im, 0);
imagepng($im, $sFileNameOutput);
imagedestroy($im);
?>
<img src="<?=$sFileNameOutput ;?>" style="border:1px solid #000000;">
</body>
</html>
in un file "PNG-24 transparent" ci scrivo dentro una frase,
solo che il file PNG non mi prende la trasparenza, non capisco come mai......
mi copre il "background" rosso del Body.....
<html>
<head>
<title></title>
</head>
<body bgcolor="#FF0000">
<?
$im = imagecreatefrompng("bg_transparent_png24.png");
$text = "Chi Siamo";
$font = 'ardleys.ttf';
$sFileNameOutput = "myImgOut.png";
imagettftext($im, 100, 0, 13, 105, imagecolorallocate($im, 0, 0, 0), $font, $text);
imagettftext($im, 100, 0, 10, 100, imagecolorallocate($im, 190, 190, 190), $font, $text);
imagecolortransparent($im, 0);
imagepng($im, $sFileNameOutput);
imagedestroy($im);
?>
<img src="<?=$sFileNameOutput ;?>" style="border:1px solid #000000;">
</body>
</html>