1

I am working on an application where i am picking up images from iphone library using uiimagepicker control. I am using following code to pick up image.

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSLog(@"image picked:");

UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
//UIImageWriteToSavedPhotosAlbum(image, self, nil, nil);
CGRect cropRect;
cropRect = [[info valueForKey:@"UIImagePickerControllerCropRect"] CGRectValue];

}

The above method works perfect when I capture an image from camera but when I pick an image from iphone library, the cropRect gives me incorrect values. It is always set to x = 43 or greater, even if I pick the rectangle from extreme left of the screen. So as a result I am getting a vertical black strip on left side of the image.

thanks in advance

pankaj
  • 7,878
  • 16
  • 69
  • 115
  • http://discussions.apple.com/thread.jspa?threadID=1630519&start=15&tstart=0 i found this post which is addressing my problem but it has not provided any solution to me. The images from the camera roll are coming fine for me but others are not. what should i do now to correct it? – pankaj Nov 04 '10 at 07:24
  • I am using iOS 4.2, and having everything perfect. x = 0. – karim Apr 06 '11 at 11:05
  • related infuriating bug: http://stackoverflow.com/questions/19397873/uiimagepickercontroller-bug – Fattie Mar 01 '14 at 15:42

0 Answers0