IMAGE COPY PROBLEM !!! PLEASE HELP !!!
| From: | Giulio Borrini | Date: | Fri, 27 Oct 2000 08:01:53 +0000 |
| Subject: | IMAGE COPY PROBLEM !!! PLEASE HELP !!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22292@lists.php.net to get a copy of this message | ||
> PLEASE REPLY TO MY EMAIL ADRESS
>
> Hi guys i have this problem:
>
> from a file input of a form i get an image called $img.
> I want to copy it to a dir and then resize it. I use this:
>
> if($img_name)
> {
> $filename="/www/newWWW/superbici/images_bike/".$img_name;
> copy($img,$filename);
> chmod($filename,0777);
> ImageCopy($filename,$filename,0,0,0,0,400,400);
> }
>
> but it return to me:
>
> Warning: Supplied argument is not a valid Image resource in
> /www/newWWW/superbici/admin/ins_prodotti.php3 on line :
> "ImageCopy($filename,$filename,0,0,0,0,400,400); "
>
> I'm sure that the file exist and it is a regural jpeg.
>
> Any IDEA?
>
> THANKS IN ADVANCE
> -------------------------------------------------------------------
> Giulio Borrini WebProgrammer
> Marketingmedia S.p.A Phone +39-0521-77.46.41
> Via S. Leonardo, 95 Fax +39-0521-77.19.90
> 43100 - Parma - ITALY gborrini@marketingmedia.it
>
> -------------------------------------------------------------------
>