Reputation: 653
I am building an app where the users can upload the pictures from there phones. I would like to extract from the user's picture the metadata that shows the location that the picture was taken. How can I get it?
Upvotes: 3
Views: 7255
Reputation: 170
you can use exif package
final ByteData bytes = await rootBundle.load('assets/jpg/2.jpg');
var list = bytes.buffer.asUint8List();
final data = await readExifFromBytes(list);
if (data.isEmpty) {
print("No EXIF information found");
return;
}
if (data.containsKey('JPEGThumbnail')) {
print('File has JPEG thumbnail');
data.remove('JPEGThumbnail');
}
Upvotes: 3