Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/05/2004, 06:27
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Pues de eso me di cuenta

De eso me di cuenta ayer registrando en mis documentos y buscando información al respecto en internet. Ahora he modificado el código y me ha quedado así:
Código PHP:
function CreateThumbnail($filename){
  
$img imagecreatefromjpeg($filename);
  
$width imagesx($img);
  
$height imagesy($img);

  
$imagen imagecreate($width$height);

  if(((
$width==1024) || ($width==800) || ($width==640))&&(($height==768)||($height==600)||($height==480))){
   
$new_width 144;
   
$new_height 108;
  }

  
$new_img imagecopyresized($imagen$img0,0,0,0$width$height$new_width$new_height); #esta es la linea 467

  
header("Content-type: image/jpeg");
  
imagejpeg($new_img); #esta es la linea 470
 

pero me sigue dando esos dos errores:
Cita:
Warning: imagecopyresized() [function.imagecopyresized]: Invalid image dimensions in c:\wamp\www\reynierpm\functions.inc.php on line 467

Warning: imagejpeg(): supplied argument is not a valid Image resource in c:\wamp\www\reynierpm\functions.inc.php on line 470
ahora la funcion la llamo de esta forma:
Cita:
CreateThumbnail("images/wallpapers/Abstract_094.jpg");
y esa imagen existe pues ya he revisado eso.

Salu2
__________________
Ing. Reynier Pérez Mira