How to display images in imageView with base64 data
I have a server sending images to my client in base64. How (and) can I display them in imageView.
2 Answers
-
you can use : https://developer.appcelerator.com/apidoc/mobile/1.3/Titanium.Utils
base64decode
-
Found out now that it works in 1.3.2 (1.4 RC1).
Ti.Utils.base64decode - in this version returns TiBlob instead of text and it works just fine.
Here a sample:var xdom = xml.documentElement;
var picture = Titanium.Utils.base64decode(xdom.getElementsByTagName('ServerPicture').item(0).text);
row1Image.image = picture;