Search code examples
iphoneiosuiimageviewuiimageexif

IOS :Get UIImage Orientation inside a UIImageview with exif data?


I am rotating a UIImageview and the UIImage inside of it. I want to get the orientation of the UIImage after rotating the UIImageview.


Solution

  • You can use myImage.imageOrientation, which will give you the UIImageOrientation.

    OR

    If you used UIImagePickerViewController then use its delegate method

    "imagePickerController:didFinishPickingMediaWithInfo:"

    In This method you can also access the info dictionary

    NSlog(@"%d", [info objectForKey:@"Orientation"]);