【问题标题】:Load image from a stored png从存储的 png 加载图像
【发布时间】:2011-05-27 22:13:14
【问题描述】:

如何加载或获取保存到磁盘的图像?

我使用 NSData 和 PNG 表示将图像写入文档文件路径。如何恢复此图像? UIImage.

【问题讨论】:

    标签: iphone


    【解决方案1】:
    UIImage *theImage = [UIImage imageWithContentsOfFile:filePath];
    

    与以往一样,请访问 Apple 的 UIImage documentation。是你的朋友。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-19
    • 1970-01-01
    • 2015-01-30
    • 1970-01-01
    • 2018-06-27
    • 2015-10-24
    相关资源
    最近更新 更多