I have UIImagePicker to select the image. After selecting the image I am editing it and now I want to save that image.
Can anyone please tell me how can I save the image to Photo Album?
take a look at this tutorial
here is my code to get image if the image is edited then edited image will be taken into account.
if not edited then original image will be taken
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
UIImage *image;
if (picker.editing == YES) {
image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
}
else {
image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
// [picker release];
// [self dismissModalViewControllerAnimated:YES];
}