Computer Hope

Internet & Networking => Web design => Topic started by: yanng1 on November 10, 2009, 12:06:50 PM

Title: PHP Resize image
Post by: yanng1 on November 10, 2009, 12:06:50 PM
My client wanted a photo album- i built it in PHP and SQL.  It is sweet and small BUT- the administrator at client-side, is uploading photos of about 2MB.   Hence, when a view looks at the photo gallery, the load time is painful. 

I would like to solve this problem using this approach:
1) Still let users upload these large pictures.
2) Use PHP to shrink the photos down 50% once they are on the server.

I don't know how to reduce and images ACTUAL size.  I don't mean Scale, to be clear.
does anyone here know?
Title: Re: PHP Resize image
Post by: Bannana97 on November 13, 2009, 06:54:24 AM
Have a look at http://us.php.net/manual/en/function.imagecopyresized.php (http://us.php.net/manual/en/function.imagecopyresized.php)