Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/06/2006, 14:09
Avatar de Nefertiter
Nefertiter
 
Fecha de Ingreso: enero-2003
Ubicación: Rosario
Mensajes: 1.316
Antigüedad: 23 años, 9 meses
Puntos: 9
mirate este ejemplo de la funcion imagettftext
Código PHP:
<?php
// Establecer el tipo de contenido
header("Content-type: image/png");

// Crear la imagen
$im = imagecreatetruecolor(400, 30);

// Crear algunos colores
$blanco = imagecolorallocate($im, 255, 255, 255);
$gris   = imagecolorallocate($im, 128, 128, 128);
$negro  = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $blanco);

// El texto a pintar
$texto = 'Probando...';
// Reemplaze la ruta con su propio ruta a la fuente
$fuente = 'arial.ttf';

// Agregar una sombre al texto
imagettftext($im, 20, 0, 11, 21, $gris, $fuente, $texto);

// Agregar el texto
imagettftext($im, 20, 0, 10, 20, $negro, $fuente, $texto);

// Usar imagepng() resulta en texto mas claro, en comparacion con imagejpeg()
imagepng($im);
imagedestroy($im);
?>