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, $img, 0,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