exifdart 0.7.0+3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 87

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:

// Add this to have the Rational class too:
// import "package:package:exifdart/exifdart.dart";

// We are not using that in this example, this alone will do fine:
import "package:package:exifdart/exifdart_html.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.7.0+3 #

  • minor update on example

0.7.0+2 #

  • added documentation
  • added example

0.7.0+1 #

  • fixed when FlashpixVersion is already a string

0.7.0 #

  • ported to Dart 2

0.6.0+1 #

  • fixed the botched release

0.6.0 #

  • created AbstractBlobReader making the core implementation platform independent
  • moved platform dependent code (a HTML Blob based implementation of AbstractBlobReader) available by importing exifdart_html.dart
  • created a dart:io based implementation of AbstractBlobReader and made it available in exifdart_io.dart
  • this is an API breaking release, you have to import both exifdart.dart and exifdart_html.dart ot get the old API

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

Use this package as a library

1. Depend on it

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


dependencies:
  exifdart: ^0.7.0+3

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 flutter packages 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.7.0+3 Dec 25, 2018 Go to the documentation of exifdart 0.7.0+3 Download exifdart 0.7.0+3 archive
0.7.0+2 Dec 15, 2018 Go to the documentation of exifdart 0.7.0+2 Download exifdart 0.7.0+2 archive
0.7.0+1 Nov 5, 2018 Go to the documentation of exifdart 0.7.0+1 Download exifdart 0.7.0+1 archive
0.7.0 Aug 21, 2018 Go to the documentation of exifdart 0.7.0 Download exifdart 0.7.0 archive
0.6.0+1 Jul 13, 2018 Go to the documentation of exifdart 0.6.0+1 Download exifdart 0.6.0+1 archive
0.6.0 Jul 12, 2018 Go to the documentation of exifdart 0.6.0 Download exifdart 0.6.0 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

All 13 versions...

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

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

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

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

line 31 col 9: Use isNotEmpty instead of length

Maintenance suggestions

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and exifdart.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 >=2.0.0 <3.0.0