Page 1 of 1

Image resizing

Posted: Wed Mar 22, 2006 4:27 am
by vivekjain
Hi,

I am creating an application using PHP. I am uploadig and would require 2 things to be done:
1) Can the images be resized when it is uploaded?
2) Can we automatically generate a thumbnail for these images?

Also, is it possible to upload a zip file using PHP?

Thanks

Posted: Wed Mar 22, 2006 4:32 am
by s.dot
#1 yes
#2 yes

#3 yes

:P

Image resizing

Posted: Wed Mar 22, 2006 4:36 am
by vivekjain
Can you please tell me how these can be done?

Thanks.

Posted: Wed Mar 22, 2006 4:38 am
by s.dot
For resizing images, you're going to need to use GD, and the PHP functions that go with it -> Read Here

For uploading zip files, it's just like any other file. Just put it into your form, and upload :P

Image resizing

Posted: Wed Mar 22, 2006 4:54 am
by vivekjain
Thanks for the reply.
I wanted to know once it is zipped, will I be able to unzip it on the server, or will i need to use the server functions to do that?

Posted: Wed Mar 22, 2006 4:59 am
by s.dot
Although I have never unzipped anything it should be possible. I don't believe there are any php functions for it (although there are classes that you can search for)

It also depends on what your server has. for example, if you have the gzip utitlity, you could do something like..

Code: Select all

exec("gzip -d $yourzipfile");
don't quote me on that though :P I'm just throwing ideas out :)

Image resizing

Posted: Wed Mar 22, 2006 7:14 am
by vivekjain
Hi,
I am unable to find a function in the GD Library that would resize an image. Can you please help me with this.

The process is this, I am uploading an image and I need it resize it on the fly.

Thanks

Posted: Wed Mar 22, 2006 8:24 am
by JayBird
search the forum for image resizing, been discussed many times before