2

我想得到UIImagePickerControllerOriginalImageUIImagePickerControllerReferenceURL当我下载图像并将其保存到相册时..

谁能建议找到这两个参数的正确方法?

如果我使用方法“

[library writeImageToSavedPhotosAlbum:[viewImage CGImage] orientation:(ALAssetOrientation)[viewImage imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error)

我会得到“UIImagePickerControllerReferenceURL”,如果我使用

UIImageWriteToSavedPhotosAlbum([UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.imageURL]]], testOriginalImage, @selector(image:didFinishSavingWithError:contextInfo:), nil)

我会得到“UIImagePickerControllerOriginalImage”

怎么做才能两者兼得?

4

1 回答 1

3

如果你打电话:

[library writeImageToSavedPhotosAlbum:[viewImage CGImage] orientation:(ALAssetOrientation)[viewImage imageOrientation] completionBlock:^(NSURL *assetURL, NSError *error)

然后你得到/拥有两者。是assetURLUIImagePickerControllerReferenceURLviewImage相同UIImagePickerControllerOriginalImage

于 2013-04-15T04:51:56.043 回答