I am trying to either find a way to calculate the width and height ratio of an image so if I resize the image, it will proportionally resize correctly. Is there such a script?
For example an image is 500x750 and the container that holds the image is maximum 350 width...So I need the script to calculate what the height should be in proportion to the 350 width.
Thanks.