~berthold-daum/zora/trunk

« back to all changes in this revision

Viewing changes to com.bdaum.zoom.batch.unix/exiftool/lib/Image/ExifTool/MakerNotes.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:
21
21
sub WriteUnknownOrPreview($$$);
22
22
sub FixLeicaBase($$;$);
23
23
 
24
 
$VERSION = '1.96';
 
24
$VERSION = '1.97';
25
25
 
26
26
my $debug;          # set to 1 to enable debugging code
27
27
 
481
481
        Notes => 'not EXIF-based',
482
482
    },
483
483
    {
 
484
        Name => 'MakerNoteMotorola',
 
485
        Condition => '$$valPt=~/^MOT\0/',
 
486
        SubDirectory => {
 
487
            TagTable => 'Image::ExifTool::Motorola::Main',
 
488
            Start => '$valuePtr + 8',
 
489
            Base => '$start - 8',
 
490
            ByteOrder => 'Unknown',
 
491
        },
 
492
    },
 
493
    {
484
494
        # older Nikon maker notes
485
495
        Name => 'MakerNoteNikon2',
486
496
        Condition => '$$valPt=~/^Nikon\x00\x01/',
586
596
        # (X1 starts with "LEICA\0\x01\0", Make is "LEICA CAMERA AG")
587
597
        # (X2 starts with "LEICA\0\x05\0", Make is "LEICA CAMERA AG")
588
598
        # (X VARIO starts with "LEICA\0\x04\0", Make is "LEICA CAMERA AG")
589
 
        # (T (Typ 701) starts with LEICA\0\0x6", Make is "LEICA CAMERA AG")
590
 
        # (X (Typ 113) starts with LEICA\0\0x7", Make is "LEICA CAMERA AG")
 
599
        # (T (Typ 701) starts with "LEICA\0\0x6", Make is "LEICA CAMERA AG")
 
600
        # (X (Typ 113) starts with "LEICA\0\0x7", Make is "LEICA CAMERA AG")
591
601
        Condition => '$$valPt =~ /^LEICA\0[\x01\x04\x05\x06\x07]\0/',
592
602
        SubDirectory => {
593
603
            TagTable => 'Image::ExifTool::Panasonic::Leica5',
634
644
        },
635
645
    },
636
646
    {
 
647
        Name => 'MakerNoteLeica8', # used by the Q (Type 116)
 
648
        # (Q (Typ 116) starts with "LEICA\0\x08\0", Make is "LEICA CAMERA AG")
 
649
        # (SL (Typ 601) starts with "LEICA\0\x09\0", Make is "LEICA CAMERA AG")
 
650
        Condition => '$$valPt =~ /^LEICA\0[\x08\x09]\0/',
 
651
        SubDirectory => {
 
652
            TagTable => 'Image::ExifTool::Panasonic::Leica5',
 
653
            Start => '$valuePtr + 8',
 
654
            ByteOrder => 'Unknown',
 
655
        },
 
656
    },
 
657
    {
 
658
        Name => 'MakerNoteLeica9', # used by the M9/M-Monochrom
 
659
        # (M9 and M Monochrom start with "LEICA0\x03\0")
 
660
        Condition => '$$self{Make} =~ /^Leica Camera AG/ and $$valPt =~ /^LEICA\0\x02\0/',
 
661
        SubDirectory => {
 
662
            TagTable => 'Image::ExifTool::Panasonic::Leica9',
 
663
            Start => '$valuePtr + 8',
 
664
            Base => '$start - 8',
 
665
            ByteOrder => 'Unknown',
 
666
        },
 
667
    },
 
668
    {
637
669
        Name => 'MakerNotePanasonic',
638
670
        # (starts with "Panasonic\0")
639
671
        Condition => '$$valPt=~/^Panasonic/',
910
942
        # (starts with "SONY PIC\0" -- DSC-H200/J20/W370/W510, MHS-TS20)
911
943
        Condition => '$$valPt=~/^SONY PIC\0/',
912
944
        SubDirectory => { TagTable => 'Image::ExifTool::Sony::PIC' },
913
 
    },    
 
945
    },
914
946
    {
915
947
        Name => 'MakerNoteSony5', # used in SR2 and ARW images
916
948
        Condition => '$$self{Make}=~/^SONY/ and $$valPt!~/^\x01\x00/',
1352
1384
#
1353
1385
    if ($tagInfo and $$tagInfo{SubDirectory}) {
1354
1386
        my $subdir = $$tagInfo{SubDirectory};
1355
 
        unless ($$subdir{ProcessProc} and 
 
1387
        unless ($$subdir{ProcessProc} and
1356
1388
               ($$subdir{ProcessProc} eq \&ProcessUnknown or
1357
1389
                $$subdir{ProcessProc} eq \&ProcessUnknownOrPreview))
1358
1390
        {
1627
1659
    if ($dirLen > 6 and substr($$dataPt, $dirStart, 3) eq "\xff\xd8\xff") {
1628
1660
        if ($$et{NEW_VALUE}{$Image::ExifTool::Extra{PreviewImage}}) {
1629
1661
            # write or delete new preview (if deleted, it can't currently be added back again)
1630
 
            $newVal = $et->GetNewValues('PreviewImage') || '';
 
1662
            $newVal = $et->GetNewValue('PreviewImage') || '';
1631
1663
            if ($et->Options('Verbose') > 1) {
1632
1664
                $et->VerboseValue("- MakerNotes:PreviewImage", substr($$dataPt, $dirStart, $dirLen));
1633
1665
                $et->VerboseValue("+ MakerNotes:PreviewImage", $newVal) if $newVal;