So you don't know how to determine orientation or your code isn't working? If it's the former, have you tried using the ImageSX and ImageSY functions?
If it's something in the code that's not working, you're going to have to post the relevant parts before anyone can help you.Code:$img_path = "images/picture.jpg"; $extension = strtolower(substr($img_path, -3)); if ($extension = "gif") { $src_img = ImageCreateFromGIF("$img_path") } else { $src_img = ImageCreateFromJPEG("$img_path") } If (ImageSX($src_img) > ImageSY($src_img)) { //Image is wider than it is tall } else { //Image is taller than it is wide (or the sides are of equal length) }



LinkBack URL
About LinkBacks

Reply With Quote

Bookmarks