![](/img/trans.png)
[英]iPhone, how does one read an image from the photo library as NSData?
[英]iPhone How to get image back from NSData
在我的iPhone應用程序中,我將圖像存儲到NSData
UIImage *image =imageView.image;
NSData *myData = UIImagePNGRepresentation(image);
但是如何從“ NSData
”獲取“圖像”,我可以再次將其顯示到UIImageView
。
請幫助和建議,謝謝。
你試過+[UIImage imageWithData:]
嗎?
UIImage *img=[UIImage imageWithData:data];
[yourImageView setImage:img];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.