I'm currently trying to get the aspect ratio of an image using PHP. For example, using those values :
$thumb_width = 912;
$thumb_height = 608;
I would be able to get the aspect ratio (16:9, 3:2, 2:3, etc.). So in this case :
$ratio = '3:2';
The thing is: I don't know what new width or height it will be. so I can't do something like that : (original height / original width) x new width = new height
Any ideas ?
Note: I don't want to resize an image, just calculate its aspect ratio with its width and height.