problemas al construir imagenes gif
Publicado por Harold Arando (9 intervenciones) el 22/06/2001 06:36:47
hola a todos, yo uso apache 1.3, php 4 sobre windows 2000 yo tengo el siguiente script pero me sale un warning:
<?
$text="php";
Header("Content-type: image/gif");
if(!isset($s)) $s=11;
$size = imagettfbbox($s,0,"TIMES.TTF",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "TIMES.TTF", $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "TIMES.TTF", $text);
ImageGif($im);
ImageDestroy($im);
?>
y este es el warning:
<br>
<b>Warning</b>: ImageGif: No GIF support in this PHP build in <b>c:\apache\htdocs\prueba\saludo.php</b> on line <b>18</b><br>
y la line 18 es:
ImageGif($im);
ayuda amigos...... gracias de antemano
<?
$text="php";
Header("Content-type: image/gif");
if(!isset($s)) $s=11;
$size = imagettfbbox($s,0,"TIMES.TTF",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black, "TIMES.TTF", $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white, "TIMES.TTF", $text);
ImageGif($im);
ImageDestroy($im);
?>
y este es el warning:
<br>
<b>Warning</b>: ImageGif: No GIF support in this PHP build in <b>c:\apache\htdocs\prueba\saludo.php</b> on line <b>18</b><br>
y la line 18 es:
ImageGif($im);
ayuda amigos...... gracias de antemano
Valora esta pregunta


0