decodeImageFromFilePath function
Implementation
@visibleForTesting
Future<Image> decodeImageFromFilePath(String filePath) async {
final image = decodeImage(await File(filePath).readAsBytes());
if (image == null) {
throw Exception('Failed to decode image: $filePath');
}
return image;
}