class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I would like to resize images if they are too small or too large. Right now it works great for images that are too large. However, I would like all image to have max width and height and still keep ratio. This is what I'm using and works great for large images but doesn't make smaller images larger:
You can try one of the following (one at a time):
that worked.