The following code snippet will save the image to a file:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *anImage = [info valueForKey:UIImagePickerControllerOriginalImage];
NSData *imageData = UIImageJPEGRepresentation(anImage, 1.0);
NSString *path = NSDocumentDirectory();
NSString *tmpPathToFile = [[NSString alloc] initWithString:[NSString stringWithFormat:@"%@/specificImagedName.jpg", path]];
if([imageData writeToFile:tmpPathToFile atomically:YES]){
//Write was successful.
}
}
And then to recall the image from a file:
NSData *imageData = [NSData dataWithContentsOfFile:tmpPathToFile];
[UIImage imageWithData:imageData];
Finally, this post has a method available that you can incorporate into your project to resize the image.