exifdart 0.5.0+6

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 65

exifdart

Dart module to decode Exif data from jpeg files.

Dart port based on Exif.js: https://github.com/exif-js/exif-js/

Installation

Depend on it

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

dependencies:
  exifdart:

Install it

You can install packages from the command line:

$ pub get

Usage

Simple example:

import "package:package:exifdart/exifdart.dart";
import "dart:html";

/// Returns the orientation value or `null` if no EXIF or no orientation info
/// is found.
Future<int> getOrientation(Blob blob) async {
  if (blob.type == "image/jpeg") {
    Map<String, dynamic> tags = await readExifFromBlob(blob);
    return tags["Orientation"];
  }

  return null;
}

void main() {
  registerChangeHandler(document.querySelector("input[type=file]"));
}

void registerChangeHandler(InputElement input) {
  input.onChange.listen((Event e) {
    for (File f in input.files) {
      getOrientation(f).then((int orientation) {
        window.console.log("Orientation for ${f.name} is ${orientation}");
      });
    }
  });
}

0.5.0+6

  • fixed null access on some files that have a type 0 GPSVersionID tag

0.5.0+5

  • fixed offset errors in BlobView and CacheView

0.5.0+4

  • changed switch block to make dart2js happy

1. Depend on it

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


dependencies:
  exifdart: "^0.5.0+6"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:exifdart/exifdart.dart';
        
Version Uploaded Documentation Archive
0.5.0+6 Mar 14, 2018 Go to the documentation of exifdart 0.5.0+6 Download exifdart 0.5.0+6 archive
0.5.0+5 Jan 5, 2018 Go to the documentation of exifdart 0.5.0+5 Download exifdart 0.5.0+5 archive
0.5.0+4 Dec 7, 2017 Go to the documentation of exifdart 0.5.0+4 Download exifdart 0.5.0+4 archive
0.5.0+3 Nov 23, 2017 Go to the documentation of exifdart 0.5.0+3 Download exifdart 0.5.0+3 archive
0.5.0+2 May 8, 2017 Go to the documentation of exifdart 0.5.0+2 Download exifdart 0.5.0+2 archive
0.5.0+1 May 8, 2017 Go to the documentation of exifdart 0.5.0+1 Download exifdart 0.5.0+1 archive
0.5.0 May 8, 2017 Go to the documentation of exifdart 0.5.0 Download exifdart 0.5.0 archive

Analysis

We analyzed this package on Apr 9, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
32 / 100
Health:
Code health derived from static analysis. [more]
96 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
65
Learn more about scoring.

Platforms

Detected platforms: web

Primary library: package:exifdart/exifdart.dart with components: html.

Suggestions

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 25 hints.

    Run dartfmt to format lib/src/blob_view.dart.

    Run dartfmt to format lib/src/exif_extractor.dart.

    Similar analysis of the following files failed:

    • lib/src/log_message_sink.dart (hint)
  • 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 exifdart.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.16.0-dev.5.0 <2.0.0