Working with images
| From: | Alex Busquets | Date: | Mon, 01 Oct 2001 23:07:34 +0000 |
| Subject: | Working with images | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-9654@lists.php.net to get a copy of this message | ||
I trying to manipulate images, copy, resize I know for do it, I need GD libraries, I have this libraries into my server, but I have this error always.
Fatal error: Call to undefined function: imagecreatefromjpg() in C:\apache\htdocs\lignea\imatge.php on line 15
How I can define de function
The code script is:
<?php
define("GIF", "1");
define("JPG", "2");
define("PNG", "3");
define("SWF", "4");
$size = GetImageSize($fitxer);
$ext=$size[2];
if($ext == GIF)
$im = ImageCreateFromGIF($fitxer);
else if($ext == JPG)
$im = ImageCreateFromJPG($fitxer);
else if($ext[2] == PNG)
$im = ImageCreateFromPNG($fitxer);
else
print("Imatge no suportada!");
if(!$im)
print("Error al obrir la imatge");
unlink($fitxer);
if($ext[2] == GIF)
ImageGif($im);
else if($ext[2] == JPG) {
Imagejpeg($im,'',20);
ImageDestroy($im);
}
?>
What happens? Thanks