0

i'm loading photos from my library just fine, but photos coming from he camera don't display in the imageView. I've set allowsImageEditing = YES. I've also used CFShow(info) and the data from the camera is not nil...

 - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{   
    UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"];

    [self.imageView setImage:image];
    [self dismissModalViewControllerAnimated:YES];
    [picker release];   
}
yesimarobot
  • 283
  • 7
  • 16

2 Answers2

0

Did you turn on the allowsEditing property of the UIImagePicker? If not, it's not going to return you an editedImage. You'll probably want:

UIImagePickerControllerOriginalImage

John Wang
  • 6,136
  • 2
  • 28
  • 23
0

I know this is many months later, but I struggled with the same problem and found that though it was asked here many times, it was never answered. Well, I'm happy to say that I figured it out and so am posting it on a few of the nearly-identical questions that come up first on a search.

I posted the full answer here:
didFinishPickingMediaWithInfo return nil photo

Community
  • 1
  • 1
Matthew Frederick
  • 22,245
  • 10
  • 71
  • 97