- Timestamp:
- 2011-06-01T12:33:42+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Sigma.pm
r16842 r24107 6 6 # Revisions: 04/06/2004 - P. Harvey Created 7 7 # 02/20/2007 - PH added SD14 tags 8 # 24/06/2010 - PH decode some SD15 tags 8 9 # 9 10 # Reference: http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html … … 16 17 use Image::ExifTool::Exif; 17 18 18 $VERSION = '1.0 4';19 $VERSION = '1.09'; 19 20 20 21 %Image::ExifTool::Sigma::Main = ( … … 46 47 }, 47 48 }, 48 0x000a => 'Lens ',49 0x000a => 'LensFocalRange', 49 50 0x000b => 'ColorSpace', 51 # SIGMA PhotoPro writes these tags as strings, but some cameras (at least) write them as rational 50 52 0x000c => [ 51 53 { 52 54 Name => 'ExposureCompensation', 53 Condition => '$ $self{CameraModel} !~ /SD14$/',55 Condition => '$format eq "string"', 54 56 ValueConv => '$val =~ s/Expo:\s*//, $val', 55 57 ValueConvInv => 'IsFloat($val) ? sprintf("Expo:%+.1f",$val) : undef', 56 58 }, 57 59 { #PH 58 Name => ' UnknownCompensation',60 Name => 'ExposureAdjust', 59 61 Writable => 'rational64s', 60 62 Unknown => 1, … … 64 66 { 65 67 Name => 'Contrast', 66 Condition => '$ $self{CameraModel} !~ /SD14$/',68 Condition => '$format eq "string"', 67 69 ValueConv => '$val =~ s/Cont:\s*//, $val', 68 70 ValueConvInv => 'IsFloat($val) ? sprintf("Cont:%+.1f",$val) : undef', … … 76 78 { 77 79 Name => 'Shadow', 78 Condition => '$ $self{CameraModel} !~ /SD14$/',80 Condition => '$format eq "string"', 79 81 ValueConv => '$val =~ s/Shad:\s*//, $val', 80 82 ValueConvInv => 'IsFloat($val) ? sprintf("Shad:%+.1f",$val) : undef', … … 88 90 { 89 91 Name => 'Highlight', 90 Condition => '$ $self{CameraModel} !~ /SD14$/',92 Condition => '$format eq "string"', 91 93 ValueConv => '$val =~ s/High:\s*//, $val', 92 94 ValueConvInv => 'IsFloat($val) ? sprintf("High:%+.1f",$val) : undef', … … 100 102 { 101 103 Name => 'Saturation', 102 Condition => '$ $self{CameraModel} !~ /SD14$/',104 Condition => '$format eq "string"', 103 105 ValueConv => '$val =~ s/Satu:\s*//, $val', 104 106 ValueConvInv => 'IsFloat($val) ? sprintf("Satu:%+.1f",$val) : undef', … … 112 114 { 113 115 Name => 'Sharpness', 114 Condition => '$ $self{CameraModel} !~ /SD14$/',116 Condition => '$format eq "string"', 115 117 ValueConv => '$val =~ s/Shar:\s*//, $val', 116 118 ValueConvInv => 'IsFloat($val) ? sprintf("Shar:%+.1f",$val) : undef', … … 124 126 { 125 127 Name => 'X3FillLight', 126 Condition => '$ $self{CameraModel} !~ /SD14$/',128 Condition => '$format eq "string"', 127 129 ValueConv => '$val =~ s/Fill:\s*//, $val', 128 130 ValueConvInv => 'IsFloat($val) ? sprintf("Fill:%+.1f",$val) : undef', … … 136 138 { 137 139 Name => 'ColorAdjustment', 138 Condition => '$ $self{CameraModel} !~ /SD14$/',140 Condition => '$format eq "string"', 139 141 ValueConv => '$val =~ s/CC:\s*//, $val', 140 142 ValueConvInv => 'IsInt($val) ? "CC:$val" : undef', … … 155 157 0x0018 => 'Software', 156 158 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 }, 160 193 0x001d => { #PH 161 194 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 }, 166 202 # 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?) 175 227 # 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 }, 177 232 0x0031 => { #PH 178 233 Name => 'FNumber', … … 185 240 Writable => 'rational64u', 186 241 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 191 257 0x0035 => { #PH 192 258 Name => 'ExposureCompensation', 193 259 Writable => 'rational64s', 260 # add a '+' sign to positive values 261 PrintConv => '$val and $val =~ s/^(\d)/\+$1/; $val', 262 PrintConvInv => '$val', 194 263 }, 195 264 # 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 198 273 Name => 'FlashExposureComp', 199 274 Writable => 'rational64s', … … 204 279 }, 205 280 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 }, 206 285 ); 207 286 … … 225 304 =head1 AUTHOR 226 305 227 Copyright 2003-20 07, Phil Harvey (phil at owl.phy.queensu.ca)306 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca) 228 307 229 308 This library is free software; you can redistribute it and/or modify it
Note:
See TracChangeset
for help on using the changeset viewer.