ios - decodedImage from base64 return nil while after assign into UIImage -


i tried decoded image data nsdata base64encodedstring got nil when putted decodeddata decodedimage

this code

self.base64string = snapshot.value.objectforkey("profileimage") as! string var decodeddata = nsdata(base64encodedstring: snapshot.value.objectforkey("profileimage") as! string, options: nsdatabase64decodingoptions(rawvalue: 0)) var decodedimage = uiimage(data: decodeddata!)  println(decodeddata!) // return <89504e47 0d0a1a0a 0000000d 49484452 00000153 00000116 08020000 0054bce3 fc000000 01735247 4200aece 1ce90000 001c6944 4f540000 00020000 00000000 008b0000 00280000 008b0000 008b0001 904ef7da>  println(decodedimage) // return nil 

any ideas?

thanks!


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -