PDA

View Full Version : Resizing an image through PHP



0_o
14 Apr 2006, 08:27 AM
Ok, I'm trying to make a thumbnail image of every image for my image gallery when it gets uploaded. Do you know if there's a way I can duplicate an image through PHP to make a thumbnail?

I don't want to use height and width functions of HTML images because you would still have to load the full image, which would use bandwidth and take a while.

Thanks!

-0_o

cdwhalley.com
16 Apr 2006, 05:26 PM
I think you would need the GD library installed on your server. Run a .php page just with phpinfo() on it to get a list of the libraries installed if we are talking about not locally hosted.

For info on the GD library and how to use it - php.net documentation - image functions (http://uk2.php.net/manual/en/ref.image.php)