470,870 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

Script to Resize & Upload photos

Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.

Jon

Apr 5 '06 #1
2 2104
Wei
It is actually very easy if you have GD lib in your php package.

http://us2.php.net/manual/en/functio...opyresized.php

or if you have imagemagick installed, you can use command "convert -resize
a.jpg b.jpg"
On Wed, 05 Apr 2006 09:28:10 -0700, attenborough wrote:
Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.

Jon


Apr 5 '06 #2
at**********@gmail.com schrieb:
Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.


If you want to ask a question in more than one newsgroup please
crosspost (send it to all groups at once) rather than multipost.

You find my answer in alt.php.

--
Markus
Apr 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mandr | last post: by
1 post views Thread by Willoughby Bridge | last post: by
2 posts views Thread by J'son | last post: by
4 posts views Thread by Jim Michaels | last post: by
5 posts views Thread by camphor | last post: by
3 posts views Thread by K. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.