gpt4 book ai didi

ios - 从网上下载图片时如何找到 "UIImagePickerControllerOriginalImage"和 "UIImagePickerControllerReferenceURL"

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:10:31 24 4
gpt4 key购买 nike

我想在下载图像并将图像保存到相册时获取 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”

怎么做才能同时获得这两者?

最佳答案

如果你调用:

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

然后你会得到/拥有两者。 assetURLUIImagePickerControllerReferenceURLviewImageUIImagePickerControllerOriginalImage 相同。

关于ios - 从网上下载图片时如何找到 "UIImagePickerControllerOriginalImage"和 "UIImagePickerControllerReferenceURL",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16007666/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com