I am using Xcode 7.3 and ojective-c one of my application when I am converting the camera image into base64 then image will be rotation 90 degree left I try so many method to fix this issue but did not working any one.
Below are the code:
NSString *data64URLString = [NSString stringWithFormat:@"data:image/png;base64,%@", [UIImageJPEGRepresentation(image, 0) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]];
I try all the orientation by this ways but it's not working:
CGImageRef cgRef = image.CGImage;
image = [[UIImage alloc] initWithCGImage:cgRef scale:1.0 orientation:UIImageOrientationDownMirrored];
UIImage *originalImage = image;