What would be the best way to auto format images, uploaded by the visitors to a site, using PHP? WordPress seems to have lots of plugins for this but am having trouble finding a way to do this in PHP. Thank you for your time.
Have you looked at PHP's GD image manipulation library? http://php.net/manual/en/book.image.php http://php.net/manual/en/intro.image.php
You'll have to use an image manipulation library like GD. Even with GD, there is a little bit of work involved to get it to do the kinds of manipulations that you want. I have found the SimpleImage class to be helpful: https://gist.github.com/miguelxt/908143