Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/05/2004, 09:22
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 24 años
Puntos: 1
Código no me funciona

Este código me funcionaba en Win32 con la librería php_gd2.dll, pero en Linux con estas características de la Librería GD no me funciona,
Cita:
GD Support enabled
GD Version 1.6.2 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
¿que puede estar pasando?
Código PHP:
 $codigo=$_GET['pass'];
  
$tipografias = array("arial","comic","times","tahoma");
  
$fuentes_source = "C:\\WIN2003\\FONTS\\";
  
$espacio = 0;
  
$tamano_fuente = 15;
  
$profundidad_codigo = 10;
  
$x=$profundidad_codigo*$tamano_fuente;
  
$y=$tamano_fuente;
  
$im = imagecreate ($x, $y);
  
$color_fondo = imagecolorallocate ($im, 162, 170, 206); // Violetica comicón
  
$color_texto = imagecolorallocate ($im, 0, 0, 0); // Negro
  
for ($caracter=0; $caracter<=$profundidad_codigo; $caracter++){
   
$indice_aleatorio=array_rand($tipografias);
   
$tipografia=$fuentes_source.$tipografias[$indice_aleatorio].".ttf";
   
ImageTTFText ($im, rand(10,$tamano_fuente), 0, $espacio, $tamano_fuente, $color_texto, $tipografia , $codigo{$caracter});
   
$espacio +=$tamano_fuente;
  }
  
header("Content-type: image/png");
  
imagepng ($im);
  
imagedestroy ($im); 
Salu2
__________________
Ing. Reynier Pérez Mira

Última edición por Reynier; 04/05/2004 a las 09:24