Re: No me funciona imagecreatejpeg()
| From: | Pep Jover | Date: | Thu, 24 Jan 2002 08:37:49 +0000 |
| Subject: | Re: No me funciona imagecreatejpeg() | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-18330@lists.php.net to get a copy of this message | ||
Según el mensaje de error, no compilaste el PHP con soporte para JPG.
Eso puede ser debido a:
a) tu versión de la librería gd es inferior a la 1.8 (con lo cual, soportas
.GIF pero no .JPG ni .PNG)
b) tu versión de PHP es inferior a 3.0.16 o 3.0.18 (PHP3) o no es PHP4
c) no compilaste el PHP con la opción --with-jpeg-dir
Si te miras el manual online (versión inglés) verás que este mismo problema
lo han sufrido otros usuarios... :)
http://www.php.net/manual/en/function.imagecreatefromjpeg.php
Un saludo,
----- Original Message -----
From: "Borja Martín" <dagi3d@dagi3d.net>
To: "Php" <lista@phpes.com>
Sent: Thursday, January 24, 2002 9:03 AM
Subject: [PHP-ES] No me funciona imagecreatejpeg()
Hola. Tengo el siguiente script:
if($img != ""){
$src_img = imagecreatejpeg("../pics/noticias/".$img);
$new_w = 140;
$new_h = 20;
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),i
magesy($src_img));
imagejpeg($dst_img, "../noticias/destacados/noticias/pics/".$img);
}
y me da los siguientes errores:
Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/www/www.dagi3d.net/lw/admin/add_noticia_destacada.php on line 27
Warning: Supplied argument is not a valid Image resource in
/www/www.dagi3d.net/lw/admin/add_noticia_destacada.php on line 31
Warning: Supplied argument is not a valid Image resource in
/www/www.dagi3d.net/lw/admin/add_noticia_destacada.php on line 31
Warning: Supplied argument is not a valid Image resource in
/www/www.dagi3d.net/lw/admin/add_noticia_destacada.php on line 31
Warning: ImageJpeg: No JPG support in this PHP build in
/www/www.dagi3d.net/lw/admin/add_noticia_destacada.php on line 32
A simple vista parece que el servidor no tiene instaladas la libreria gd,
pero no es asi, y ademas tiene habilitadas las funciones imagecreate,
imagecreatefromjpeg ... etc.
aqui se pueden ver las extensiones cargadas y con las funciones de gd
disponibles:
http://dagi3d.net/lw/admin/funciones.php
Alguna idea de porque puede ser? El servidor en concreto es IslaWeb.
Saludos