Thank The Cheese
Registered
I have a PHP script that allows the user to upload an image to have it resized to a more web-friendly size.
Works fine, but at the moment it uses fixed, pre-set width and height values for the outputted image, which will often stretch or squish an image that doesn't fit that aspect ratio.
How does one calculate the aspect radio of an image? It's probably quite a simple equation, but it's beyond me!
Works fine, but at the moment it uses fixed, pre-set width and height values for the outputted image, which will often stretch or squish an image that doesn't fit that aspect ratio.
How does one calculate the aspect radio of an image? It's probably quite a simple equation, but it's beyond me!