processImageFile method
Processes an image from a local file path with enhanced precision.
Implementation
Future<ScanResult> processImageFile(String imagePath, ScanMode mode) async {
initialize();
try {
final inputImage = InputImage.fromFilePath(imagePath);
return await processInputImage(inputImage, mode, imagePath: imagePath);
} catch (e) {
return ScanResult.error(mode, 'Failed to process image: ${e.toString()}');
}
}