Search code examples
c#xamarin.iosuiimageuiimagepickercontrollerxamarin-studio

While using UIImagePickerController in Xamarin.iOS, when I select any front cam image, it gets rotated 90 degrees counter clockwise


I am using Xamarin Studio an UIImagePickerController to pick an Image from the Gallery and put that Image on a UIButton. Everything seems to work fine, but whenever I select an Image captured by the front cam in Portrait mode, the image automatically gets rotated by 90 degrees counter clockwise. Can anybody help me with the C# code for making the rotation right. I referred to many answers for this, but nothing seems to workout.


Solution

  • see https://gist.github.com/unhappy224/0979b5c83bab14578254

    you should fix image orientation