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: 21 años, 3 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(40030);

// Crear algunos colores
$blanco imagecolorallocate($im255255255);
$gris   imagecolorallocate($im128128128);
$negro  imagecolorallocate($im000);
imagefilledrectangle($im0039929$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($im2001121$gris$fuente$texto);

// Agregar el texto
imagettftext($im2001020$negro$fuente$texto);

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