-
-
Save fitomad/1675916e892a1584d04249c7e3b09d33 to your computer and use it in GitHub Desktop.
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
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) -> Void | |
{ | |
// 1 | |
guard let image = info[UIImagePickerControllerOriginalImage] as? UIImage, | |
let ciImage = image.ciImage | |
else | |
{ | |
return | |
} | |
// 2 | |
let imageRequest = VNImageRequestHandler(ciImage: ciImage) | |
// 3 | |
do | |
{ | |
try imageRequest.perform([ self.requestText ]) | |
} | |
catch error | |
{ | |
print("No podemos procesar la imagen del Carrete de Fotos. \(error.localizedDescription)") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment