Created
November 22, 2018 20:40
-
-
Save douglascabral/b113cc13b3f94809ae76fa4b70bce21a to your computer and use it in GitHub Desktop.
Transform UIImage to Base64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// drawnImage : UIImage | |
let imgData = drawnImage.jpegData(compressionQuality: 1.0) | |
let base64 = imgData?.base64EncodedString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment