0

I am trying to use MFMailComposeViewController to email an image as attachment.

Everything else is fine, except that the correct image orientation is not being read from the exif data. An image which should be in portrait orientation gets shown/mailed in landscape right orientation, which is the actual orientation of an image captured in iOS.

I checked the mime type, I am using 'image/jpeg' for a jpeg image. Which is correct it seems. I tried dumping the image data which I am attaching to the mail just before sending, the dumped image gets shown correctly in mac. If I try opening the image in received mail, it shows the correct orientation.

What could be going wrong?

neeraj
  • 1,191
  • 4
  • 19
  • 47
  • neeraj, did you ever work out what's going on and how to solve it? I'm having the same problem, I think. I shoot the photo in portrait and when I hand it to the MFMailComposeViewController, it displays it in landscape and when it is received in my PC based E-Mail, it is in landscape. – Gallymon Nov 26 '13 at 21:36
  • I haven't figured it out. But I have seen other apps not facing the same issue, so maybe the way orientation in the exif is being saved is not in the way that iOS expects it. The image orientation is always landscape, whatever the orientation of the device be while capturing. Orientation is read from the exif and image is rotated while displaying on screen. But this rotation is not happening in our case. – neeraj Nov 27 '13 at 05:26
  • 1
    neeraj, I did, finally, work this problem out to a good solution [here](http://stackoverflow.com/questions/20204495/mfmailcomposeviewcontroller-image-orientation). Cheers, from New Zealand. – Gallymon Dec 05 '13 at 15:51

0 Answers0