Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/10/2012, 18:44
EdsonOrdaz
 
Fecha de Ingreso: octubre-2012
Mensajes: 1
Antigüedad: 11 años, 6 meses
Puntos: 0
Como automodificar texto a una imagen mediante imagettftext

hola amigos bueno quisiera que me pudieran ayudar por favor la cuestion es que trato de poner texto dentro de una imagen por medio de PHP de esta manera
Código PHP:
header("Content-type: image/jpeg");  
$imagen imagecreatefromjpeg('personajes/1.jpg'); 
$negro imagecolorallocate($imagen000); 
$white  imagecolorallocate($imagen255255255); 
$texto="HOLA"
$fuente ="impact.ttf"
$longitud imagesx($imagen); 
$bounds[] = array(); 
$bounds imageftbbox(30,0,$fuente$texto); 
$x $bounds[0] + ($longitud 2) - ($bounds[4] / 2); 
imagettftext($imagen300$x50$white,$fuente,$texto); 
imagejpeg($imagen); 
imagedestroy($imagen); 
Y funciona perfecto pero el problema es que si agrego mucho texto en ves de que realize salto de linea automatico o se haga mas pequeño el texto no se ve...
Existe alguna manera que yo pueda identificar si el texto sale de la imagen?