Created
December 19, 2008 16:53
-
-
Save hirose31/38042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Image::ExifTool qw(ImageInfo); | |
use Image::ExifTool::GPS; | |
for my $img (@ARGV) { | |
my $exif = Image::ExifTool->new; | |
# $exif->Options(CoordFormat => '%d degrees %.2f minutes'); | |
my $info = $exif->ImageInfo($img); | |
my @tags = $exif->GetTagList($info, 'Group0'); | |
#d ¥@tags; | |
for my $tag (@tags) { | |
next unless $tag =‾ /^GPS/; | |
my $val = $info->{$tag}; | |
printf "%s: %s¥n", $tag,$val; | |
} | |
} | |
__END__ | |
GPSVersionID: 2.2.0.0 | |
GPSLatitudeRef: North | |
GPSLatitude (1): 35 deg 39' 45.00" | |
GPSLongitudeRef: East | |
GPSLongitude (1): 139 deg 43' 58.80" | |
GPSLatitude: 35 deg 39' 45.00" N | |
GPSLongitude: 139 deg 43' 58.80" E | |
GPSPosition: 35 deg 39' 45.00" N, 139 deg 43' 58.80" E | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment