[eluser]TheFuzzy0ne[/eluser]
The longest dimension should be used as your master dimension.
If the height is the largest dimension:
Code:
function getWidth($height)
{
return ($height / 3) * 5
}
If the width is the largest dimension:
Code:
function getHeight($width)
{
return ($width / 5) * 3
}
Just bear in mind that the further the image is away from this ratio, the more image you'll lose when it's cropped.