我正在使用ios CGImageSourceCopyPropertiesAtIndex爲ios上的圖像提取大量元數據。但我無法提取所有元數據,如Mac Preview應用程序或exiftool命令中顯示的元數據。從元數據中提取圖像圖片樣式
我很少思考「圖片風格」和「佳能」信息。
如何我讀的元數據:
NSURL *imageFileURL = [NSURL fileURLWithPath:filePath];
CGImageSourceRef imageSource = CGImageSourceCreateWithURL((CFURLRef)CFBridgingRetain(imageFileURL), NULL);
CFDictionaryRef props = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL);
NSLog(@"%@", props);
任何人有提示嗎?
這是使用預覽
這是從NSLog的信息的信息:
2013-04-02 09:50:06.885 i2[67169:1f0f] {
ColorModel = RGB;
DPIHeight = 72;
DPIWidth = 72;
Depth = 8;
Orientation = 1;
PixelHeight = 1728;
PixelWidth = 2592;
"{Exif}" = {
ApertureValue = "5.375";
BodySerialNumber = 1280809746;
ColorSpace = 1;
ComponentsConfiguration = (
1,
2,
3,
0
);
CustomRendered = 0;
DateTimeDigitized = "2012:12:24 12:58:46";
DateTimeOriginal = "2012:12:24 12:58:46";
ExifVersion = (
2,
3
);
ExposureBiasValue = 0;
ExposureMode = 1;
ExposureProgram = 1;
ExposureTime = "0.003125";
FNumber = "6.3";
Flash = 16;
FlashPixVersion = (
1,
0
);
FocalLength = 22;
FocalPlaneResolutionUnit = 2;
FocalPlaneXResolution = "2857.773";
FocalPlaneYResolution = "2904.202";
ISOSpeedRatings = (
3200
);
LensModel = "EF-S10-22mm f/3.5-4.5 USM";
LensSpecification = (
10,
22,
0,
0
);
MeteringMode = 5;
PixelXDimension = 2592;
PixelYDimension = 1728;
SceneCaptureType = 0;
ShutterSpeedValue = "8.375";
SubsecTime = 35;
SubsecTimeDigitized = 35;
SubsecTimeOriginal = 35;
WhiteBalance = 1;
};
"{IPTC}" = {
StarRating = 0;
};
"{TIFF}" = {
DateTime = "2012:12:24 12:58:46";
Make = Canon;
Model = "Canon EOS 7D";
Orientation = 1;
ResolutionUnit = 2;
XResolution = 72;
YResolution = 72;
"_YCbCrPositioning" = 2;
};
}
不確定你使用這些數據,但圖像不能保證包含任何元數據或exif數據,更不用說它不是一個標準,所以每個圖像可能會有所不同。 – Tim 2013-03-25 21:10:41
我試圖提取外部相機拍攝的照片信息。當在桌面程序中這樣做時,比使用CGImageSourceRef時更多的信息是可用的。所以想知道是否可以使用現有的庫來獲取更多的信息。 – stoffer 2013-03-27 07:47:21