]> git.donarmstrong.com Git - bin.git/commitdiff
we only need the CreateDate and the Serial out of image info
authorDon Armstrong <don@donarmstrong.com>
Sun, 1 Jul 2018 19:56:03 +0000 (12:56 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 1 Jul 2018 19:56:03 +0000 (12:56 -0700)
archive_photos

index 82a633516bd5c75fa6bde61543fa2a27dacdbbaa..291f1fb41372fad2abf44911100d9c10e87481b2 100755 (executable)
@@ -129,7 +129,7 @@ find(sub { if (-f $_ or -l $_) {$existing_files{$_} = $File::Find::name;} },$opt
 for my $file (@files) {
     my $file_basename=basename($file);
     # find out when the photo was shot
-    my $info = ImageInfo($file);
+    my $info = ImageInfo($file,[qw(CreateDate Serial)]);
     if (not defined $info->{CreateDate}) {
         print STDERR "No date information for $file\n";
         next;
@@ -162,7 +162,7 @@ sub are_the_same_files{
         if (-e $f->{name}) {
             $f->{exists} = 1;
             if (not exists $f->{info} or not defined $f->{info}) {
-                $f->{info} = ImageInfo($f->{name});
+                $f->{info} = ImageInfo($f->{name},[qw(CreateDate Serial)]);
             }
         } else {
             $f->{exists} = 0;