Image GD resize to 100px while keep the ratio

dotty picture dotty · Sep 3, 2009 · Viewed 29.6k times · Source

Basically I want to upload an image (which i've sorted) and scale it down to certain constraints such as max width and height but maintain the aspect ratio of the original image.

I don't have Imagick installed on the server - otherwise this would be easy.

Any help is appreciated as always. Thanks.

EDIT: I don't need the whole code or anything, just a push in the right direction would be fantastic.

Answer