I am using Xcode 8.3.2 and swift 3.1 in one of my application when I am converting the camera image into base64 and posting to server.In server the base 64 string is converted to image which gets rotated by 90 degree left I try so many method to fix this issue but did not working any one
Asked
Active
Viewed 975 times
1
-
1Possible duplicate of [iOS Image Orientation has Strange Behavior](http://stackoverflow.com/questions/10600613/ios-image-orientation-has-strange-behavior) – Moin Shirazi May 16 '17 at 08:13
-
i have tried the options given in the above page,but no luck!! – KnightOwl May 16 '17 at 18:18
1 Answers
1
The orientation is stored separate from the image data in
UIImage.imageOrientation

adamfowlerphoto
- 2,708
- 1
- 11
- 24
-
I have tried to change the orientation to up and tried to convert the base string which dint work too. – KnightOwl May 16 '17 at 09:56
-
Based on what imageOrientation is you need to orientate the image data yourself. – adamfowlerphoto May 16 '17 at 09:58
-
I have tried to rotate the image and then converted to base64 but still no luck! How can we rotate the image data?? any idea is that possible? – KnightOwl May 16 '17 at 18:19