image_metadata 1.0.1

  • Readme
  • Changelog
  • Installing
  • 59

image_metadata #

Reads image metadata (Exif), including width, height and orientation.

Usage #

A simple usage example:

import 'package:image_metadata/image_metadata.dart';

main() {

  var imageBase64 = '...' ;
  var imageData = ImageData.fromBase64(ImageType.JPEG, imageBase64) ;

  var metadataReader = ImageMetadataReader(imageData) ;
  var imageMetadata = ;

  var w = imageMetadata.getImageWidth() ;
  var h = imageMetadata.getImageHeight() ;
  var orientation = imageMetadata.getImageOrientation() ;


Features and bugs #

Please file feature requests and bugs at the issue tracker.

Author #

Graciliano M. Passos: gmpassos@GitHub.

License #

Dart free & open-source license.

1.0.1 #

  • Upgrade to portable version of exif:
    • exif: ^1.0.3

1.0.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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

  image_metadata: ^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:image_metadata/image_metadata.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14

Health issues and suggestions

Document public APIs. (-0.29 points)

81 out of 83 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/image_metadata_base.dart. (-0.50 points)

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

line 33 col 19: The value of the field '_imageData' isn't used.

Format lib/src/data_utils.dart.

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

Format lib/src/jpeg_image_metadata.dart.

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

Maintenance suggestions

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 image_metadata.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
exif ^1.0.3 1.0.3
Transitive dependencies
args 1.6.0
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
convert 2.1.1
sprintf 4.0.2
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
pedantic ^1.8.0
test ^1.6.0