Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.02 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.02 KB

exif

Pub Package Dart CI

Dart package to decode Exif data from TIFF, JPEG, HEIC, PNG and WebP files.

Dart port of ianaré sévi's EXIF library: https://github.com/ianare/exif-py.

Usage

  • Simple example:
printExifOf(String path) async {

  final fileBytes = File(path).readAsBytesSync();
  final data = await readExifFromBytes(fileBytes);

  if (data.isEmpty) {
    print("No EXIF information found");
    return;
  }

  if (data.containsKey('JPEGThumbnail')) {
    print('File has JPEG thumbnail');
    data.remove('JPEGThumbnail');
  }
  if (data.containsKey('TIFFThumbnail')) {
    print('File has TIFF thumbnail');
    data.remove('TIFFThumbnail');
  }

  for (final entry in data.entries) {
    print("${entry.key}: ${entry.value}");
  }

}