decodePnmFile function

Future<Image?> decodePnmFile(
  1. String path
)

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);
}