CMAttachements中的元数据与UIImagePickerControllerMediaMetadata不同

时间:2016-02-25 17:19:19

标签: ios objective-c avfoundation

比较UIImagePickerAVCaptureStillImageOutput之间的元数据(exif,tiff,...)输出时,存在很大差异。 其中UIImagePickerControllerMediaMetadata提供更完整的元数据列表,尤其是在TIFF字典CMAttachements中,仅提供更有限的列表。 (参见随附的日志。)

有人知道如何使用CMAttachements获得相同的值吗?

我在日志中添加了空白行以显示差异,并从“{MakerApple}”词典中删除了一些值以缩短它。

使用imagePickerController:didFinishPickingMediaWithInfo:时记录:

UIImagePickerControllerMediaMetadata =     {
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" =         {
    ApertureValue = "2.27500704749987";
    BrightnessValue = "4.409059364683346";
    ColorSpace = 1;
    DateTimeDigitized = "2016:02:25 17:58:33";
    DateTimeOriginal = "2016:02:25 17:58:33";
    ExposureBiasValue = 0;
    ExposureMode = 0;
    ExposureProgram = 2;
    ExposureTime = "0.02439024390243903";
    FNumber = "2.2";
    Flash = 9;
    FocalLenIn35mmFilm = 29;
    FocalLength = "4.15";
    ISOSpeedRatings =             (
        25
    );
    LensMake = Apple;
    LensModel = "iPhone 6s back camera 4.15mm f/2.2";
    LensSpecification =             (
        "4.15",
        "4.15",
        "2.2",
        "2.2"
    );
    MeteringMode = 5;
    PixelXDimension = 4032;
    PixelYDimension = 3024;
    SceneType = 1;
    SensingMethod = 2;
    ShutterSpeedValue = "5.345080586698183";
    SubjectArea =             (
        2015,
        1511,
        2217,
        1330
    );
    SubsecTimeDigitized = 682;
    SubsecTimeOriginal = 682;
    WhiteBalance = 0;
};
"{TIFF}" =         {
    DateTime = "2016:02:25 17:58:33";
    Make = Apple;
    Model = "iPhone 6s";
    ResolutionUnit = 2;
    Software = "9.2";
    XResolution = 72;
    YResolution = 72;
};
};
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x127f63d60> size {3024, 4032} orientation 3 scale 1.000000";

使用CMCopyDictionaryOfAttachments(CFAllocatorRef allocator, CMAttachmentBearerRef target, CMAttachmentMode attachmentMode)时记录:

{
DPIHeight = 72;
DPIWidth = 72;
Orientation = 6;
"{Exif}" =     {
    ApertureValue = "2.27500704749987";
    BrightnessValue = "8.277120178672819";



    ExposureBiasValue = 0;
    ExposureMode = 0;
    ExposureProgram = 2;
    ExposureTime = "0.002577319587628866";
    FNumber = "2.2";
    Flash = 9;
    FocalLenIn35mmFilm = 29;
    FocalLength = "4.15";
    ISOSpeedRatings =         (
        25
    );
    LensMake = Apple;
    LensModel = "iPhone 6s back camera 4.15mm f/2.2";
    LensSpecification =         (
        "4.15",
        "4.15",
        "2.2",
        "2.2"
    );
    MeteringMode = 5;
    PixelXDimension = 4032;
    PixelYDimension = 3024;
    SceneType = 1;
    SensingMethod = 2;
    ShutterSpeedValue = "8.60121185236623";
    SubjectArea =         (
        2015,
        1511,
        2217,
        1330
    );


    WhiteBalance = 0;
};
"{TIFF}" =     {



    ResolutionUnit = 2;

    XResolution = 72;
    YResolution = 72;
};
}

感谢您看一下!

0 个答案:

没有答案