Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/02/2011, 14:15
kirst
 
Fecha de Ingreso: septiembre-2009
Mensajes: 230
Antigüedad: 14 años, 7 meses
Puntos: 2
Respuesta: Funcion de thumbnail a temporal

No funciona ese code, por lo menos no para mi:

Cita:

Warning: imagesx(): supplied argument is not a valid Image resource in C:\AppServ\www\CulturaBahiense\img\th\thumb.php on line 6

Warning: imagesy(): supplied argument is not a valid Image resource in C:\AppServ\www\CulturaBahiense\img\th\thumb.php on line 7

Warning: imagecopyresized(): supplied argument is not a valid Image resource in C:\AppServ\www\CulturaBahiense\img\th\thumb.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\CulturaBahiense\img\th\thumb.php:6) in C:\AppServ\www\CulturaBahiense\img\th\thumb.php on line 12
Código PHP:
<?php 

/*Este Archivo Recibe Los Parametros $ruta, Que Es La Ruta Interna De La Imagen En El Servidor, Y Los Parametros $ancho y $alto Que Se Refiere Al Alto Y Ancho De La Previsualizacion.*/

$fuente = @imagecreatefromgif($ruta);
$imgAncho imagesx($fuente);
$imgAlto imagesy($fuente);
$imagen imagecreate($ancho,$alto);

imagecopyresized($imagen,$fuente,0,0,0,0,$ancho,$alto,$imgAncho,$imgAlto);

header("Content-type: image/jpeg");
imagejpeg($imagen);

?>
Es una imagen JPG 21kbs 415x585. Lista los errores de arriba.