0
我有一個UIImagePickerController,每當我選擇一張圖片時,我都會得到剪切版本的圖片,我想要完整的圖片,我該怎麼做?從UIImagePickerController獲取完整圖像
- (void)tapSelectAd:(id)sender
{
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
picker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:picker.sourceType];
picker.allowsEditing = YES;
picker.wantsFullScreenLayout = YES;
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *) Picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
UIImage *image=[info objectForKey:UIImagePickerControllerEditedImage];
selectedImage.image = image;
}
1)使用獲取選定圖像的代碼更新您的問題。 2)如果你總是想要原始圖像,你爲什麼要編輯? – rmaddy 2015-01-31 19:37:51
@rmaddy,當我不使用它時,我看不到所選圖像 – redoc01 2015-01-31 19:39:14
如果您想要完整圖像,請不要要求編輯的圖像。使用'UIImagePickerControllerOriginalImage'。 – rmaddy 2015-01-31 19:41:32