Well this may be a very easy Question but I'm not getting the answer after searching a lot.
I have one application in which I send the image taken from camera. The path of image captured from camera is stored in database. So in mail attachment code I load image from path and attach like this:
UIImage *myImage = [UIImage imageWithContentsOfFile:ImagePath];
NSData *imageData = UIImagePNGRepresentation(myImage);
[mailer addAttachmentData:imageData mimeType:@"image/png" fileName:@"Spotted"];
but the image is rotated by 90 Degree left every time. Can anyone guide me what am I doing wrong here??
P.S.: NSLog
of ImagePath
-->
/var/mobile/Applications/4BFB1BD9-DD83-42AF-A2BF-A5E4CC0DEAE3/Documents/459443.png