Re: Working with images
| From: | Iv�n Milanez Castellanos | Date: | Tue, 02 Oct 2001 23:37:32 +0000 |
| Subject: | Re: Working with images | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-9658@lists.php.net to get a copy of this message | ||
Alex: the function ImageCreateFromJPG() does not exist... the function you
are trying to use is ImageCreateFromJPEG().
This information is located in the online manual in the Image manipulation
section of the function reference.
Later
"Alex Busquets" <alex@triplevedoble.net> wrote in message
news:3BB8F736.2030401@triplevedoble.net...
> 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
>