~berthold-daum/zora/trunk

« back to all changes in this revision

Viewing changes to com.bdaum.zoom.batch.unix/exiftool/lib/Image/ExifTool/NikonCapture.pm

  • Committer: bdaum
  • Date: 2015-12-26 10:21:51 UTC
  • Revision ID: berthold.daum@bdaum.de-20151226102151-44f1j5113167thb9
VersionĀ 2.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
use Image::ExifTool qw(:DataAccess :Utils);
19
19
use Image::ExifTool::Exif;
20
20
 
21
 
$VERSION = '1.13';
 
21
$VERSION = '1.14';
22
22
 
23
23
sub ProcessNikonCapture($$$);
24
24
 
724
724
    my $tagID = Get32u($dataPt, $dirStart);
725
725
    # sometimes size includes 18 header bytes, and other times it doesn't (eg. ViewNX 2.1.1)
726
726
    my $size = Get32u($dataPt, $dirStart + 18);
727
 
    my $pad = $dirLen - $size - 18; 
 
727
    my $pad = $dirLen - $size - 18;
728
728
    unless ($tagID == 0x7a86a940 and ($pad >= 0 or $pad == -18)) {
729
729
        $et->Warn('Unrecognized Nikon Capture Data header');
730
730
        return undef;
770
770
                my $oldVal = ReadValue($dataPt,$pos+22,$format,1,$size);
771
771
                my $nvHash = $et->GetNewValueHash($tagInfo);
772
772
                if ($et->IsOverwriting($nvHash, $oldVal)) {
773
 
                    my $val = $et->GetNewValues($tagInfo);
 
773
                    my $val = $et->GetNewValue($tagInfo);
774
774
                    $newVal = WriteValue($val, $$tagInfo{Writable}) if defined $val;
775
775
                    if (defined $newVal and length $newVal) {
776
776
                        ++$$et{CHANGED};