Am developing an application with Titanium. I need to convert base64 string which i would be getting from JSON to an image.
Your help would be greatly appreciated.
Am developing an application with Titanium. I need to convert base64 string which i would be getting from JSON to an image.
Your help would be greatly appreciated.
You can just create an
img
element and change itssrc
with the required data:For Titanium, you use the built in conversion utility
Titanium.Utils.base64decode
:This converts a base64 string to a blob, which can be used in an ImageView.