exif 1.0.1

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.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.1

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]
88
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
72
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:exif/exif.dart.

Health issues and suggestions

Document public APIs. (-1 points)

15 out of 15 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. (-5.36 points)

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

line 71 col 24: Use = to separate a named parameter from its default value.

line 72 col 14: Use = to separate a named parameter from its default value.

line 73 col 22: Use = to separate a named parameter from its default value.

line 74 col 7: Don't explicitly initialize variables to null.

line 74 col 18: Use = to separate a named parameter from its default value.

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

Analysis of bin/print_exif.dart reported 3 hints:

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

line 71 col 36: Avoid types as parameter names.

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

Fix lib/src/exif_types.dart. (-0.50 points)

Analysis of lib/src/exif_types.dart reported 1 hint:

line 19 col 43: Use ; instead of {} for empty constructor bodies.

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.11
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

Admin