How to convert NSData value to UIImage [duplicate]

2019-04-29 00:45发布

问题:

Possible Duplicate:
NSData to UIImage

How do I convert a NSData value to UIImage?

回答1:

You can get UIImage from NSData as follows:

NSData *data = yourData;

UIImage *image = [UIImage imageWithData:data];

or

NSData *data = yourData;

UIImage *image = [[UIImage alloc] initWithData:data];
....
[image release];