Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/09/2009, 14:59
Avatar de kuriel
kuriel
 
Fecha de Ingreso: febrero-2009
Mensajes: 240
Antigüedad: 15 años, 2 meses
Puntos: 4
Respuesta: Fuente de texto en imagen

Cita:
Iniciado por samu22 Ver Mensaje
Código php:
Ver original
  1. header('Content-type: image/png');
  2.  
  3. // imagen
  4. $im = imagecreatetruecolor(200, 30);
  5.  
  6. // colores
  7. $white = imagecolorallocate($im, 255, 255, 255);
  8. $grey = imagecolorallocate($im, 128, 128, 128);
  9. $black = imagecolorallocate($im, 0, 0, 0);
  10. imagefilledrectangle($im, 0, 0, 199, 29, $white);
  11.  
  12. //texto
  13. $text = 'php';
  14.  
  15. $font = 'arial.ttf';
  16.  
  17. imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
Hola, gracias, pero este codigo NO hace nada
__________________
Si todas las URL's que tienes o visitas te parecen largas, visita www.korto.tk - También protege de rastros y con contraseñas tus páginas o URL's.