📄 exif.pm
字号:
package TagTables::Exif;use strict;use vars qw($VERSION);$VERSION = '1.00';#------------------------------------------------------------------------------# File: Exif.pm## Description: Definitions for EXIF tags## Revisions: 11/25/2003 - P. Harvey Created#------------------------------------------------------------------------------# main EXIF tag table%TagTables::Exif::Main = ( 0x1 => { Name => 'InteropIndex', Description => 'Interoperability Index', SubDirectory => { Start => '$dirBase', OffsetPt => '$valuePtr', }, }, 0x2 => { Name => 'InteropVersion', Description => 'Interoperability Version', }, 0x100 => { Name => 'ImageWidth', Description => 'Width of Image', }, 0x101 => { Name => 'ImageHeight', Description => 'Height of Image', }, 0x102 => 'BitsPerSample', 0x103 => { Name => 'Compression', PrintConv => { 1 => 'Uncompressed', 2 => 'CCITT 1D', 3 => 'Group 3 Fax', 4 => 'Group 4 Fax', 5 => 'LZW', 6 => 'JPEG', 32773 => 'PackBits', }, }, 0x106 => { Name => 'PhotometricInterpretation', PrintConv => { 0 => 'WhiteIsZero', 1 => 'BlackIsZero', 2 => 'RGB', 3 => 'RGB Palette', 4 => 'Tansparency mask', 5 => 'CMYK', 6 => 'YCbCr', 8 => 'CIELab', }, }, 0x10a => 'FillOrder', 0x10d => 'DocumentName', 0x10e => 'ImageDescription', 0x10f => { Name => 'Make', ValueConv => '($::cameraMake = $val) =~ s/\0.*//, $val', }, 0x110 => { Name => 'Model', Description => 'Camera Model Name', # truncate string at null terminator if it exists ValueConv => '($::cameraModel = $val) =~ s/\0.*//, $val', }, 0x111 => 'StripOffsets', 0x112 => { Name => 'Orientation', PrintConv => { 1 => 'Horizontal (normal)', 2 => 'Mirrored horizontal', 3 => 'Rotated 180', 4 => 'Mirrored vertical', 5 => 'Mirrored horizontal then rotated 90 CCW', 6 => 'Rotated 90 CW', 7 => 'Mirrored horizontal then rotated 90 CW', 8 => 'Rotated 90 CCW', }, }, 0x115 => 'SamplesPerPixel', 0x116 => 'RowsPerStrip', 0x117 => 'StripByteCounts', 0x11a => 'XResolution', 0x11b => 'YResolution', 0x11c => { Name => 'PlanarConfiguration', PrintConv => { 1 => 'Chunky', 2 => 'Planar', }, }, 0x128 => { Name => 'ResolutionUnit', PrintConv => { 1 => 'None', 2 => 'inches', 3 => 'cm', }, }, 0x12d => 'TransferFunction', 0x131 => 'Software', 0x132 => { Name => 'ModifyDate', Description => 'Date/Time of last modification', PrintConv => 'ExifTool::ConvertExifDate($val)', }, 0x13b => 'Artist', 0x13e => 'WhitePoint', 0x13f => 'PrimaryChromaticities', 0x156 => 'TransferRange', 0x200 => 'JPEGProc', 0x201 => { Name => 'ThumbnailOffset', # save the offset for later use ValueConv => '$::thumb_offset = $val', }, 0x202 => { Name => 'ThumbnailLength', # save the thumbnail data ValueConv => '$::thumb_data=substr($$dataPt,$::thumb_offset,$val), $val', }, 0x211 => 'YCbCrCoefficients', 0x212 => { Name => 'YCbCrSubSampling', PrintConv => { 1 => 'YCbCr4:2:2', 2 => 'YCbCr4:2:0', }, }, 0x213 => { Name => 'YCbCrPositioning', PrintConv => { 1 => 'Centered', 2 => 'Co-sited', }, }, 0x214 => 'ReferenceBlackWhite', 0x2bc => { Name => 'ApplicationNotes', # this could be an XMP block SubDirectory => { TagTable => 'TagTables::XMP::Main', Start => '$valuePtr', }, }, 0x1000 => 'RelatedImageFileFormat', 0x1001 => 'RelatedImageWidth', 0x1002 => 'RelatedImageLength', 0x828d => 'CFARepeatPatternDim', 0x828e => 'CFAPattern2', 0x828f => 'BatteryLevel', 0x8298 => 'Copyright', 0x829a => { Name => 'ExposureTime', Description => 'Tv(Shutter Speed)', PrintConv => 'TagTables::Exif::PrintExposureTime($val)', }, 0x829d => { Name => 'FNumber', Description => 'Av(Aperture Value)', PrintConv => 'sprintf("%.1f",$val)', },# this is too big to display# 0x83bb => {# Name => 'IPTC/NAA',# }, 0x8769 => { Name => 'ExifOffset', SubDirectory => { Start => '$dirBase', OffsetPt => '$valuePtr', }, },# don't want to print all this because it is a big table# 0x8773 => {# Name => 'InterColorProfile',# }, 0x8822 => { Name => 'ExposureProgram', PrintConv => { 1 => 'Manual', 2 => 'Program AE', 3 => 'Aperture-priority AE', 4 => 'Shutter speed priority AE', 5 => 'Creative (Slow speed)', 6 => 'Action (High speed)', 7 => 'Portrait', 8 => 'Landscape', }, }, 0x8824 => 'SpectralSensitivity', 0x8825 => { Name => 'GPSInfo', SubDirectory => { TagTable => 'TagTables::GPS::Main', Start => '$dirBase', OffsetPt => '$valuePtr', }, }, 0x8827 => { Name => 'ISO', Description => 'ISO Speed', }, 0x8828 => 'OECF', 0x9000 => 'ExifVersion', 0x9003 => { Name => 'DateTimeOriginal', Description => 'Shooting Date/Time', PrintConv => 'ExifTool::ConvertExifDate($val)', }, 0x9004 => { Name => 'CreateDate', Description => 'Date/Time of digitization', PrintConv => 'ExifTool::ConvertExifDate($val)', }, 0x9101 => { Name => 'ComponentsConfiguration', PrintConv => '$_=$val;tr/\x01-\x06/YbrRGB/;s/b/Cb/g;s/r/Cr/g;return $_', }, 0x9102 => 'CompressedBitsPerPixel', 0x9201 => { Name => 'ShutterSpeedValue', ValueConv => 'abs($val)<100 ? 1/(2**$val) : 0', PrintConv => 'TagTables::Exif::PrintExposureTime($val)', }, 0x9202 => { Name => 'ApertureValue', ValueConv => 'sqrt(2) ** $val', PrintConv => 'sprintf("%.1f",$val)', }, 0x9203 => 'BrightnessValue', 0x9204 => { Name => 'ExposureCompensation', PrintConv => 'TagTables::Exif::ConvertFraction($val)', }, 0x9205 => { Name => 'MaxApertureValue', ValueConv => 'sqrt(2) ** $val', PrintConv => 'sprintf("%.1f",$val)', }, 0x9206 => { Name => 'SubjectDistance', PrintConv => '"$val m"', }, 0x9207 => { Name => 'MeteringMode', PrintConv => { 0 => 'Unknown', 1 => 'Average', 2 => 'Center-weighted average', 3 => 'Spot', 4 => 'Multi-spot', 5 => 'Multi-segment', 6 => 'Partial', 255 => 'Other', }, }, 0x9208 => { Name => 'LightSource', PrintConv => { 0 => 'Unknown', 1 => 'Daylight', 2 => 'Fluorescent', 3 => 'Tungsten', 10 => 'Flash', 17 => 'Standard light A', 18 => 'Standard light B', 19 => 'Standard light C', 20 => 'D55', 21 => 'D65', 22 => 'D75', 23 => 'D50', 24 => 'ISO Studio tungsten', 255 => 'Other', }, }, 0x9209 => { Name => 'Flash', PrintConv => { 0x00 => 'No Flash', 0x01 => 'Fired', 0x05 => 'Fired, Return not detected', 0x07 => 'Fired, Return detected', 0x09 => 'On', 0x0d => 'On, Return not detected', 0x0f => 'On, Return detected', 0x10 => 'Off', 0x18 => 'Auto, Did not fire', 0x19 => 'Auto, Fired', 0x1d => 'Auto, Fired, Return not detected', 0x1f => 'Auto, Fired, Return detected', 0x20 => 'No flash function', 0x41 => 'Fired, Red-eye reduction', 0x45 => 'Fired, Red-eye reduction, Return not detected', 0x47 => 'Fired, Red-eye reduction, Return detected', 0x49 => 'On, Red-eye reduction', 0x4d => 'On, Red-eye reduction, Return not detected', 0x4f => 'On, Red-eye reduction, Return detected', 0x59 => 'Auto, Fired, Red-eye reduction', 0x5d => 'Auto, Fired, Red-eye reduction, Return not detected', 0x5f => 'Auto, Fired, Red-eye reduction, Return detected', }, }, 0x920a => { Name => 'FocalLength', PrintConv => 'sprintf("%.1fmm",$val)', }, #---------------------------------------------------------------------------- # decide which MakerNotes to use (based on camera make/model) # 0x927c => [ # square brackets for a conditional list { Condition => '$::cameraMake =~ /^Canon/', Name => 'MakerNoteCanon', SubDirectory => { TagTable => 'TagTables::Canon::Main', Start => '$valuePtr', }, }, { # The Fuji programmers really botched this one up, # but with a bit of work we can still read this directory Condition => '$::cameraMake =~ /^FUJIFILM/', Name => 'MakerNoteFujiFilm', SubDirectory => { TagTable => 'TagTables::FujiFilm::Main', Start => '$valuePtr', # there is an 8-byte maker tag (FUJIFILM) we must skip over OffsetPt => '$valuePtr+8', ByteOrder => 'LittleEndian', # the pointers are relative to the subdirectory start # (before adding the offsetPt). Weird - PH Base => '$start', }, }, { Condition => '$::cameraMake =~ /^PENTAX/', Name => 'MakerNotePentax', SubDirectory => { TagTable => 'TagTables::Pentax::Main', Start => '$valuePtr+6', ByteOrder => 'BigEndian', }, }, { Condition => '$::cameraMake =~ /^OLYMPUS/', Name => 'MakerNoteOlympus', SubDirectory => { TagTable => 'TagTables::Olympus::Main',
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -