gpt4 book ai didi

ios - PHImageManager 获取全尺寸图像

转载 作者:IT王子 更新时间:2023-10-29 05:21:31 29 4
gpt4 key购买 nike

<分区>

我有这个功能可以从 Assets 中获取图像:

func fetchImage(asset: PhotoAsset, size: CGSize, resizeMode: ResizeMode = .Exact, completion: (result: UIImage?) -> Void) {
let photoAsset = asset as! PHAsset
var options: PHImageRequestOptions?
switch resizeMode {
case .Exact:
options = PHImageRequestOptions()
options?.resizeMode = .Exact
case .Default:
options = nil
}
manager.requestImageForAsset(
photoAsset,
targetSize: size,
contentMode: .AspectFill,
options: options
) { [weak self] result, _ in
completion(result: result)
}
}

但是我怎样才能定义获取原始大小的图像呢?

谢谢!

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