Image Orientation (media.selectphoto)

Hello guys,

I was wondering is there any way to detect the orientation property of an image retrieved using media.selectphoto ? 

On iOS every image is 4:3 aspect ratio. If I understand correctly, portrait images are rotated by 90 degrees.

When the image is shown on screen, the OS rotates it back to upright position. 

So is there any way to know whether the image is in portrait or landscape mode? I tried using contentwidth and contentheight to no avail because both portrait and landscape images are stored using same width x height, unless I am missing something ?

Any help is appreciated, Thank you. 

I guess I will answer myself here haha. It seems there was something wrong in my own code. In fact the media API returns the Image in the right orientation, whether portrait or landscape. You can use event.target.height /width to determine what orientation it is in. 

I guess I will answer myself here haha. It seems there was something wrong in my own code. In fact the media API returns the Image in the right orientation, whether portrait or landscape. You can use event.target.height /width to determine what orientation it is in.