readExifFromFile function

Future<Map<String, IfdTag>> readExifFromFile(
  1. File file, {
  2. String? stopTag,
  3. bool details = true,
  4. bool strict = false,
  5. bool debug = false,
  6. bool truncateTags = true,
})

Streaming version of readExifFromBytes.

Implementation

Future<Map<String, IfdTag>> readExifFromFile(File file,
    {String? stopTag,
    bool details = true,
    bool strict = false,
    bool debug = false,
    bool truncateTags = true}) async {
  final randomAccessFile = file.openSync();
  final fileReader = await FileReader.fromFile(randomAccessFile);
  final r = readExifFromFileReader(fileReader,
      stopTag: stopTag,
      details: details,
      strict: strict,
      debug: debug,
      truncateTags: truncateTags);
  randomAccessFile.closeSync();
  return r.tags;
}