Ignore:
Timestamp:
2011-06-01T12:33:42+12:00 (13 years ago)
Author:
sjm84
Message:

Updating the ExifTool perl modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Sigma.pm

    r16842 r24107  
    66# Revisions:    04/06/2004 - P. Harvey Created
    77#               02/20/2007 - PH added SD14 tags
     8#               24/06/2010 - PH decode some SD15 tags
    89#
    910# Reference:    http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html
     
    1617use Image::ExifTool::Exif;
    1718
    18 $VERSION = '1.04';
     19$VERSION = '1.09';
    1920
    2021%Image::ExifTool::Sigma::Main = (
     
    4647        },
    4748    },
    48     0x000a => 'Lens',
     49    0x000a => 'LensFocalRange',
    4950    0x000b => 'ColorSpace',
     51    # SIGMA PhotoPro writes these tags as strings, but some cameras (at least) write them as rational
    5052    0x000c => [
    5153        {
    5254            Name => 'ExposureCompensation',
    53             Condition => '$$self{CameraModel} !~ /SD14$/',
     55            Condition => '$format eq "string"',
    5456            ValueConv => '$val =~ s/Expo:\s*//, $val',
    5557            ValueConvInv => 'IsFloat($val) ? sprintf("Expo:%+.1f",$val) : undef',
    5658        },
    5759        { #PH
    58             Name => 'UnknownCompensation',
     60            Name => 'ExposureAdjust',
    5961            Writable => 'rational64s',
    6062            Unknown => 1,
     
    6466        {
    6567            Name => 'Contrast',
    66             Condition => '$$self{CameraModel} !~ /SD14$/',
     68            Condition => '$format eq "string"',
    6769            ValueConv => '$val =~ s/Cont:\s*//, $val',
    6870            ValueConvInv => 'IsFloat($val) ? sprintf("Cont:%+.1f",$val) : undef',
     
    7678        {
    7779            Name => 'Shadow',
    78             Condition => '$$self{CameraModel} !~ /SD14$/',
     80            Condition => '$format eq "string"',
    7981            ValueConv => '$val =~ s/Shad:\s*//, $val',
    8082            ValueConvInv => 'IsFloat($val) ? sprintf("Shad:%+.1f",$val) : undef',
     
    8890        {
    8991            Name => 'Highlight',
    90             Condition => '$$self{CameraModel} !~ /SD14$/',
     92            Condition => '$format eq "string"',
    9193            ValueConv => '$val =~ s/High:\s*//, $val',
    9294            ValueConvInv => 'IsFloat($val) ? sprintf("High:%+.1f",$val) : undef',
     
    100102        {
    101103            Name => 'Saturation',
    102             Condition => '$$self{CameraModel} !~ /SD14$/',
     104            Condition => '$format eq "string"',
    103105            ValueConv => '$val =~ s/Satu:\s*//, $val',
    104106            ValueConvInv => 'IsFloat($val) ? sprintf("Satu:%+.1f",$val) : undef',
     
    112114        {
    113115            Name => 'Sharpness',
    114             Condition => '$$self{CameraModel} !~ /SD14$/',
     116            Condition => '$format eq "string"',
    115117            ValueConv => '$val =~ s/Shar:\s*//, $val',
    116118            ValueConvInv => 'IsFloat($val) ? sprintf("Shar:%+.1f",$val) : undef',
     
    124126        {
    125127            Name => 'X3FillLight',
    126             Condition => '$$self{CameraModel} !~ /SD14$/',
     128            Condition => '$format eq "string"',
    127129            ValueConv => '$val =~ s/Fill:\s*//, $val',
    128130            ValueConvInv => 'IsFloat($val) ? sprintf("Fill:%+.1f",$val) : undef',
     
    136138        {
    137139            Name => 'ColorAdjustment',
    138             Condition => '$$self{CameraModel} !~ /SD14$/',
     140            Condition => '$format eq "string"',
    139141            ValueConv => '$val =~ s/CC:\s*//, $val',
    140142            ValueConvInv => 'IsInt($val) ? "CC:$val" : undef',
     
    155157    0x0018 => 'Software',
    156158    0x0019 => 'AutoBracket',
    157     # 0x001a - int32u: 1884 to 2016
    158     # 0x001b - int32u: 20688 to 45335
    159     # 0x001c - int16u[2]: "640 480"
     159    0x001a => [ #PH
     160        {
     161            Name => 'PreviewImageStart',
     162            Condition => '$format eq "int32u"',
     163            IsOffset => 1,
     164            OffsetPair => 0x001b,
     165            DataTag => 'PreviewImage',
     166            Writable => 'int32u',
     167            Protected => 2,
     168        },{ # (written by Sigma Photo Pro)
     169            Name => 'ChrominanceNoiseReduction',
     170            ValueConv => '$val =~ s/Chro:\s*//, $val',
     171            ValueConvInv => 'IsFloat($val) ? sprintf("Chro:%+.1f",$val) : undef',
     172        },
     173    ],
     174    0x001b => [ #PH
     175        {
     176            Name => 'PreviewImageLength',
     177            Condition => '$format eq "int32u"',
     178            OffsetPair => 0x001a,
     179            DataTag => 'PreviewImage',
     180            Writable => 'int32u',
     181            Protected => 2,
     182        },{ # (written by Sigma Photo Pro)
     183            Name => 'LuminanceNoiseReduction',
     184            ValueConv => '$val =~ s/Luma:\s*//, $val',
     185            ValueConvInv => 'IsFloat($val) ? sprintf("Luma:%+.1f",$val) : undef',
     186        },
     187    ],
     188    0x001c => { #PH
     189        Name => 'PreviewImageSize',
     190        Writable => 'int16u',
     191        Count => 2,
     192    },
    160193    0x001d => { #PH
    161194        Name => 'MakerNoteVersion',
    162         Format => 'undef',
    163     },
    164     # 0x001e - int16u: 0
    165     # 0x001f - string: ""
     195        Writable => 'undef',
     196    },
     197    # 0x001e - int16u: 0, 4, 13 - flash mode?
     198    0x001f => { #PH (NC)
     199        Name => 'AFPoint',
     200        # values: "", "Center", "Center,Center", "Right,Right"
     201    },
    166202    # 0x0020-21 - string: " "
    167     0x0022 => { #PH
    168         Name => 'AdjustmentMode',
    169         Priority => 0,
    170         Unknown => 1,
    171     },
    172     # 0x0023 - string: 10, 131, 150, 152, 169
    173     # 0x0024-25 - string: ""
    174     # 0x0026-2e - int32u: 0
     203    0x0022 => { #PH (NC)
     204        Name => 'FileFormat',
     205        # values: "JPG", "JPG-S" or "X3F"
     206    },
     207    # 0x0023 - string: "", 10, 83, 131, 145, 150, 152, 169
     208    0x0024 => 'Calibration',
     209    # 0x0025 - string: "", "0.70", "0.90"
     210    # 0x0026-2b - int32u: 0
     211    0x002c => { #PH
     212        Name => 'ColorMode',
     213        Writable => 'int32u',
     214        PrintConv => {
     215            0 => 'n/a',
     216            1 => 'Sepia',
     217            2 => 'B&W',
     218            3 => 'Standard',
     219            4 => 'Vivid',
     220            5 => 'Neutral',
     221            6 => 'Portrait',
     222            7 => 'Landscape',
     223        },
     224    },
     225    # 0x002d - int32u: 0
     226    # 0x002e - rational64s: (the negative of FlashExposureComp, but why?)
    175227    # 0x002f - int32u: 0, 1
    176     0x0030 => 'LensApertureRange', #PH
     228    0x0030 => { #PH
     229        Name => 'LensApertureRange',
     230        Notes => 'changes with focal length. MaxAperture for some models',
     231    },
    177232    0x0031 => { #PH
    178233        Name => 'FNumber',
     
    185240        Writable => 'rational64u',
    186241        PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
    187         PrintConvInv => 'eval $val',
    188     },
    189     # 0x0033 - string: "3909" to "12337687"
    190     # 0x0034 - int32u: 0,1,2,3 or 4 (possibly AFPoint?)
     242        PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
     243    },
     244    0x0033 => { #PH
     245        Name => 'ExposureTime2',
     246        Writable => 'string',
     247        ValueConv => '$val * 1e-6',
     248        ValueConvInv => 'int($val * 1e6 + 0.5)',
     249        PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
     250        PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
     251    },
     252    0x0034 => { #PH
     253        Name => 'BurstShot',
     254        Writable => 'int32u',
     255    },
     256    # 0x0034 - int32u: 0,1,2,3 or 4
    191257    0x0035 => { #PH
    192258        Name => 'ExposureCompensation',
    193259        Writable => 'rational64s',
     260        # add a '+' sign to positive values
     261        PrintConv => '$val and $val =~ s/^(\d)/\+$1/; $val',
     262        PrintConvInv => '$val',
    194263    },
    195264    # 0x0036 - string: "                    "
    196     # 0x0037-39 - string: ""
    197     0x003a => { #PH (guess!)
     265    # 0x0037-38 - string: ""
     266    0x0039 => { #PH
     267        Name => 'SensorTemperature',
     268        # (string format)
     269        PrintConv => 'IsInt($val) ? "$val C" : $val',
     270        PrintConvInv => '$val=~s/ ?C$//; $val',
     271    },
     272    0x003a => { #PH
    198273        Name => 'FlashExposureComp',
    199274        Writable => 'rational64s',
     
    204279    },
    205280    0x003c => 'WhiteBalance', #PH
     281    0x003d => { #PH (new for SD15)
     282        Name => 'PictureMode',
     283        Notes => 'same as ColorMode, but "Standard" when ColorMode is Sepia or B&W',
     284    },
    206285);
    207286
     
    225304=head1 AUTHOR
    226305
    227 Copyright 2003-2007, Phil Harvey (phil at owl.phy.queensu.ca)
     306Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
    228307
    229308This library is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.