Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS 8:带过滤器的图像元数据_Ios_Objective C_Metadata_Alassetslibrary - Fatal编程技术网

iOS 8:带过滤器的图像元数据

iOS 8:带过滤器的图像元数据,ios,objective-c,metadata,alassetslibrary,Ios,Objective C,Metadata,Alassetslibrary,我正在使用ALAssetsLibrary从图像中读取图像元数据(如EXIF和XMP): - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { URL* refurl = (NSURL*)[info objectForKey: UIImagePickerControllerReferenceURL]; A

我正在使用
ALAssetsLibrary
从图像中读取图像元数据(如EXIF和XMP):

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    URL* refurl = (NSURL*)[info objectForKey: UIImagePickerControllerReferenceURL];
    ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset)
    {
        NSLog(@"Metadata: %@", myasset.defaultRepresentation.metadata);
    }

    mAssetslibrary = [[ALAssetsLibrary alloc] init];
    [mAssetslibrary assetForURL:refurl
                   resultBlock:resultblock
                  failureBlock:failureblock];
}
对于使用相机拍摄的图像或来自图库的其他图像,这可以正常工作,并显示所有元数据。但对于已过滤的图像(例如,使用iOS照片过滤器),只返回很少的元数据(基本上仅返回图像维度)

访问过滤后的图像数据会返回过滤后的图像,因此图像数据很好,只有元数据丢失:

ALAssetRepresentation *rep = [myasset defaultRepresentation];
[rep getBytes:imageDataBytes fromOffset:0 length:imageDataSize error:nil];
如何获取应用了iOS照片过滤器的图像的元数据


您好,

您现在不能。这是iOS 8中照片API中的许多错误之一。

我已经向苹果提交了一份错误报告。