This is a discussion on Copy an resized uploaded Image on the server within the PHP Language forums, part of the PHP Programming Forums category; I was playing with GD library and after having found a script to resize an image the question is, how ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I was playing with GD library and after having found a script to resize
an image the question is, how to overwrite it? At the moment I'm playng with an image already on the server but my intention is to resize an uploaded one. I tried with: imagejpeg($thumb); // it works copy($thumb, "resutl.jpg");// in this case it has a new name so it is not an overwriting but it doesn't anyway. unlink($thumb); Thanx all, chr -- __________________________________________________ _________________ { Christian Giordano's site and blog @ http://cgws.nuthinking.com } |
|
|||
|
On Fri, 4 Feb 2005 16:57:36 +0000 (UTC), Christian Giordano
<ur_mother_likes_spam@yes_she_likes_it.com> wrote: >I was playing with GD library and after having found a script to resize >an image the question is, how to overwrite it? At the moment I'm playng >with an image already on the server but my intention is to resize an >uploaded one. > >I tried with: > >imagejpeg($thumb); // it works > >copy($thumb, "resutl.jpg");// in this case it has a new name so it is >not an overwriting but it doesn't anyway. > >unlink($thumb); Use the $filename argument of imagejpeg() to write it over the original filename. -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |
|
|||
|
> Use the $filename argument of imagejpeg() to write it over the original
> filename. Since I don't need to visualize the image now it seems works properly... thx to everyone! chr -- __________________________________________________ _________________ { Christian Giordano's site and blog @ http://cgws.nuthinking.com } |