Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert NSData value to UIImage [duplicate]

Possible Duplicate:
NSData to UIImage

How do I convert a NSData value to UIImage?

like image 811
iosDev Avatar asked Apr 11 '12 07:04

iosDev


1 Answers

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];
like image 105
Ilanchezhian Avatar answered Nov 09 '22 01:11

Ilanchezhian