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
Post a Comment