BTMExpert
asked on
xcode how to save an image
how do you save an image after you take a picture? In my app i'm using an UIImagePickerController that takes the picture but i don't know how to save the image.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe, because of that line: [image autorelease];
try to cmment it. If it does not help, comment the alert (all lthree lines about the alert).
try to cmment it. If it does not help, comment the alert (all lthree lines about the alert).
ASKER
i took the [image release]; out and it works now. Thanks a lot!!!!!!!
ASKER
- (IBAction)saveImage {
UIImage *image = imageView.image;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Image" message:@"Image" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
UIImageWriteToSavedPhotosA
}
- (void)image:(UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo {
NSLog(@"SAVE IMAGE COMPLETE");
if(error != nil) {
NSLog(@"ERROR SAVING:%@",[error localizedDescription]);
}
[image autorelease];
}