I am taking pictures from the iPhone camera using the UIImagePickerController Class.
I am using this delegate method for getting the image.
- (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info
{
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
But when I am using that image in an ImageView or sending the image data to some url, the image is appearing rotated by 90 degree.
What is the issue ? Am i doing it correctly ?
Thanks
You need to rotate the picture yourself depending on your orientation.
Use this Code (it may also resize your picture) I found it somewhere in the net, but cannot remember where: