exif 1.0.2

  • Readme
  • Changelog
  • Installing
  • 83

exif #

Build Status

Dart module to decode Exif data from tiff and jpeg files.

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

Installation #

Depend on it #

Add this to your package's pubspec.yaml file:

dependencies:
  exif: 

Install it #

You can install packages from the command line:

$ pub get

Usage #

  • Simple example:
printExifOf(String path) async {

  Map<String, IfdTag> data = readExifFromBytes(await new File(path).readAsBytes());

  if (data == null || data.isEmpty) {
    printFunc("No EXIF information found\n");
    return;
  }

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

  for (String key in data.keys) {
    printFunc("$key (${data[key].tagType}): ${data[key]}");
  }
  
}

1.0.2 #

  • Add RandomAccessFile-backed reader

1.0.1 #

  • bugfix: RangeError for some images

1.0.0 #

  • Removed dependency on io package
  • Removed readExifFromFile

0.1.5 #

  • Added tests

0.1.2 #

  • Initial version

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate exif

2. Use it

The package has the following executables:


$ print_exif

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  exif: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:exif/exif.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
91
Health:
Code health derived from static analysis. [more]
76
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
72
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

We analyzed this package on Dec 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:exif/exif.dart with components: io.

Health issues and suggestions

Document public APIs. (-1 points)

16 out of 16 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/exifheader.dart. (-16.51 points)

Analysis of lib/src/exifheader.dart reported 36 hints, including:

line 18 col 32: Avoid const keyword.

line 19 col 3: Avoid const keyword.

line 20 col 3: Avoid const keyword.

line 21 col 3: Avoid const keyword.

line 22 col 3: Avoid const keyword.

Fix bin/print_exif.dart. (-1.99 points)

Analysis of bin/print_exif.dart reported 4 hints:

line 23 col 10: Don't explicitly initialize variables to null.

line 27 col 18: Unnecessary new keyword.

line 71 col 36: Avoid types as parameter names.

line 72 col 6: Don't explicitly initialize variables to null.

Fix lib/src/tags_info.dart. (-1.99 points)

Analysis of lib/src/tags_info.dart reported 4 hints:

line 12 col 12: Unnecessary new keyword.

line 16 col 12: Unnecessary new keyword.

line 20 col 12: Unnecessary new keyword.

line 24 col 12: Unnecessary new keyword.

Fix additional 6 files with analysis or formatting issues. (-4.49 points)

Additional issues in the following files:

  • lib/src/read_exif.dart (3 hints)
  • lib/src/tags.dart (2 hints)
  • lib/src/exif_types.dart (1 hint)
  • lib/src/file_interface.dart (1 hint)
  • lib/src/makernote_nikon.dart (1 hint)
  • lib/src/util.dart (1 hint)

Maintenance suggestions

The package description is too short. (-18 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and exif.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.2 <3.0.0
args ^1.2.0 1.5.2
collection ^1.0.0 1.14.12
convert ^2.0.0 2.1.1
sprintf >=1.0.0 <5.0.0 4.0.2
Transitive dependencies
charcode 1.1.2
typed_data 1.1.6
Dev dependencies
archive ^2.0.2
build_runner ^0.10.0
http any
json_annotation ^1.0.0
json_serializable ^1.0.0
path any
stream_channel any
test any