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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -