Guys
The following Code is what I used to take a photo display it in an imageview and save it
the problem is when i take the photo the square editing box comes up and it only saves the square part but it displays it fine in the imageview.
Problem is if i remove the allows editing or change it to NO it saves the full photo fine but it doesnt display it in the imageview.
I want to be able to take a full size photo and save it
any ideas where I am going wrong?
Any help appreciated
Mark
The following Code is what I used to take a photo display it in an imageview and save it
Code:
// BUTTON CODE
- (IBAction)takePhoto:(id)sender {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
}
// SAVE PHOTO
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
self.imageView.image = chosenImage;
[picker dismissViewControllerAnimated:YES completion:NULL];
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(chosenImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
the problem is when i take the photo the square editing box comes up and it only saves the square part but it displays it fine in the imageview.
Problem is if i remove the allows editing or change it to NO it saves the full photo fine but it doesnt display it in the imageview.
I want to be able to take a full size photo and save it
any ideas where I am going wrong?
Any help appreciated
Mark