如何獲取拍攝圖像的設備路徑? 我正在顯示圖像和下面我有切換時關閉我顯示項目的默認圖像,當我想顯示圖像哪個用戶捕獲。 在拍攝功能我可以設置圖像到我的ImageView如何找到路徑圖像,以便我可以重新加載後再次相同的圖像?
#pragma mark - UIImagePickerControllerDelegate
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissViewControllerAnimated:YES completion:NULL];
NSLog(@"%@", info);
UIImage * imageTemp = [info objectForKey:UIImagePickerControllerEditedImage];
if (imageTemp == nil)
imageTemp = [info objectForKey:UIImagePickerControllerOriginalImage];
[self.image setImage:imageTemp];
}
,並設置圖像的ImageView,但我沒有路徑。我有打印信息,看起來像
{
UIImagePickerControllerMediaMetadata = {
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" = {
ApertureValue = "2.526068811667588";
BrightnessValue = "5.667090406070278";
ColorSpace = 1;
DateTimeDigitized = "2013:05:14 01:02:48";
DateTimeOriginal = "2013:05:14 01:02:48";
ExposureMode = 0;
ExposureProgram = 2;
ExposureTime = "0.008620689655172414";
FNumber = "2.4";
Flash = 25;
FocalLenIn35mmFilm = 35;
FocalLength = "4.28";
ISOSpeedRatings = (
50
);
MeteringMode = 5;
PixelXDimension = 3264;
PixelYDimension = 2448;
SceneType = 1;
SensingMethod = 2;
ShutterSpeedValue = "6.862622389675391";
SubjectArea = (
1631,
1223,
881,
881
);
WhiteBalance = 0;
};
"{TIFF}" = {
DateTime = "2013:05:14 01:02:48";
Make = Apple;
Model = "iPhone 4S";
Software = "6.1.3";
XResolution = 72;
YResolution = 72;
};
};
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x20ac0470>";
}
但我找不到任何我可以用來找到路徑。如何找到路徑圖像,以便以後可以重新載入相同的圖像?
沒有圖像路徑。你所擁有的只是記憶中的圖像。除非將其保存到文件,否則沒有路徑。 – rmaddy 2013-05-13 23:09:09