⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 canon.pm

📁 稀饭伊人相册系统继承了新天堂多用户相册系统的功能
💻 PM
📖 第 1 页 / 共 2 页
字号:
package TagTables::Canon;use strict;use vars qw($VERSION);$VERSION = '1.00';#------------------------------------------------------------------------------# File:         Canon.pm## Description:  Definitions for Canon EXIF Maker notes## Revisions:    11/25/2003 - P. Harvey Created#               12/03/2003 - P. Harvey Figured out lots more tags and added#                            CanonPictureInfo#------------------------------------------------------------------------------# Canon EXIF Maker Notes%TagTables::Canon::Main = (    0x1 => {        Name => 'CanonCameraSettings',        SubDirectory => {            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',            TagTable => 'TagTables::Canon::CameraSettings',            Start => '$valuePtr',        },    },    0x4 => {        Name => 'CanonShotInfo',        SubDirectory => {            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',            TagTable => 'TagTables::Canon::ShotInfo',            Start => '$valuePtr',        },    },    0x6 => 'CanonImageType',    0x7 => 'CanonFirmwareVersion',    0x8 => {        Name => 'FileNumber',        PrintConv => '$_=$val,s/(\d+)(\d{4})/$1-$2/,$_',    },    0x9 => {        Name => 'OwnerName',        Description => "Owner's Name",    },    0xa => {        Name => 'Canon1DSettings',        SubDirectory => {            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',            TagTable => 'TagTables::Canon::Canon1DSettings',            Start => '$valuePtr',        },    },    0xc => [   # square brackets for a conditional list        {            Condition => '$::cameraModel =~ /(300D|REBEL|10D)/',            Name => 'SerialNumber',            Description => 'Camera Body No.',            PrintConv => 'sprintf("%.10d",$val)',        },        {            # no condition (all other models)            Name => 'SerialNumber',            Description => 'Camera Body No.',            PrintConv => 'sprintf("%x-%.5d",$val>>16,$val&0xffff)',        },    ],    0xe => 'CanonFileLength',    0xf => [        {            Condition => '$::cameraModel =~ /10D/',            Name => 'CanonCustomFunctions10D',            SubDirectory => {                Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',                TagTable => 'TagTables::CanonCustom::Functions10D',                Start => '$valuePtr',            },        },        {            # assume everything else is a D30/D60            Name => 'CanonCustomFunctions',            SubDirectory => {                Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',                TagTable => 'TagTables::CanonCustom::Functions',                Start => '$valuePtr',            },        },    ],    0x12 => {        Name => 'CanonPictureInfo',        SubDirectory => {            # the first word seems to be always 7, not the size as in other blocks            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,7)',            TagTable => 'TagTables::Canon::PictureInfo',            Start => '$valuePtr',        },    },    0x90 => {        Name => 'CanonCustomFunctions1D',        SubDirectory => {            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size)',            TagTable => 'TagTables::CanonCustom::Functions1D',            Start => '$valuePtr',        },    },    0xa0 => 'CanonA0Tag',    0xb6 => {        Name => 'PreviewImageInfo',        SubDirectory => {            # Note: first word if this block is the total number of words, not bytes!            Validate => 'TagTables::Canon::Validate($dirData,$subdirStart,$size/2)',            TagTable => 'TagTables::Canon::PreviewImageInfo',            Start => '$valuePtr',        },    },);# Canon camera settings (EXIF tag 0x01)# BinaryData (keys are indices into the Short array)%TagTables::Canon::CameraSettings = (    TableType => 'BinaryData',    1 => {        Name => 'MacroMode',        PrintConv => {            0 => 'Unknown',            1 => 'Macro',            2 => 'Normal',        },    },    2 => {        Name => 'Self-timer',        ValueConv => '$val / 10',    },    3 => {        Name => 'Quality',        Description => 'Image Quality',        PrintConv => {             2 => 'Normal',            3 => 'Fine',            4 => 'RAW',            5 => 'Superfine',        },    },    4 => {        Name => 'CanonFlashMode',        PrintConv => {            0 => 'Off',            1 => 'Auto',            2 => 'On',            3 => 'Red-eye reduction',            4 => 'Slow-sync',            5 => 'Red-eye reduction (Auto)',            6 => 'Red-eye reduction (On)',            16 => 'External flash', # not set in D30 or 300D        },    },    5 => {        Name => 'ContinuousDrive',        PrintConv => {            0 => 'Single',            1 => 'Continuous',        },    },    7 => {        Name => 'FocusMode',        PrintConv => {            0 => 'One-shot AF',            1 => 'AI Servo AF',            2 => 'AI Focus AF',            3 => 'Manual Focus',            4 => 'Single',            5 => 'Continuous',            6 => 'Manual Focus',        },    },    10 => {        Name => 'CanonImageSize',        PrintConv => {            0 => 'Large',            1 => 'Medium',            2 => 'Small',        },    },    11 => {        Name => 'EasyMode',        PrintConv => {            0 => 'Full auto',            1 => 'Manual',            2 => 'Landscape',            3 => 'Fast shutter',            4 => 'Slow shutter',            5 => 'Night',            6 => 'Black & White',            7 => 'Sepia',            8 => 'Portrait',            9 => 'Sports',            10 => 'Macro',            11 => 'Pan focus',        },    },    12 => {        Name => 'DigitalZoom',        PrintConv => {            -1 => 'Unknown',            0 => 'None',            1 => 'x2',            2 => 'x4',            3 => 'Other',  # value obtained from 2*#37/#36        },    },    13 => {        Name => 'Contrast',        PrintConv => 'TagTables::Exif::PrintParameter($val)',    },    14 => {        Name => 'Saturation',        PrintConv => 'TagTables::Exif::PrintParameter($val)',    },    15 => {        Name => 'Sharpness',        PrintConv => 'TagTables::Exif::PrintParameter($val)',    },    16 => {        Name => 'CameraISO',        PrintConv => {            0 => 'Use shot ISO instead',            15 => 'Auto',            16 => '50',            17 => '100',            18 => '200',            19 => '400',        },    },    17 => {        Name => 'MeteringMode',        PrintConv => {            1 => 'Spot',            3 => 'Evaluative',            4 => 'Partial',            5 => 'Center-weighted averaging',        },    },    18 => {        # this is always 2 for the 300D - PH        Name => 'FocusType',        PrintConv => {            0 => 'Manual',            1 => 'Auto (1)',            2 => 'Auto (2)',            3 => 'Macro Mode',            7 => 'Infinity Mode',            8 => 'Locked (Pan Mode)',        },    },    19 => {        Name => 'AFPoint',        PrintConv => {            0 => 'None (MF)',            0x3000 => 'None (MF)',            0x3001 => 'Auto-selected',            0x3002 => 'Right',            0x3003 => 'Center',            0x3004 => 'Left',            0x4001 => 'Auto AF point selection',            0x2005 => 'Manual AF point selection',        },    },    20 => {        Name => 'CanonExposureMode',        PrintConv => {            0 => 'Easy',            1 => 'Program AE',            2 => 'Shutter Speed Priority AE',            3 => 'Aperture-Priority AE',            4 => 'Manual',            5 => 'Depth-of-field AE',        },    },    23 => 'LongFocal',    24 => 'ShortFocal',    25 => 'FocalUnits',    28 => {        Name => 'FlashActivity',        PrintConv => '$val==-1 ? undef() : $val',    },    29 => {        Name => 'FlashBits',        PrintConv => q[TagTables::Canon::DecodeBits($val,                        {                            3 => 'On',                            4 => 'FP sync enabled',                            7 => '2nd-curtain sync used',                            11 => 'FP sync used',                            13 => 'Internal flash',                            14 => 'External E-TTL',                        })                    ],    },    32 => {        Name => 'FocusContinuous',        PrintConv => {            -1 => 'Unknown',            0 => 'Single',            1 => 'Continuous',        },    },    36 => 'ZoomedResolution',    37 => 'ZoomedResolutionBase',    42 => {        Name => 'ColorTone',        PrintConv => 'TagTables::Exif::PrintParameter($val)',    },);# Canon shot information (EXIF tag 0x04)# BinaryData (keys are indices into the Short array)%TagTables::Canon::ShotInfo = (    TableType => 'BinaryData',    2 => {        Name => 'ISO',        Description => 'ISO Speed',        # lookup tables can't predict new values, so calculate ISO instead - PH        ValueConv => 'exp(TagTables::Canon::CanonEv($val)*log(2))*100/32',        PrintConv => 'sprintf("%.0f",$val)',    },    6 => {        Name => 'ExposureCompensation',        ValueConv => 'TagTables::Canon::CanonEv($val)',        PrintConv => 'TagTables::Exif::ConvertFraction($val)',    },    7 => {        Name => 'WhiteBalance',        PrintConv => {            0 => 'Auto',            1 => 'Daylight',            2 => 'Cloudy',            3 => 'Tungsten',            4 => 'Fluorescent',            5 => 'Flash',            6 => 'Custom',            7 => 'Black & White',            8 => 'Shade',            9 => 'Manual temperature',        },    },

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -