Monday, July 13, 2009

Is there a way to autoresize uploaded pictures in php?

I%26#039;m doing work for a guy who owns http://www.gravureidols.net and he can%26#039;t program. I created this blog-like website using a template I found so all he has to do is upload the pictures. But he has to resize them in Photoshop which he hates. He wants them to be autoresized by the server after he uploads them. And he%26#039;s using php and only has a standard web hosting without the ability to run any unix commands. So how do I autoresize the images using php? Thank you.



Is there a way to autoresize uploaded pictures in php?





You could do it through the GD functions, starting with the imagecreatetruecolor or imagecreatefrom[gd/gif/jpeg/png/wbmp/xbm... function and ending with image[gd/jpeg/png/wbmp/xbm] with imagecopyresized in between. I don%26#039;t have the details, but they%26#039;re pretty well documented on php.net

No comments:

Post a Comment