ejjerbi
ejjerbi

Reputation: 1

convert to an UIImage (iPhone) a data stream from an asp.net web service

I developed an asp.net web service that send an image and i want to convert the received data stream to an UIImage in my iPhone

this is a sample of what i get from the web service

R0lGODlhbQCdAOYA...KsxbcSAAOw==

thank you in advance !

Upvotes: 0

Views: 672

Answers (2)

Stelian Iancu
Stelian Iancu

Reputation: 2492

And in order to encode/decode Base64 encoded strings into NSData, see the following post. At the end there's a link to a NSData category that does Base64 encoding/decoding.

Upvotes: 0

JustSid
JustSid

Reputation: 25318

This is an base64 encoded string, so you need to first decode it and then put it into an NSData object. The next thing is to create an UIImage from the NSData object, this can be done like this:

NSData *myData;
UIImage *image = [UIImage imageWithData:myData];

Upvotes: 3

Related Questions