diff options
-rwxr-xr-x | generate_gallery.pl | 6 |
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"; |