Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How can I create a UIImage from a base64 string?

$
0
0

I currently tried to do this:

var base64image = "/9j/4AAQS ...ETC... iIiIiIiIiIi/9k=";
NSData image = new NSData(base64image, NSDataBase64DecodingOptions.None);
var uiImage = UIImage.LoadFromData(image);

But I get this error:

System.Exception: Could not initialize an instance of the type 'MonoTouch.Foundation.NSData': the native 'initWithBase64EncodedData:options:' method returned nil.

Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>