Asset URL不能转化为image。当用ALAsset获取
+ (UIImage *)fullResolutionImageFromALAsset:(ALAsset *)asset
{
ALAssetRepresentation *assetRep = [asset defaultRepresentation];
CGImageRef imgRef = [assetRep fullResolutionImage];
UIImage *img = [UIImage imageWithCGImage:imgRef
scale:assetRep.scale
orientation:(UIImageOrientation)assetRep.orientation];
return img;
}
另使用此库需注意,iOS4、5需向用户申请GPS权限才可访问照片。iOS6下申请相册访问权限才可访问照片。