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.
more info about the class
See all posts Reply
if($handle->image_src_x > $handle->image_src_y) {.... } //this means landscape if($handle->image_src_x < $handle->image_src_y) {..... } //this means portrait
what i want to do is if the image has a height larger than the width (meaning portrait)
i want to crop the width at 400px and height on auto.
then if the width is bigger than the height, to do 400 on height and width auto.
for whoever else is wondering.