Welcome Guest, Not a member yet? Register   Sign In
Resize and maintain the golden ratio (3:5)?
#4

[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.


Messages In This Thread
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 10:30 PM
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 10:48 PM
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 11:07 PM
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 11:19 PM
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 11:25 PM
Resize and maintain the golden ratio (3:5)? - by El Forum - 02-21-2009, 11:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB