Copy an resized uploaded Image on the server

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-04-2005
Christian Giordano
 
Posts: n/a
Default Copy an resized uploaded Image on the server

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 }
Reply With Quote
  #2 (permalink)  
Old 02-06-2005
Andy Hassall
 
Posts: n/a
Default Re: Copy an resized uploaded Image on the server

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
Reply With Quote
  #3 (permalink)  
Old 02-09-2005
Christian Giordano
 
Posts: n/a
Default Re: Copy an resized uploaded Image on the server

> 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 }
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:16 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0