0

Whenever I make the me/photos call to the Facebook server in my iOS app, the image uploads but is consistently in the wrong orientation. I'm using AVCapture to take photos in the app, and any saved photos are in the correct orientation.

How can I get the uploaded image to be in the correct orientation?

The Kraken
  • 3,158
  • 5
  • 30
  • 67

1 Answers1

0

You will need to translate the image based on its EXIF code. See the answer here for working code to translate the image: iOS UIImagePickerController result image orientation after upload

Community
  • 1
  • 1
Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58
  • That answer seems to reference a problem with iOS 5. Are you sure that it will work? – The Kraken Apr 28 '12 at 11:18
  • Without your source code I cannot be certain of anything. However, based on what you describe I am 99% sure it should. UIImageViews will handle the translation auto-magicaly for you - but not the case if you upload an image elsewhere like to Facebook for example. So translating the image based on the EXIF tag has nothing to do with iOS 5. – Jeshua Lacock Apr 28 '12 at 22:25
  • I gave the code you referenced a try, but it simply caused a black square to be uploaded to Facebook. – The Kraken Apr 28 '12 at 23:59
  • Well you will have to trouble shoot it if you want to get it working. – Jeshua Lacock Apr 29 '12 at 02:34
  • Did you create a category for it? Or how did you implement the code? – Jeshua Lacock Apr 29 '12 at 09:01