exif 0.1.2

  • README.md
  • Installing
  • Versions
  • 79

exif

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 = await readExifFromFile(new File(path));

  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]}");
  }
  
}

Read from bytes:

printExifOf(String path) async {

  Map<String, IfdTag> data = await 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. Depend on it

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


dependencies:
  exif: "^0.1.2"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages 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';
        
Version Uploaded Documentation Archive
0.1.2 Dec 19, 2017 Go to the documentation of exif 0.1.2 Download exif 0.1.2 archive
0.1.1 Dec 20, 2016 Go to the documentation of exif 0.1.1 Download exif 0.1.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
72 / 100
Health:
Code health derived from static analysis. [more]
94 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
76 / 100
Overall score:
Weighted score of the above. [more]
79

Platforms

Detected platforms: Flutter, other

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

Suggestions

  • Fix lib/src/exifheader.dart.

    Strong-mode analysis of lib/src/exifheader.dart failed with the following error:

    line: 332 col: 48
    The argument type 'List' can't be assigned to the parameter type 'Iterable<int>'.

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 1 error(s) and 0 warning(s).

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use exif.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.16.0-dev.5.0 <2.0.0
args ^0.13.7 0.13.7 1.3.0
collection ^1.0.0 1.14.5
convert >=1.0.0 <3.0.0 2.0.1
sprintf >=1.0.8 <2.0.0 1.0.8 3.0.2
Transitive dependencies
charcode 1.1.1
typed_data 1.1.5
Dev dependencies
test >=0.12.0 <0.13.0