Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2008, 13:37
nukerojo
 
Fecha de Ingreso: marzo-2008
Mensajes: 39
Antigüedad: 16 años, 2 meses
Puntos: 0
Gd o como hacer un generador de imagenes introduciendo texto

Tengo el siguiente texto y queria saber si algun genio sabe como adaptarlo para
  • Cambiar la fuente gdf por una ttf
  • Centrar el texto
  • Rotarlo

Código PHP:
<?php
$string1 
$_GET['line1']; // lets get the text from the form
$string2 $_GET['line2']; // lets get the text from the form
$string3 $_GET['line3']; // lets get the text from the form
$string4 $_GET['line4']; // lets get the text from the form
$im imagecreatefromjpeg("burbuja.jpg"); // define what image we want to write on
$textcolor imagecolorallocate($im000); // define the text color, red, green, blue
$font imageloadfont('sylfaen.gdf'); // tells it what font to use
imagestring($im$font150$string1$textcolor); // first line
imagestring($im$font1825$string2$textcolor); // 2 line
imagestring($im$font3850$string3$textcolor); // 3 line
imagestring($im$font9875$string4$textcolor); // 4 line
header("Content-type: image/jpeg"); // header to tell the browser it's an image
imagejpeg($im); // creates the image with text
imagedestroy($im); // destroys the image in the memory
?>
Saludos