iphone - UIImage to base64 String Encoding -


how convert uiimage base64 encoded string? couldn't find examples or codes detailed regarding.

i wonder why didn't find question because it's old question & can found here , here.

anyways, need first add nsdata categories project available here -

header , implementation convert uiimage object nsdata following way:

nsdata *imagedata = uiimagejpegrepresentation(image, 1.0); 

and apply base64 encoding convert base64 encoded string:

nsstring *encodedstring = [imagedata base64encoding]; 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -