菜鸟教程小白 发表于 2022-12-12 12:07:01

ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖?


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

<p> <img src="/image/BebbS.png" alt="revert to original"/> </p>

<ol>
<li>这是否记录在某个地方(从编程的角度)?</li>
<li>可以覆盖原始 Assets 吗?</li>
</ol></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p><code>PHImageManager: requestImageForAsset:</code> <a href="https://developer.apple.com/library/ios/documentation/Photos/Reference/PHImageManager_Class/index.html#//apple_ref/occ/instm/PHImageManager/requestImageForAsset:targetSize:contentMode:options:resultHandler:" rel="noreferrer noopener nofollow">reference documentation</a>给出了这里发生的一些细节。</p>
<p>您似乎永远无法覆盖原始图像数据( Assets 在技术上只是元数据),因为您可以为包含 <code>version</code> 的图像请求指定 <code>PHImageRequestOptions</code> <code>PHImageRequestOptionsVersionOriginal</code>。来自 <code>PHImageRequestOptions</code> <a href="https://developer.apple.com/library/ios/documentation/Photos/Reference/PHImageRequestOptions_Class/index.html#//apple_ref/occ/instp/PHImageRequestOptions/version" rel="noreferrer noopener nofollow">documentation</a> :</p>
<blockquote>
<p>Request the original, highest-fidelity version of the image asset.</p>
<p>The resulting image is originally captured or imported version of the asset, regardless of any edits made.</p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/26370475/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/26370475/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在 PhotoKit 中,修改 PHAsset 会留下原始的。如何?可覆盖?