tags:

views:

156

answers:

1

Hi, In my application I m using following codes to crop the captured image :-

-(void)imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo:(NSDictionary *)info {  

    imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];     //=======================================     UIImage *image =imageView.image;     CGRect cropRect = CGRectMake(100, 100, 125,128);     CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], cropRect);     [imageView setImage:[UIImage imageWithCGImage:imageRef]];     CGImageRelease(imageRef);     [picker dismissModalViewControllerAnimated:YES];

}

But my problem is that when I use camera to take photo to crop the captured image it rotates the image to 90 degree towards right , image cannnot display in proper manner and in case I use Photo library it works perfectly. So Can u filter my above codes to know where I m wrong. Please help me out its urgent Thanks In Advance

A: 

Take a look here http://stackoverflow.com/questions/2809948/how-to-crop-image-in-iphone/2810171#2810171

Andiih
However, as both questions contain the phrase "Can u filter my above codes to know where I m wrong" I'm guessing this question isn't new to you!
Andiih