Начиная с iOS 4.1, вы можете получить метаданные изображения для фотографии, снятой с помощью клавиши UIImagePickerControllerMediaMetadata
.
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSDictionary *metadataDictionary =
(NSDictionary *)[info valueForKey:UIImagePickerControllerMediaMetadata];
// do something with the metadata
}
Если вы зарегистрируете выходной сигнал [info description]
, вы сможете увидеть вседоступные метаданные -
UIImagePickerControllerMediaMetadata = {
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" = {
ApertureValue = "2.970853654340484";
ColorSpace = 1;
DateTimeDigitized = "2011:01:21 06:20:36";
DateTimeOriginal = "2011:01:21 06:20:36";
ExposureMode = 0;
ExposureProgram = 2;
ExposureTime = "0.01666666666666667";
FNumber = "2.8";
Flash = 32;
FocalLength = "3.85";
ISOSpeedRatings = (
100
);
MeteringMode = 1;
PixelXDimension = 2048;
PixelYDimension = 1536;
SceneType = 1;
SensingMethod = 2;
Sharpness = 1;
ShutterSpeedValue = "5.906892602837797";
SubjectArea = (
1023,
767,
614,
614
);
WhiteBalance = 0;
};
"{TIFF}" = {
DateTime = "2011:01:21 06:20:36";
Make = Apple;
Model = "iPhone 3GS";
Software = "4.2.1";
XResolution = 72;
YResolution = 72;
};
};