Does anyone know how to convert a UIImage
to a Base64 string, and then reverse it?
I have the below code; the original image before encoding is good, bu
For iOS 7+, Objective-C, here's how to make the conversion starting with an image URL:
NSURL *url = [NSURL URLWithString:self.groove.thumbnailURL];
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
NSString *base64String = [UIImagePNGRepresentation(image)
base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];