OGeek|极客世界-中国程序员成长平台

标题: ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:07
标题: ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖?

似乎对特定 PHAsset 照片的修改以某种方式保留了原始版本,以便能够做到这一点:

revert to original

  1. 这是否记录在某个地方(从编程的角度)?
  2. 可以覆盖原始 Assets 吗?



Best Answer-推荐答案


PHImageManager: requestImageForAsset: ptions:resultHandler:" rel="noreferrer noopener nofollow">reference documentation给出了这里发生的一些细节。

您似乎永远无法覆盖原始图像数据( Assets 在技术上只是元数据),因为您可以为包含 version 的图像请求指定 PHImageRequestOptions PHImageRequestOptionsVersionOriginal。来自 PHImageRequestOptions documentation :

Request the original, highest-fidelity version of the image asset.

The resulting image is originally captured or imported version of the asset, regardless of any edits made.

关于ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26370475/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4