Foros del Web » Programando para Internet » PHP »

Gd o como hacer un generador de imagenes introduciendo texto

Estas en el tema de Gd o como hacer un generador de imagenes introduciendo texto en el foro de PHP en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 24/09/2008, 13:37
 
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
  #2 (permalink)  
Antiguo 24/09/2008, 14:06
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Gd o como hacer un generador de imagenes introduciendo texto

Hola nukerojo,

Si ves el manual de PHP en la parte de la libreria GD puedes encontrar toda la info que necesites para hacer eso.

Saludos.
  #3 (permalink)  
Antiguo 24/09/2008, 14:28
 
Fecha de Ingreso: marzo-2008
Mensajes: 39
Antigüedad: 16 años, 2 meses
Puntos: 0
Respuesta: Gd o como hacer un generador de imagenes introduciendo texto

No aclare que mi conocimiento de PHP es nulo y luego de varios intentos de hacerlo siempre me tiro error

:S
  #4 (permalink)  
Antiguo 30/09/2008, 20:49
 
Fecha de Ingreso: marzo-2008
Mensajes: 39
Antigüedad: 16 años, 2 meses
Puntos: 0
Respuesta: Gd o como hacer un generador de imagenes introduciendo texto

somebody? alguien sabe?
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:59.