473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Copy a 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 }
Jul 17 '05 #1
2 1491

Christian Giordano 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);
Thanx all, chr
--
__________________________________________________ _________________
{ Christian Giordano's site and blog @ http://cgws.nuthinking.com }

imagejpeg($thumb, 'YOUR/PATH/AND/FILENAME.jpeg')

micha

Jul 17 '05 #2
> imagejpeg($thumb, 'YOUR/PATH/AND/FILENAME.jpeg')

it's quite funny that it creates the image but it doesn't show it. The
page in fact says:

The image "http://.....image.php" cannot be displayed, because it
contains errors.

Do you know what it could be?
thx, chr
--
__________________________________________________ _________________
{ Christian Giordano's site and blog @ http://cgws.nuthinking.com }
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christian Giordano | last post by:
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...
1
by: toma | last post by:
Hi! I found out how to manipulate (read,resize, etc..) images using System.Drawin namespace from this site: http://authors.aspalliance.com/chrisg/default.asp?category=9 But i don't know how to...
2
by: Earl Teigrob | last post by:
I have written a photo app that allows the administrator to resize photos in an admin panel above the photo on the page. When the the new size is entered, the data is saved into a datastore and the...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
3
by: Neo Geshel | last post by:
Greetings. I am making an admin interface, which allows me to upload photos to an access DB. The admin interface also needs to display the uploaded photos, but only needs to show them at a...
6
by: Neo Geshel | last post by:
Greetings. I am making an admin interface, which allows me to upload photos to an access DB. The admin interface also needs to display the uploaded photos, but only needs to show them at a...
0
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: Milsnips | last post by:
hi there, i've a function that reads image filenames from database, and displays into a repeater control, but what i'm trying to acheive is as i loop through each filename, i want to resize it...
12
by: mantrid | last post by:
Im trying to move a file but am having luck my code is below. The temp and target paths are valid as they echo correctly. but I cant get the copy() function to work, or the rename() function ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.