iPhone How to get image back from NSData

ios picture ios · Jan 11, 2011 · Viewed 12.7k times · Source

In my iPhone App I am storing image into NSData by

UIImage *image =imageView.image;

NSData *myData = UIImagePNGRepresentation(image);

But How to get back "image" from "NSData" and I can display it again into in to UIImageView.

Please Help and Suggest, Thanks.

Answer

justin picture justin · Jan 11, 2011

have you tried +[UIImage imageWithData:]?