From ba571ac687bfe71df65a0c09f968a18437da3296 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 4 Aug 2011 09:51:37 +0200 Subject: ignore missing exif tags Signed-off-by: Florian Pritz --- generate_gallery.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 .= "
\n"; -- cgit v1.2.3-24-g4f1b