Cluster ya he resuelto el problema de la librería gráfica, esta es la parte del php.ini donde se pone lo de la directiva:
Cita: GD Support enabled
GD Version bundled (2.0.22 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
ahora el código sigue siendo el mismo:
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;
}else{
echo "Los tamaños de la imagen original son incorrectos.";
$new_width = $width;
$new_height = $height;
}
$new_img = imagecopyresized($imagen, $img, 0,0,0,0, $width, $height, $new_width, $new_height);
header("Content-type: image/jpeg");
imagejpeg($new_img);
}
y lo llamo de esta forma:
Cita: CreateThumbnail("01.jpg");
pero ahora me da este error:
Cita: Los tamaños de la imagen original son incorrectos.
que puede ser ahora??
Salu2