cgm225 Posted June 14, 2007 Share Posted June 14, 2007 Do any of you have a good technique by which I can figure out if a JPG is portrait or landscape in orientation, possibly a function? Thank you all in advance! cgm225 Quote Link to comment https://forums.phpfreaks.com/topic/55503-solved-determine-orientation-of-jpg-portrait-or-landscape/ Share on other sites More sharing options...
papaface Posted June 14, 2007 Share Posted June 14, 2007 All youd have to do is see if the width is longer than the length for landscape, and for portrait see if the length is longer than the width. You can do this with an if statement and using this function http://uk2.php.net/manual/en/function.getimagesize.php Quote Link to comment https://forums.phpfreaks.com/topic/55503-solved-determine-orientation-of-jpg-portrait-or-landscape/#findComment-274282 Share on other sites More sharing options...
cgm225 Posted June 14, 2007 Author Share Posted June 14, 2007 thank you! Quote Link to comment https://forums.phpfreaks.com/topic/55503-solved-determine-orientation-of-jpg-portrait-or-landscape/#findComment-274639 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.