Please help me to convert UIImageView.image (NOT from UIImage) to Base64String.
For the UIImage to Base64String is OK. But no chance to convert image to Base64String.
Thank in advance.
extension UIImage {
var base64: String? {
self.jpegData(compressionQuality: 1)?.base64EncodedString()
}
}
This is my current converting code. It can only convert UIImage->base64EncodedString
New contributor
Kyaw Xin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.