iOS 8 Photos framework. Access photo metadata

后端 未结 6 1197
臣服心动
臣服心动 2020-12-07 11:33

I\'m looking at replacing ALAssetsLibrary with Photos framework in my app.

I can retrieve photos, collections, and asset sources just fine (even write t

6条回答
  •  爱一瞬间的悲伤
    2020-12-07 12:37

    Better solution i found and worked well for me is:

    [[PHImageManager defaultManager] requestImageDataForAsset:photoAsset
                                                      options:reqOptions
                                                resultHandler:
             ^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
                 CIImage* ciImage = [CIImage imageWithData:imageData];
                 DLog(@"Metadata : %@", ciImage.properties);
             }];
    

提交回复
热议问题