How to get UIImage from Base64String source image data on iPhone?
In my application, I am receiving image data from the server in an XML file. This data has an image (.jpeg or .png or .tiff, etc.) that the server converts to Base64String format bytes for sending to my application via an XML file. On my application side, the application stores these bytes as "NSData" in the database. Now my application should get and display the image in the last part. But I was unable to figure out how to get the UIImage from this raw64String data format? Please help me in this regard, as I am "just" a developer in the world of iPhone application development.
Thanks for reading and I appreciate any help.
a source to share
This page on the CocoaDev wiki contains several implementations of base64 decoding from strings. The NSData category at the bottom of the page is probably the easiest to integrate into your application.
From there, you can retrieve the NSData representation of the base64 encoded string. NSData can be used to initialize a UIImage instance using the UIImage constructors imageWithData: or initWithData :.
a source to share