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.
So the image will fit within 200x200, and the ratio will be maintained.
This is in the doc by the way: image_ratio if true, resize image conserving the original sizes ratio, using image_x AND image_y as max sizes if true (default: false)Reply
The image could be landscape or portrait and I want the resize to keep image proportions.
How do I resize X OR resize Y to 200 with the other axis set as ratio dependant on which axis is longest in the origional image.
I hope that makes sence.
Use
So the image will fit within 200x200, and the ratio will be maintained.
This is in the doc by the way:
image_ratio if true, resize image conserving the original sizes ratio, using image_x AND image_y as max sizes if true (default: false)
Some how I missed the image_ratio option and was trying to make it work using image_ratio_x and image_ratio_y instead :S