如何获取捕获图像设备上的路径?我正在显示图像,下面我有开关,何时关闭我显示项目的默认图像,何时打开我想显示用户捕获的图像。在捕获功能中,我可以将图像设置为我的 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>";
}
但我找不到任何可以用来寻找路径的东西。如何找到图像的路径,以便稍后重新加载相同的图像?