decodePnmFile function
Decode a PNM formatted image from a file.
Implementation
Future<Image?> decodePnmFile(String path) async {
final bytes = await readFile(path);
if (bytes == null) {
return null;
}
return PngDecoder().decode(bytes);
}