UIImagePickerController run out of memory with camera source
I got a big performance issue using UIImagePickerController and saving the image on disk. I can't figure out what I am doing wrong. Here is my code: - (void)imagePickerController:(UIImagePickerController *)pick didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)]; iPixAppDelegate *delegate = (iPixAppDelegate *)[[UIApplication sharedApplication] delegate]; [delegate addPicture:imageData]; } The addPicture method creates a new picture object that