decodeTiffFile function

Future<Image?> decodeTiffFile(
  1. String path, {
  2. int? frame,
})

Decode a TIFF formatted image from a file. If the platform does not support dart:io, null will be returned.

Implementation

Future<Image?> decodeTiffFile(String path, {int? frame}) async {
  final bytes = await readFile(path);
  if (bytes == null) {
    return null;
  }
  return TiffDecoder().decode(bytes, frame: frame);
}