Quote:
Originally Posted by Fou-Lu
Simply calculate the width to height ratio. If the width > height, it is in landscape, and you can issue a rotate on the image by 90/270 degrees (depends on how its rotated of course).
|
But this will not work will it as all iPhone, iPads etc the width is always greater than the height...
So how will it know if it needs it rotating.
I know how to rotate using php but how will it automatically know?
How does facebook do it?
Is there a code within the image which can check if its landscape or portrait?
for instance to get mime, width, height etc you can use getimagesize().
is there a way to get the exif information from an image