1

In my app, I have a feature where you can share a photo to facebook. Before sharing, you can take a photo from the camera, or choose a photo from the photo library. Also, after you chose the photo, you can "edit" it (square crop <-- this is the basic feature that comes with the imagepicker).

Now, my question is, in my photo library, I have some photos that are in landscape, and I want to rotate them upwards before showing the "edit" screen. Is it possible?

I noticed that when you take a photo with the camera in landscape, the imagepicker auto rotates the photo upwards. But when I pick a photo that is in landscape in my library, it's not upwards.

Any tips would be appreciated. Thanks,

Van Du Tran
  • 6,736
  • 11
  • 45
  • 55

2 Answers2

2

You can only rotate the photo after the user has selected it from the image picker. Or the user must rotate it using the photos app beforehand.

Felix
  • 35,354
  • 13
  • 96
  • 143
  • "Or the user must rotate it using the photos app beforehand." That can be done only outside of my app right (that means from Apple's photo app only)? Is there a way to do the rotate image inside my app when the user is picking the photo from the library? – Van Du Tran Mar 05 '12 at 23:01
  • As I said only after image picking has finished including editing ( imagePickerController:didFinishPickingMediaWithInfo ) – Felix Mar 05 '12 at 23:07
0

Not sure if you're still running into this problem, but I figured I'd share some of my knowledge just in case you're still wondering...

I ran into this problem a while back with rotating images in iOS and ended up doing a lot of research into it.

Perhaps my SO question iOS PNG Image rotated 90 degrees and the code I used to rotate the image will help?

Community
  • 1
  • 1
Boeckm
  • 3,264
  • 4
  • 36
  • 41