将 UIImage 以 PNG 格式保存到 iPhone 上的相册
我正在将一些 png 文件合并到 uiimage 中,并按照此线程( UIImageWriteToSavedPhotosAlbum save as PNG 与透明度?)
并尝试通过用我的图像替换此代码来将结果保存为 png 文件:[self composeImageWithWidth:100 andHeight:100)..
当我使用模拟器测试这个时,我转到应用程序支持中的文件夹并在那里找到 png。但是,当我在真实设备上测试时,我在相册中找不到该 png 文件。
可能出了什么问题? 也许是相册的路径?
感谢您的回答
I am merging some png files to a uiimage and I followed this thread ( UIImageWriteToSavedPhotosAlbum save as PNG with transparency? )
and tried to save the result as a png file by replacing this code with my image: [self composeImageWithWidth:100 andHeight:100)..
When I test this using simulator, I go to the folder in application support and find the png there. However when I test this on a real device, I cannot find the png file in my photo album.
What could be going wrong?
Perhaps the paths of photo album?
Thanks for the answers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以使用这个函数:
如果你想在图像保存完成时得到通知,你只需要completionTarget、completionSelector和contextInfo,否则你可以传入nil。
更多信息在这里
You can use this function:
You only need completionTarget, completionSelector and contextInfo if you want to be notified when the image is done saving, otherwise you can pass in nil.
More info here