bigflood / dartexif

Dart package to decode Exif data from tiff, jpeg and heic files
https://pub.dev/packages/exif
MIT License
30 stars 29 forks source link

readExifFromBytes & readExifFromFile are marked as Async but are technically Sync function #33

Open PapyElGringo opened 2 years ago

PapyElGringo commented 2 years ago
Future<Map<String, IfdTag>> readExifFromBytes(List<int> bytes,
    {String? stopTag,
    bool details = true,
    bool strict = false,
    bool debug = false,
    bool truncateTags = true}) async {
  return readExifFromFileReader(FileReader.fromBytes(bytes),
          stopTag: stopTag,
          details: details,
          strict: strict,
          debug: debug,
          truncateTags: truncateTags)
      .tags;
}

Since readExifFromFileReader is a sync function readExifFromBytes should be too. It's currently make us believe that there is some async process running

bigflood commented 2 years ago

you're right.
I'll consider it in the next release.