+ # Model/Lens
+ my $model = $exiftool->GetValue('Model', 'ValueConv');
+ my $lens = $exiftool->GetValue('Lens', 'ValueConv');
+ $lens = $exiftool->GetValue('LensSpec', 'ValueConv') if (!defined($lens));
+
+ $model =~ s/^\s*//;
+ $model =~ s/\s*$//;
+
+ $lens =~ s/^\s*//;
+ $lens =~ s/\s*$//;
+
+ # Now update the main table with the information we've got
+ $dbh->do('UPDATE images SET width=?, height=?, date=?, model=?, lens=? WHERE id=?',
+ undef, $width, $height, $datetime, $model, $lens, $id)
+ or die "Couldn't update width/height in SQL: $!";
+