-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
scenario :
use google_mlkit_text_recognition version. pick a pdf file from user. And feed it through OCR. App Crashes. Need a file type validation to ensure only image files are being passed to filePathToVisionImage method here.
code that causes crash :
22 + (MLKVisionImage *)filePathToVisionImage:(NSString *)filePath {
23 UIImage *image = [UIImage imageWithContentsOfFile:filePath];
24 MLKVisionImage *visionImage = [[MLKVisionImage alloc] initWithImage:image]; // gives error in this line
25 visionImage.orientation = image.imageOrientation;
26 return visionImage;
27 }config:
google_mlkit_text_recognition: ^0.15.0
flutter - sdk: '>=3.3.0 <4.0.0'Metadata
Metadata
Assignees
Labels
No labels