Does anyone know how to convert a UIImage to a Base64 string, and then reverse it?
UIImage
I have the below code; the original image before encoding is good, bu
Swift 3.0 and Xcode 8.0
let imageData = UIImageJPEGRepresentation(imageView.image!, 1) let base64String = (imageData! as Data).base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0)) print(base64String)