Closed kotran88 closed 2 years ago
@kotran88
There is example code in the link bellow.
https://github.com/bigflood/dartexif/blob/master/example/gps_coords.dart#L40
ok Thank you! I just tried again but happened to meet new error.
: Error: The getter 'entries' isn't defined for the class 'Future<Map<String, IfdTag>>'. lib/pages/home_screen.dart:302
'Map' is from 'dart:core'.
'IfdTag' is from 'package:exif/src/exif_types.dart' ('../Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/exif-1.0.3/lib/src/exif_types.dart'). package:exif/src/exif_types.dart:1 Try correcting the name to the name of an existing getter, or defining a getter or field named 'entries'. for (final entry in data.entries) {
^^^^^^^
code is just same as before... wha may be the problem?
full code is..
final fileBytes = File('/storage/emulated/0/DCIM/Camera/20211218_234840.jpg').readAsBytesSync();
final data = readExifFromBytes(fileBytes);
print("gogo");
print(data);
if (data.isEmpty) {
print("No EXIF information found");
return;
}
for (final entry in data.entries) {
print("${entry.key}: ${entry.value}");
}
@kotran88
you left out await
.
https://github.com/bigflood/dartexif/blob/master/example/example.dart#L10
thank you !!!
I checked with my image which have lat lng information
code is as exampled.
but result is
I/flutter (29756): GPS GPSDate: 2021:12:18 I/flutter (29756): GPS GPSProcessingMethod: [65, 83, 67, 73, 73, 0, 0, 0, 71, 80, 83, 0] I/flutter (29756): GPS GPSTimeStamp: [14, 48, 34] I/flutter (29756): GPS GPSAltitude: 13483/125 I/flutter (29756): GPS GPSAltitudeRef: 0 I/flutter (29756): GPS GPSLongitude: [127, 5, 150143/10000] I/flutter (29756): GPS GPSLongitudeRef: E I/flutter (29756): GPS GPSLatitude: [35, 48, 40797/1250] I/flutter (29756): GPS GPSLatitudeRef: N I/flutter (29756): Image ExifOffset: 212
how can I convert GPS latitude like 35, 48, 40797/1250 to gps data to search in google map?