summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-08-04 09:51:37 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-04 09:51:37 +0200
commitba571ac687bfe71df65a0c09f968a18437da3296 (patch)
treeacd960c5fa9b9ff018a7665274c44136c7585459
parent39a6e0592ce97558f52385014f10d2b291a850f7 (diff)
downloadgenerate_gallery-ba571ac687bfe71df65a0c09f968a18437da3296.tar.gz
generate_gallery-ba571ac687bfe71df65a0c09f968a18437da3296.tar.xz
ignore missing exif tags
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xgenerate_gallery.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/generate_gallery.pl b/generate_gallery.pl
index 9363ea8..365f5f6 100755
--- a/generate_gallery.pl
+++ b/generate_gallery.pl
@@ -67,7 +67,11 @@ for my $dir (@ARGV) {
}
if ($opts{exif}) {
my $tags = ImageInfo($file, "Aperture", "ShutterSpeed", "FocalLength");
- $description .= $tags->{ShutterSpeed}."s, ".$tags->{FocalLength}." @ F ".$tags->{Aperture};
+ if ($tags->{ShutterSpeed} && $tags->{FocalLength} && $tags->{Aperture}) {
+ $description .= $tags->{ShutterSpeed}."s, ".$tags->{FocalLength}." @ F ".$tags->{Aperture};
+ } else {
+ print STDERR "Missing at least one needed exif tag for \"$file\". Ignoring.\n";
+ }
}
$html .= "<div class=\"thumbnail\">\n";