cul_image_props 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1075 @@
1
+ require 'cul_image_props/image/properties/exif/types'
2
+ module Cul
3
+ module Image
4
+ module Properties
5
+ module Exif
6
+
7
+ # Don't throw an exception when given an out of range character.
8
+ def self.make_string(seq)
9
+ str = ''
10
+ seq.each { |c|
11
+ # Screen out non-printing characters
12
+ if 32 <= c and c < 256
13
+ str += chr(c)
14
+ end
15
+ }
16
+ # If no printing chars
17
+ if not str.length == 0
18
+ return seq
19
+ end
20
+ return str
21
+ end
22
+ # Special version to deal with the code in the first 8 bytes of a user comment.
23
+ # First 8 bytes gives coding system e.g. ASCII vs. JIS vs Unicode
24
+ def self.make_string_uc(seq)
25
+ code = seq[0, 8]
26
+ seq = seq[8 ... seq.length]
27
+ # Of course, this is only correct if ASCII, and the standard explicitly
28
+ # allows JIS and Unicode.
29
+ return make_string(seq)
30
+ end
31
+
32
+ # decode Olympus SpecialMode tag in MakerNote
33
+ def self.olympus_special_mode(v)
34
+ a=[
35
+ 'Normal',
36
+ 'Unknown',
37
+ 'Fast',
38
+ 'Panorama']
39
+ b=[
40
+ 'Non-panoramic',
41
+ 'Left to right',
42
+ 'Right to left',
43
+ 'Bottom to top',
44
+ 'Top to bottom']
45
+ if v[0] >= a.length or v[2] >= b.length
46
+ return v
47
+ end
48
+ return format("%s - sequence %d - %s", a[v[0]], v[1], b[v[2]])
49
+ end
50
+
51
+ # http =>//tomtia.plala.jp/DigitalCamera/MakerNote/index.asp
52
+ def self.nikon_ev_bias(seq)
53
+ # First digit seems to be in steps of 1/6 EV.
54
+ # Does the third value mean the step size? It is usually 6,
55
+ # but it is 12 for the ExposureDifference.
56
+ #
57
+ # Check for an error condition that could cause a crash.
58
+ # This only happens if something has gone really wrong in
59
+ # reading the Nikon MakerNote.
60
+ return "" if len( seq ) < 4
61
+ #
62
+ case seq
63
+ when [252, 1, 6, 0]
64
+ return "-2/3 EV"
65
+ when [253, 1, 6, 0]
66
+ return "-1/2 EV"
67
+ when [254, 1, 6, 0]
68
+ return "-1/3 EV"
69
+ when [0, 1, 6, 0]
70
+ return "0 EV"
71
+ when [2, 1, 6, 0]
72
+ return "+1/3 EV"
73
+ when [3, 1, 6, 0]
74
+ return "+1/2 EV"
75
+ when [4, 1, 6, 0]
76
+ return "+2/3 EV"
77
+ end
78
+ # Handle combinations not in the table.
79
+ a = seq[0]
80
+ # Causes headaches for the +/- logic, so special case it.
81
+ if a == 0
82
+ return "0 EV"
83
+ elsif a > 127
84
+ a = 256 - a
85
+ ret_str = "-"
86
+ else
87
+ ret_str = "+"
88
+ end
89
+ b = seq[2] # Assume third value means the step size
90
+ whole = a / b
91
+ a = a % b
92
+ if whole != 0
93
+ ret_str = ret_str + str(whole) + " "
94
+ end
95
+ if a == 0
96
+ ret_str = ret_str + "EV"
97
+ else
98
+ r = Ratio(a, b)
99
+ ret_str = ret_str + r.__repr__() + " EV"
100
+ end
101
+ return ret_str
102
+ end
103
+
104
+
105
+ # field type descriptions as (length, abbreviation, full name) tuples
106
+ FIELD_TYPES = [
107
+ FieldType.new(0, 'X', 'Proprietary'), # no such type
108
+ FieldType.new(1, 'B', 'Byte'),
109
+ FieldType.new(1, 'A', 'ASCII'),
110
+ FieldType.new(2, 'S', 'Short'),
111
+ FieldType.new(4, 'L', 'Long'),
112
+ FieldType.new(8, 'R', 'Ratio'),
113
+ FieldType.new(1, 'SB', 'Signed Byte'),
114
+ FieldType.new(1, 'U', 'Undefined'),
115
+ FieldType.new(2, 'SS', 'Signed Short'),
116
+ FieldType.new(4, 'SL', 'Signed Long'),
117
+ FieldType.new(8, 'SR', 'Signed Ratio')
118
+ ]
119
+
120
+ # dictionary of main EXIF tag names
121
+ EXIF_TAGS = {
122
+ 0x0100 => TagName.new('ImageWidth'),
123
+ 0x0101 => TagName.new('ImageLength'),
124
+ 0x0102 => TagName.new('BitsPerSample'),
125
+ 0x0103 => TagName.new('Compression',
126
+ {1 => 'Uncompressed',
127
+ 2 => 'CCITT 1D',
128
+ 3 => 'T4/Group 3 Fax',
129
+ 4 => 'T6/Group 4 Fax',
130
+ 5 => 'LZW',
131
+ 6 => 'JPEG (old-style)',
132
+ 7 => 'JPEG',
133
+ 8 => 'Adobe Deflate',
134
+ 9 => 'JBIG B&W',
135
+ 10 => 'JBIG Color',
136
+ 32766 => 'Next',
137
+ 32769 => 'Epson ERF Compressed',
138
+ 32771 => 'CCIRLEW',
139
+ 32773 => 'PackBits',
140
+ 32809 => 'Thunderscan',
141
+ 32895 => 'IT8CTPAD',
142
+ 32896 => 'IT8LW',
143
+ 32897 => 'IT8MP',
144
+ 32898 => 'IT8BL',
145
+ 32908 => 'PixarFilm',
146
+ 32909 => 'PixarLog',
147
+ 32946 => 'Deflate',
148
+ 32947 => 'DCS',
149
+ 34661 => 'JBIG',
150
+ 34676 => 'SGILog',
151
+ 34677 => 'SGILog24',
152
+ 34712 => 'JPEG 2000',
153
+ 34713 => 'Nikon NEF Compressed',
154
+ 65000 => 'Kodak DCR Compressed',
155
+ 65535 => 'Pentax PEF Compressed'}),
156
+ 0x0106 => TagName.new('PhotometricInterpretation'),
157
+ 0x0107 => TagName.new('Thresholding'),
158
+ 0x010A => TagName.new('FillOrder'),
159
+ 0x010D => TagName.new('DocumentName'),
160
+ 0x010E => TagName.new('ImageDescription'),
161
+ 0x010F => TagName.new('Make'),
162
+ 0x0110 => TagName.new('Model'),
163
+ 0x0111 => TagName.new('StripOffsets'),
164
+ 0x0112 => TagName.new('Orientation',
165
+ {1 => 'Horizontal (normal)',
166
+ 2 => 'Mirrored horizontal',
167
+ 3 => 'Rotated 180',
168
+ 4 => 'Mirrored vertical',
169
+ 5 => 'Mirrored horizontal then rotated 90 CCW',
170
+ 6 => 'Rotated 90 CW',
171
+ 7 => 'Mirrored horizontal then rotated 90 CW',
172
+ 8 => 'Rotated 90 CCW'}),
173
+ 0x0115 => TagName.new('SamplesPerPixel'),
174
+ 0x0116 => TagName.new('RowsPerStrip'),
175
+ 0x0117 => TagName.new('StripByteCounts'),
176
+ 0x011A => TagName.new('XResolution'),
177
+ 0x011B => TagName.new('YResolution'),
178
+ 0x011C => TagName.new('PlanarConfiguration'),
179
+ 0x011D => TagName.new('PageName', self.method(:make_string)),
180
+ 0x0128 => TagName.new('ResolutionUnit',
181
+ { 1 => 'Not Absolute',
182
+ 2 => 'Pixels/Inch',
183
+ 3 => 'Pixels/Centimeter' }),
184
+ 0x012D => TagName.new('TransferFunction'),
185
+ 0x0131 => TagName.new('Software'),
186
+ 0x0132 => TagName.new('DateTime'),
187
+ 0x013B => TagName.new('Artist'),
188
+ 0x013E => TagName.new('WhitePoint'),
189
+ 0x013F => TagName.new('PrimaryChromaticities'),
190
+ 0x0156 => TagName.new('TransferRange'),
191
+ 0x0200 => TagName.new('JPEGProc'),
192
+ 0x0201 => TagName.new('JPEGInterchangeFormat'),
193
+ 0x0202 => TagName.new('JPEGInterchangeFormatLength'),
194
+ 0x0211 => TagName.new('YCbCrCoefficients'),
195
+ 0x0212 => TagName.new('YCbCrSubSampling'),
196
+ 0x0213 => TagName.new('YCbCrPositioning',
197
+ {1 => 'Centered',
198
+ 2 => 'Co-sited'}),
199
+ 0x0214 => TagName.new('ReferenceBlackWhite'),
200
+
201
+ 0x4746 => TagName.new('Rating'),
202
+
203
+ 0x828D => TagName.new('CFARepeatPatternDim'),
204
+ 0x828E => TagName.new('CFAPattern'),
205
+ 0x828F => TagName.new('BatteryLevel'),
206
+ 0x8298 => TagName.new('Copyright'),
207
+ 0x829A => TagName.new('ExposureTime'),
208
+ 0x829D => TagName.new('FNumber'),
209
+ 0x83BB => TagName.new('IPTC/NAA'),
210
+ 0x8769 => TagName.new('ExifOffset'),
211
+ 0x8773 => TagName.new('InterColorProfile'),
212
+ 0x8822 => TagName.new('ExposureProgram',
213
+ {0 => 'Unidentified',
214
+ 1 => 'Manual',
215
+ 2 => 'Program Normal',
216
+ 3 => 'Aperture Priority',
217
+ 4 => 'Shutter Priority',
218
+ 5 => 'Program Creative',
219
+ 6 => 'Program Action',
220
+ 7 => 'Portrait Mode',
221
+ 8 => 'Landscape Mode'}),
222
+ 0x8824 => TagName.new('SpectralSensitivity'),
223
+ 0x8825 => TagName.new('GPSInfo'),
224
+ 0x8827 => TagName.new('ISOSpeedRatings'),
225
+ 0x8828 => TagName.new('OECF'),
226
+ 0x9000 => TagName.new('ExifVersion', self.method(:make_string)),
227
+ 0x9003 => TagName.new('DateTimeOriginal'),
228
+ 0x9004 => TagName.new('DateTimeDigitized'),
229
+ 0x9101 => TagName.new('ComponentsConfiguration',
230
+ {0 => '',
231
+ 1 => 'Y',
232
+ 2 => 'Cb',
233
+ 3 => 'Cr',
234
+ 4 => 'Red',
235
+ 5 => 'Green',
236
+ 6 => 'Blue'}),
237
+ 0x9102 => TagName.new('CompressedBitsPerPixel'),
238
+ 0x9201 => TagName.new('ShutterSpeedValue'),
239
+ 0x9202 => TagName.new('ApertureValue'),
240
+ 0x9203 => TagName.new('BrightnessValue'),
241
+ 0x9204 => TagName.new('ExposureBiasValue'),
242
+ 0x9205 => TagName.new('MaxApertureValue'),
243
+ 0x9206 => TagName.new('SubjectDistance'),
244
+ 0x9207 => TagName.new('MeteringMode',
245
+ {0 => 'Unidentified',
246
+ 1 => 'Average',
247
+ 2 => 'CenterWeightedAverage',
248
+ 3 => 'Spot',
249
+ 4 => 'MultiSpot',
250
+ 5 => 'Pattern'}),
251
+ 0x9208 => TagName.new('LightSource',
252
+ {0 => 'Unknown',
253
+ 1 => 'Daylight',
254
+ 2 => 'Fluorescent',
255
+ 3 => 'Tungsten',
256
+ 9 => 'Fine Weather',
257
+ 10 => 'Flash',
258
+ 11 => 'Shade',
259
+ 12 => 'Daylight Fluorescent',
260
+ 13 => 'Day White Fluorescent',
261
+ 14 => 'Cool White Fluorescent',
262
+ 15 => 'White Fluorescent',
263
+ 17 => 'Standard Light A',
264
+ 18 => 'Standard Light B',
265
+ 19 => 'Standard Light C',
266
+ 20 => 'D55',
267
+ 21 => 'D65',
268
+ 22 => 'D75',
269
+ 255 => 'Other'}),
270
+ 0x9209 => TagName.new('Flash',
271
+ {0 => 'No',
272
+ 1 => 'Fired',
273
+ 5 => 'Fired (?)', # no return sensed
274
+ 7 => 'Fired (!)', # return sensed
275
+ 9 => 'Fill Fired',
276
+ 13 => 'Fill Fired (?)',
277
+ 15 => 'Fill Fired (!)',
278
+ 16 => 'Off',
279
+ 24 => 'Auto Off',
280
+ 25 => 'Auto Fired',
281
+ 29 => 'Auto Fired (?)',
282
+ 31 => 'Auto Fired (!)',
283
+ 32 => 'Not Available'}),
284
+ 0x920A => TagName.new('FocalLength'),
285
+ 0x9214 => TagName.new('SubjectArea'),
286
+ 0x927C => TagName.new('MakerNote'),
287
+ 0x9286 => TagName.new('UserComment', self.method(:make_string_uc)),
288
+ 0x9290 => TagName.new('SubSecTime'),
289
+ 0x9291 => TagName.new('SubSecTimeOriginal'),
290
+ 0x9292 => TagName.new('SubSecTimeDigitized'),
291
+
292
+ # used by Windows Explorer
293
+ 0x9C9B => TagName.new('XPTitle'),
294
+ 0x9C9C => TagName.new('XPComment'),
295
+ 0x9C9D => TagName.new('XPAuthor'), #(ignored by Windows Explorer if Artist exists)
296
+ 0x9C9E => TagName.new('XPKeywords'),
297
+ 0x9C9F => TagName.new('XPSubject'),
298
+
299
+ 0xA000 => TagName.new('FlashPixVersion', self.method(:make_string)),
300
+ 0xA001 => TagName.new('ColorSpace',
301
+ {1 => 'sRGB',
302
+ 2 => 'Adobe RGB',
303
+ 65535 => 'Uncalibrated'}),
304
+ 0xA002 => TagName.new('ExifImageWidth'),
305
+ 0xA003 => TagName.new('ExifImageLength'),
306
+ 0xA005 => TagName.new('InteroperabilityOffset'),
307
+ 0xA20B => TagName.new('FlashEnergy'), # 0x920B in TIFF/EP
308
+ 0xA20C => TagName.new('SpatialFrequencyResponse'), # 0x920C
309
+ 0xA20E => TagName.new('FocalPlaneXResolution'), # 0x920E
310
+ 0xA20F => TagName.new('FocalPlaneYResolution'), # 0x920F
311
+ 0xA210 => TagName.new('FocalPlaneResolutionUnit'), # 0x9210
312
+ 0xA214 => TagName.new('SubjectLocation'), # 0x9214
313
+ 0xA215 => TagName.new('ExposureIndex'), # 0x9215
314
+ 0xA217 => TagName.new('SensingMethod', # 0x9217
315
+ {1 => 'Not defined',
316
+ 2 => 'One-chip color area',
317
+ 3 => 'Two-chip color area',
318
+ 4 => 'Three-chip color area',
319
+ 5 => 'Color sequential area',
320
+ 7 => 'Trilinear',
321
+ 8 => 'Color sequential linear'}),
322
+ 0xA300 => TagName.new('FileSource',
323
+ {1 => 'Film Scanner',
324
+ 2 => 'Reflection Print Scanner',
325
+ 3 => 'Digital Camera'}),
326
+ 0xA301 => TagName.new('SceneType',
327
+ {1 => 'Directly Photographed'}),
328
+ 0xA302 => TagName.new('CVAPattern'),
329
+ 0xA401 => TagName.new('CustomRendered',
330
+ {0 => 'Normal',
331
+ 1 => 'Custom'}),
332
+ 0xA402 => TagName.new('ExposureMode',
333
+ {0 => 'Auto Exposure',
334
+ 1 => 'Manual Exposure',
335
+ 2 => 'Auto Bracket'}),
336
+ 0xA403 => TagName.new('WhiteBalance',
337
+ {0 => 'Auto',
338
+ 1 => 'Manual'}),
339
+ 0xA404 => TagName.new('DigitalZoomRatio'),
340
+ 0xA405 => TagName.new('FocalLengthIn35mmFilm'),
341
+ 0xA406 => TagName.new('SceneCaptureType',
342
+ {0 => 'Standard',
343
+ 1 => 'Landscape',
344
+ 2 => 'Portrait',
345
+ 3 => 'Night)'}),
346
+ 0xA407 => TagName.new('GainControl',
347
+ {0 => 'None',
348
+ 1 => 'Low gain up',
349
+ 2 => 'High gain up',
350
+ 3 => 'Low gain down',
351
+ 4 => 'High gain down'}),
352
+ 0xA408 => TagName.new('Contrast',
353
+ {0 => 'Normal',
354
+ 1 => 'Soft',
355
+ 2 => 'Hard'}),
356
+ 0xA409 => TagName.new('Saturation',
357
+ {0 => 'Normal',
358
+ 1 => 'Soft',
359
+ 2 => 'Hard'}),
360
+ 0xA40A => TagName.new('Sharpness',
361
+ {0 => 'Normal',
362
+ 1 => 'Soft',
363
+ 2 => 'Hard'}),
364
+ 0xA40B => TagName.new('DeviceSettingDescription'),
365
+ 0xA40C => TagName.new('SubjectDistanceRange'),
366
+ 0xA500 => TagName.new('Gamma'),
367
+ 0xC4A5 => TagName.new('PrintIM'),
368
+ 0xEA1C => TagName.new('Padding')
369
+ }
370
+
371
+ # interoperability tags
372
+ INTR_TAGS = {
373
+ 0x0001 => TagName.new('InteroperabilityIndex'),
374
+ 0x0002 => TagName.new('InteroperabilityVersion'),
375
+ 0x1000 => TagName.new('RelatedImageFileFormat'),
376
+ 0x1001 => TagName.new('RelatedImageWidth'),
377
+ 0x1002 => TagName.new('RelatedImageLength')
378
+ }
379
+
380
+ # Ignore these tags when quick processing
381
+ # 0x927C is MakerNote Tags
382
+ # 0x9286 is user comment
383
+ IGNORE_TAGS = [0x9286, 0x927C]
384
+
385
+
386
+ MAKERNOTE_OLYMPUS_TAGS = {
387
+ # ah HAH! those sneeeeeaky bastids! this is how they get past the fact
388
+ # that a JPEG thumbnail is not allowed in an uncompressed TIFF file
389
+ 0x0100 => TagName.new('JPEGThumbnail'),
390
+ 0x0200 => TagName.new('SpecialMode', self.method(:olympus_special_mode)),
391
+ 0x0201 => TagName.new('JPEGQual',
392
+ {1 => 'SQ',
393
+ 2 => 'HQ',
394
+ 3 => 'SHQ'}),
395
+ 0x0202 => TagName.new('Macro',
396
+ {0 => 'Normal',
397
+ 1 => 'Macro',
398
+ 2 => 'SuperMacro'}),
399
+ 0x0203 => TagName.new('BWMode',
400
+ {0 => 'Off',
401
+ 1 => 'On'}),
402
+ 0x0204 => TagName.new('DigitalZoom'),
403
+ 0x0205 => TagName.new('FocalPlaneDiagonal'),
404
+ 0x0206 => TagName.new('LensDistortionParams'),
405
+ 0x0207 => TagName.new('SoftwareRelease'),
406
+ 0x0208 => TagName.new('PictureInfo'),
407
+ 0x0209 => TagName.new('CameraID', self.method(:make_string)), # print as string
408
+ 0x0F00 => TagName.new('DataDump'),
409
+ 0x0300 => TagName.new('PreCaptureFrames'),
410
+ 0x0404 => TagName.new('SerialNumber'),
411
+ 0x1000 => TagName.new('ShutterSpeedValue'),
412
+ 0x1001 => TagName.new('ISOValue'),
413
+ 0x1002 => TagName.new('ApertureValue'),
414
+ 0x1003 => TagName.new('BrightnessValue'),
415
+ 0x1004 => TagName.new('FlashMode'),
416
+ 0x1004 => TagName.new('FlashMode',
417
+ {2 => 'On',
418
+ 3 => 'Off'}),
419
+ 0x1005 => TagName.new('FlashDevice',
420
+ {0 => 'None',
421
+ 1 => 'Internal',
422
+ 4 => 'External',
423
+ 5 => 'Internal + External'}),
424
+ 0x1006 => TagName.new('ExposureCompensation'),
425
+ 0x1007 => TagName.new('SensorTemperature'),
426
+ 0x1008 => TagName.new('LensTemperature'),
427
+ 0x100b => TagName.new('FocusMode',
428
+ {0 => 'Auto',
429
+ 1 => 'Manual'}),
430
+ 0x1017 => TagName.new('RedBalance'),
431
+ 0x1018 => TagName.new('BlueBalance'),
432
+ 0x101a => TagName.new('SerialNumber'),
433
+ 0x1023 => TagName.new('FlashExposureComp'),
434
+ 0x1026 => TagName.new('ExternalFlashBounce',
435
+ {0 => 'No',
436
+ 1 => 'Yes'}),
437
+ 0x1027 => TagName.new('ExternalFlashZoom'),
438
+ 0x1028 => TagName.new('ExternalFlashMode'),
439
+ 0x1029 => TagName.new('Contrast int16u',
440
+ {0 => 'High',
441
+ 1 => 'Normal',
442
+ 2 => 'Low'}),
443
+ 0x102a => TagName.new('SharpnessFactor'),
444
+ 0x102b => TagName.new('ColorControl'),
445
+ 0x102c => TagName.new('ValidBits'),
446
+ 0x102d => TagName.new('CoringFilter'),
447
+ 0x102e => TagName.new('OlympusImageWidth'),
448
+ 0x102f => TagName.new('OlympusImageHeight'),
449
+ 0x1034 => TagName.new('CompressionRatio'),
450
+ 0x1035 => TagName.new('PreviewImageValid',
451
+ {0 => 'No',
452
+ 1 => 'Yes'}),
453
+ 0x1036 => TagName.new('PreviewImageStart'),
454
+ 0x1037 => TagName.new('PreviewImageLength'),
455
+ 0x1039 => TagName.new('CCDScanMode',
456
+ {0 => 'Interlaced',
457
+ 1 => 'Progressive'}),
458
+ 0x103a => TagName.new('NoiseReduction',
459
+ {0 => 'Off',
460
+ 1 => 'On'}),
461
+ 0x103b => TagName.new('InfinityLensStep'),
462
+ 0x103c => TagName.new('NearLensStep'),
463
+
464
+ # TODO - these need extra definitions
465
+ # http =>//search.cpan.org/src/EXIFTOOL/Image-ExifTool-6.90/html/TagNames/Olympus.html
466
+ 0x2010 => TagName.new('Equipment'),
467
+ 0x2020 => TagName.new('CameraSettings'),
468
+ 0x2030 => TagName.new('RawDevelopment'),
469
+ 0x2040 => TagName.new('ImageProcessing'),
470
+ 0x2050 => TagName.new('FocusInfo'),
471
+ 0x3000 => TagName.new('RawInfo '),
472
+ }
473
+
474
+ # 0x2020 CameraSettings
475
+ MAKERNOTE_OLYMPUS_TAG_0x2020={
476
+ 0x0100 => TagName.new('PreviewImageValid',
477
+ {0 => 'No',
478
+ 1 => 'Yes'}),
479
+ 0x0101 => TagName.new('PreviewImageStart'),
480
+ 0x0102 => TagName.new('PreviewImageLength'),
481
+ 0x0200 => TagName.new('ExposureMode',
482
+ {1 => 'Manual',
483
+ 2 => 'Program',
484
+ 3 => 'Aperture-priority AE',
485
+ 4 => 'Shutter speed priority AE',
486
+ 5 => 'Program-shift'}),
487
+ 0x0201 => TagName.new('AELock',
488
+ {0 => 'Off',
489
+ 1 => 'On'}),
490
+ 0x0202 => TagName.new('MeteringMode',
491
+ {2 => 'Center Weighted',
492
+ 3 => 'Spot',
493
+ 5 => 'ESP',
494
+ 261 => 'Pattern+AF',
495
+ 515 => 'Spot+Highlight control',
496
+ 1027 => 'Spot+Shadow control'}),
497
+ 0x0300 => TagName.new('MacroMode',
498
+ {0 => 'Off',
499
+ 1 => 'On'}),
500
+ 0x0301 => TagName.new('FocusMode',
501
+ {0 => 'Single AF',
502
+ 1 => 'Sequential shooting AF',
503
+ 2 => 'Continuous AF',
504
+ 3 => 'Multi AF',
505
+ 10 => 'MF'}),
506
+ 0x0302 => TagName.new('FocusProcess',
507
+ {0 => 'AF Not Used',
508
+ 1 => 'AF Used'}),
509
+ 0x0303 => TagName.new('AFSearch',
510
+ {0 => 'Not Ready',
511
+ 1 => 'Ready'}),
512
+ 0x0304 => TagName.new('AFAreas'),
513
+ 0x0401 => TagName.new('FlashExposureCompensation'),
514
+ 0x0500 => TagName.new('WhiteBalance2',
515
+ {0 => 'Auto',
516
+ 16 => '7500K (Fine Weather with Shade)',
517
+ 17 => '6000K (Cloudy)',
518
+ 18 => '5300K (Fine Weather)',
519
+ 20 => '3000K (Tungsten light)',
520
+ 21 => '3600K (Tungsten light-like)',
521
+ 33 => '6600K (Daylight fluorescent)',
522
+ 34 => '4500K (Neutral white fluorescent)',
523
+ 35 => '4000K (Cool white fluorescent)',
524
+ 48 => '3600K (Tungsten light-like)',
525
+ 256 => 'Custom WB 1',
526
+ 257 => 'Custom WB 2',
527
+ 258 => 'Custom WB 3',
528
+ 259 => 'Custom WB 4',
529
+ 512 => 'Custom WB 5400K',
530
+ 513 => 'Custom WB 2900K',
531
+ 514 => 'Custom WB 8000K', }),
532
+ 0x0501 => TagName.new('WhiteBalanceTemperature'),
533
+ 0x0502 => TagName.new('WhiteBalanceBracket'),
534
+ 0x0503 => TagName.new('CustomSaturation'), # (3 numbers => 1. CS Value, 2. Min, 3. Max)
535
+ 0x0504 => TagName.new('ModifiedSaturation',
536
+ {0 => 'Off',
537
+ 1 => 'CM1 (Red Enhance)',
538
+ 2 => 'CM2 (Green Enhance)',
539
+ 3 => 'CM3 (Blue Enhance)',
540
+ 4 => 'CM4 (Skin Tones)'}),
541
+ 0x0505 => TagName.new('ContrastSetting'), # (3 numbers => 1. Contrast, 2. Min, 3. Max)
542
+ 0x0506 => TagName.new('SharpnessSetting'), # (3 numbers => 1. Sharpness, 2. Min, 3. Max)
543
+ 0x0507 => TagName.new('ColorSpace',
544
+ {0 => 'sRGB',
545
+ 1 => 'Adobe RGB',
546
+ 2 => 'Pro Photo RGB'}),
547
+ 0x0509 => TagName.new('SceneMode',
548
+ {0 => 'Standard',
549
+ 6 => 'Auto',
550
+ 7 => 'Sport',
551
+ 8 => 'Portrait',
552
+ 9 => 'Landscape+Portrait',
553
+ 10 => 'Landscape',
554
+ 11 => 'Night scene',
555
+ 13 => 'Panorama',
556
+ 16 => 'Landscape+Portrait',
557
+ 17 => 'Night+Portrait',
558
+ 19 => 'Fireworks',
559
+ 20 => 'Sunset',
560
+ 22 => 'Macro',
561
+ 25 => 'Documents',
562
+ 26 => 'Museum',
563
+ 28 => 'Beach&Snow',
564
+ 30 => 'Candle',
565
+ 35 => 'Underwater Wide1',
566
+ 36 => 'Underwater Macro',
567
+ 39 => 'High Key',
568
+ 40 => 'Digital Image Stabilization',
569
+ 44 => 'Underwater Wide2',
570
+ 45 => 'Low Key',
571
+ 46 => 'Children',
572
+ 48 => 'Nature Macro'}),
573
+ 0x050a => TagName.new('NoiseReduction',
574
+ {0 => 'Off',
575
+ 1 => 'Noise Reduction',
576
+ 2 => 'Noise Filter',
577
+ 3 => 'Noise Reduction + Noise Filter',
578
+ 4 => 'Noise Filter (ISO Boost)',
579
+ 5 => 'Noise Reduction + Noise Filter (ISO Boost)'}),
580
+ 0x050b => TagName.new('DistortionCorrection',
581
+ {0 => 'Off',
582
+ 1 => 'On'}),
583
+ 0x050c => TagName.new('ShadingCompensation',
584
+ {0 => 'Off',
585
+ 1 => 'On'}),
586
+ 0x050d => TagName.new('CompressionFactor'),
587
+ 0x050f => TagName.new('Gradation',
588
+ {'-1 -1 1' => 'Low Key',
589
+ '0 -1 1' => 'Normal',
590
+ '1 -1 1' => 'High Key'}),
591
+ 0x0520 => TagName.new('PictureMode',
592
+ {1 => 'Vivid',
593
+ 2 => 'Natural',
594
+ 3 => 'Muted',
595
+ 256 => 'Monotone',
596
+ 512 => 'Sepia'}),
597
+ 0x0521 => TagName.new('PictureModeSaturation'),
598
+ 0x0522 => TagName.new('PictureModeHue?'),
599
+ 0x0523 => TagName.new('PictureModeContrast'),
600
+ 0x0524 => TagName.new('PictureModeSharpness'),
601
+ 0x0525 => TagName.new('PictureModeBWFilter',
602
+ {0 => 'n/a',
603
+ 1 => 'Neutral',
604
+ 2 => 'Yellow',
605
+ 3 => 'Orange',
606
+ 4 => 'Red',
607
+ 5 => 'Green'}),
608
+ 0x0526 => TagName.new('PictureModeTone',
609
+ {0 => 'n/a',
610
+ 1 => 'Neutral',
611
+ 2 => 'Sepia',
612
+ 3 => 'Blue',
613
+ 4 => 'Purple',
614
+ 5 => 'Green'}),
615
+ 0x0600 => TagName.new('Sequence'), # 2 or 3 numbers => 1. Mode, 2. Shot number, 3. Mode bits
616
+ 0x0601 => TagName.new('PanoramaMode'), # (2 numbers => 1. Mode, 2. Shot number)
617
+ 0x0603 => TagName.new('ImageQuality2',
618
+ {1 => 'SQ',
619
+ 2 => 'HQ',
620
+ 3 => 'SHQ',
621
+ 4 => 'RAW'}),
622
+ 0x0901 => TagName.new('ManometerReading')
623
+ }
624
+
625
+
626
+ MAKERNOTE_CASIO_TAGS={
627
+ 0x0001 => TagName.new('RecordingMode',
628
+ {1 => 'Single Shutter',
629
+ 2 => 'Panorama',
630
+ 3 => 'Night Scene',
631
+ 4 => 'Portrait',
632
+ 5 => 'Landscape'}),
633
+ 0x0002 => TagName.new('Quality',
634
+ {1 => 'Economy',
635
+ 2 => 'Normal',
636
+ 3 => 'Fine'}),
637
+ 0x0003 => TagName.new('FocusingMode',
638
+ {2 => 'Macro',
639
+ 3 => 'Auto Focus',
640
+ 4 => 'Manual Focus',
641
+ 5 => 'Infinity'}),
642
+ 0x0004 => TagName.new('FlashMode',
643
+ {1 => 'Auto',
644
+ 2 => 'On',
645
+ 3 => 'Off',
646
+ 4 => 'Red Eye Reduction'}),
647
+ 0x0005 => TagName.new('FlashIntensity',
648
+ {11 => 'Weak',
649
+ 13 => 'Normal',
650
+ 15 => 'Strong'}),
651
+ 0x0006 => TagName.new('Object Distance'),
652
+ 0x0007 => TagName.new('WhiteBalance',
653
+ {1 => 'Auto',
654
+ 2 => 'Tungsten',
655
+ 3 => 'Daylight',
656
+ 4 => 'Fluorescent',
657
+ 5 => 'Shade',
658
+ 129 => 'Manual'}),
659
+ 0x000B => TagName.new('Sharpness',
660
+ {0 => 'Normal',
661
+ 1 => 'Soft',
662
+ 2 => 'Hard'}),
663
+ 0x000C => TagName.new('Contrast',
664
+ {0 => 'Normal',
665
+ 1 => 'Low',
666
+ 2 => 'High'}),
667
+ 0x000D => TagName.new('Saturation',
668
+ {0 => 'Normal',
669
+ 1 => 'Low',
670
+ 2 => 'High'}),
671
+ 0x0014 => TagName.new('CCDSpeed',
672
+ {64 => 'Normal',
673
+ 80 => 'Normal',
674
+ 100 => 'High',
675
+ 125 => '+1.0',
676
+ 244 => '+3.0',
677
+ 250 => '+2.0'})
678
+ }
679
+
680
+ MAKERNOTE_FUJIFILM_TAGS={
681
+ 0x0000 => TagName.new('NoteVersion', self.method(:make_string)),
682
+ 0x1000 => TagName.new('Quality'),
683
+ 0x1001 => TagName.new('Sharpness',
684
+ {1 => 'Soft',
685
+ 2 => 'Soft',
686
+ 3 => 'Normal',
687
+ 4 => 'Hard',
688
+ 5 => 'Hard'}),
689
+ 0x1002 => TagName.new('WhiteBalance',
690
+ {0 => 'Auto',
691
+ 256 => 'Daylight',
692
+ 512 => 'Cloudy',
693
+ 768 => 'DaylightColor-Fluorescent',
694
+ 769 => 'DaywhiteColor-Fluorescent',
695
+ 770 => 'White-Fluorescent',
696
+ 1024 => 'Incandescent',
697
+ 3840 => 'Custom'}),
698
+ 0x1003 => TagName.new('Color',
699
+ {0 => 'Normal',
700
+ 256 => 'High',
701
+ 512 => 'Low'}),
702
+ 0x1004 => TagName.new('Tone',
703
+ {0 => 'Normal',
704
+ 256 => 'High',
705
+ 512 => 'Low'}),
706
+ 0x1010 => TagName.new('FlashMode',
707
+ {0 => 'Auto',
708
+ 1 => 'On',
709
+ 2 => 'Off',
710
+ 3 => 'Red Eye Reduction'}),
711
+ 0x1011 => TagName.new('FlashStrength'),
712
+ 0x1020 => TagName.new('Macro',
713
+ {0 => 'Off',
714
+ 1 => 'On'}),
715
+ 0x1021 => TagName.new('FocusMode',
716
+ {0 => 'Auto',
717
+ 1 => 'Manual'}),
718
+ 0x1030 => TagName.new('SlowSync',
719
+ {0 => 'Off',
720
+ 1 => 'On'}),
721
+ 0x1031 => TagName.new('PictureMode',
722
+ {0 => 'Auto',
723
+ 1 => 'Portrait',
724
+ 2 => 'Landscape',
725
+ 4 => 'Sports',
726
+ 5 => 'Night',
727
+ 6 => 'Program AE',
728
+ 256 => 'Aperture Priority AE',
729
+ 512 => 'Shutter Priority AE',
730
+ 768 => 'Manual Exposure'}),
731
+ 0x1100 => TagName.new('MotorOrBracket',
732
+ {0 => 'Off',
733
+ 1 => 'On'}),
734
+ 0x1300 => TagName.new('BlurWarning',
735
+ {0 => 'Off',
736
+ 1 => 'On'}),
737
+ 0x1301 => TagName.new('FocusWarning',
738
+ {0 => 'Off',
739
+ 1 => 'On'}),
740
+ 0x1302 => TagName.new('AEWarning',
741
+ {0 => 'Off',
742
+ 1 => 'On'})
743
+ }
744
+
745
+ MAKERNOTE_CANON_TAGS = {
746
+ 0x0006 => TagName.new('ImageType'),
747
+ 0x0007 => TagName.new('FirmwareVersion'),
748
+ 0x0008 => TagName.new('ImageNumber'),
749
+ 0x0009 => TagName.new('OwnerName')
750
+ }
751
+
752
+ # this is in element offset, name, optional value dictionary format
753
+ MAKERNOTE_CANON_TAG_0x001 = {
754
+ 1 => TagName.new('Macromode',
755
+ {1 => 'Macro',
756
+ 2 => 'Normal'}),
757
+ 2 => TagName.new('SelfTimer'),
758
+ 3 => TagName.new('Quality',
759
+ {2 => 'Normal',
760
+ 3 => 'Fine',
761
+ 5 => 'Superfine'}),
762
+ 4 => TagName.new('FlashMode',
763
+ {0 => 'Flash Not Fired',
764
+ 1 => 'Auto',
765
+ 2 => 'On',
766
+ 3 => 'Red-Eye Reduction',
767
+ 4 => 'Slow Synchro',
768
+ 5 => 'Auto + Red-Eye Reduction',
769
+ 6 => 'On + Red-Eye Reduction',
770
+ 16 => 'external flash'}),
771
+ 5 => TagName.new('ContinuousDriveMode',
772
+ {0 => 'Single Or Timer',
773
+ 1 => 'Continuous'}),
774
+ 7 => TagName.new('FocusMode',
775
+ {0 => 'One-Shot',
776
+ 1 => 'AI Servo',
777
+ 2 => 'AI Focus',
778
+ 3 => 'MF',
779
+ 4 => 'Single',
780
+ 5 => 'Continuous',
781
+ 6 => 'MF'}),
782
+ 10 => TagName.new('ImageSize',
783
+ {0 => 'Large',
784
+ 1 => 'Medium',
785
+ 2 => 'Small'}),
786
+ 11 => TagName.new('EasyShootingMode',
787
+ {0 => 'Full Auto',
788
+ 1 => 'Manual',
789
+ 2 => 'Landscape',
790
+ 3 => 'Fast Shutter',
791
+ 4 => 'Slow Shutter',
792
+ 5 => 'Night',
793
+ 6 => 'B&W',
794
+ 7 => 'Sepia',
795
+ 8 => 'Portrait',
796
+ 9 => 'Sports',
797
+ 10 => 'Macro/Close-Up',
798
+ 11 => 'Pan Focus'}),
799
+ 12 => TagName.new('DigitalZoom',
800
+ {0 => 'None',
801
+ 1 => '2x',
802
+ 2 => '4x'}),
803
+ 13 => TagName.new('Contrast',
804
+ {0xFFFF => 'Low',
805
+ 0 => 'Normal',
806
+ 1 => 'High'}),
807
+ 14 => TagName.new('Saturation',
808
+ {0xFFFF => 'Low',
809
+ 0 => 'Normal',
810
+ 1 => 'High'}),
811
+ 15 => TagName.new('Sharpness',
812
+ {0xFFFF => 'Low',
813
+ 0 => 'Normal',
814
+ 1 => 'High'}),
815
+ 16 => TagName.new('ISO',
816
+ {0 => 'See ISOSpeedRatings Tag',
817
+ 15 => 'Auto',
818
+ 16 => '50',
819
+ 17 => '100',
820
+ 18 => '200',
821
+ 19 => '400'}),
822
+ 17 => TagName.new('MeteringMode',
823
+ {3 => 'Evaluative',
824
+ 4 => 'Partial',
825
+ 5 => 'Center-weighted'}),
826
+ 18 => TagName.new('FocusType',
827
+ {0 => 'Manual',
828
+ 1 => 'Auto',
829
+ 3 => 'Close-Up (Macro)',
830
+ 8 => 'Locked (Pan Mode)'}),
831
+ 19 => TagName.new('AFPointSelected',
832
+ {0x3000 => 'None (MF)',
833
+ 0x3001 => 'Auto-Selected',
834
+ 0x3002 => 'Right',
835
+ 0x3003 => 'Center',
836
+ 0x3004 => 'Left'}),
837
+ 20 => TagName.new('ExposureMode',
838
+ {0 => 'Easy Shooting',
839
+ 1 => 'Program',
840
+ 2 => 'Tv-priority',
841
+ 3 => 'Av-priority',
842
+ 4 => 'Manual',
843
+ 5 => 'A-DEP'}),
844
+ 23 => TagName.new('LongFocalLengthOfLensInFocalUnits'),
845
+ 24 => TagName.new('ShortFocalLengthOfLensInFocalUnits'),
846
+ 25 => TagName.new('FocalUnitsPerMM'),
847
+ 28 => TagName.new('FlashActivity',
848
+ {0 => 'Did Not Fire',
849
+ 1 => 'Fired'}),
850
+ 29 => TagName.new('FlashDetails',
851
+ {14 => 'External E-TTL',
852
+ 13 => 'Internal Flash',
853
+ 11 => 'FP Sync Used',
854
+ 7 => '2nd("Rear")-Curtain Sync Used',
855
+ 4 => 'FP Sync Enabled'}),
856
+ 32 => TagName.new('FocusMode',
857
+ {0 => 'Single',
858
+ 1 => 'Continuous'})
859
+ }
860
+
861
+ MAKERNOTE_CANON_TAG_0x004 = {
862
+ 7 => TagName.new('WhiteBalance',
863
+ {0 => 'Auto',
864
+ 1 => 'Sunny',
865
+ 2 => 'Cloudy',
866
+ 3 => 'Tungsten',
867
+ 4 => 'Fluorescent',
868
+ 5 => 'Flash',
869
+ 6 => 'Custom'}),
870
+ 9 => TagName.new('SequenceNumber'),
871
+ 14 => TagName.new('AFPointUsed'),
872
+ 15 => TagName.new('FlashBias',
873
+ {0xFFC0 => '-2 EV',
874
+ 0xFFCC => '-1.67 EV',
875
+ 0xFFD0 => '-1.50 EV',
876
+ 0xFFD4 => '-1.33 EV',
877
+ 0xFFE0 => '-1 EV',
878
+ 0xFFEC => '-0.67 EV',
879
+ 0xFFF0 => '-0.50 EV',
880
+ 0xFFF4 => '-0.33 EV',
881
+ 0x0000 => '0 EV',
882
+ 0x000C => '0.33 EV',
883
+ 0x0010 => '0.50 EV',
884
+ 0x0014 => '0.67 EV',
885
+ 0x0020 => '1 EV',
886
+ 0x002C => '1.33 EV',
887
+ 0x0030 => '1.50 EV',
888
+ 0x0034 => '1.67 EV',
889
+ 0x0040 => '2 EV'}),
890
+ 19 => TagName.new('SubjectDistance')
891
+ }
892
+
893
+ # Nikon E99x MakerNote Tags
894
+ MAKERNOTE_NIKON_NEWER_TAGS={
895
+ 0x0001 => TagName.new('MakernoteVersion', self.method(:make_string)), # Sometimes binary
896
+ 0x0002 => TagName.new('ISOSetting', self.method(:make_string)),
897
+ 0x0003 => TagName.new('ColorMode'),
898
+ 0x0004 => TagName.new('Quality'),
899
+ 0x0005 => TagName.new('Whitebalance'),
900
+ 0x0006 => TagName.new('ImageSharpening'),
901
+ 0x0007 => TagName.new('FocusMode'),
902
+ 0x0008 => TagName.new('FlashSetting'),
903
+ 0x0009 => TagName.new('AutoFlashMode'),
904
+ 0x000B => TagName.new('WhiteBalanceBias'),
905
+ 0x000C => TagName.new('WhiteBalanceRBCoeff'),
906
+ 0x000D => TagName.new('ProgramShift', self.method(:nikon_ev_bias)),
907
+ # Nearly the same as the other EV vals, but step size is 1/12 EV (?)
908
+ 0x000E => TagName.new('ExposureDifference', self.method(:nikon_ev_bias)),
909
+ 0x000F => TagName.new('ISOSelection'),
910
+ 0x0011 => TagName.new('NikonPreview'),
911
+ 0x0012 => TagName.new('FlashCompensation', self.method(:nikon_ev_bias)),
912
+ 0x0013 => TagName.new('ISOSpeedRequested'),
913
+ 0x0016 => TagName.new('PhotoCornerCoordinates'),
914
+ 0x0018 => TagName.new('FlashBracketCompensationApplied', self.method(:nikon_ev_bias)),
915
+ 0x0019 => TagName.new('AEBracketCompensationApplied'),
916
+ 0x001A => TagName.new('ImageProcessing'),
917
+ 0x001B => TagName.new('CropHiSpeed'),
918
+ 0x001D => TagName.new('SerialNumber'), # Conflict with 0x00A0 ?
919
+ 0x001E => TagName.new('ColorSpace'),
920
+ 0x001F => TagName.new('VRInfo'),
921
+ 0x0020 => TagName.new('ImageAuthentication'),
922
+ 0x0022 => TagName.new('ActiveDLighting'),
923
+ 0x0023 => TagName.new('PictureControl'),
924
+ 0x0024 => TagName.new('WorldTime'),
925
+ 0x0025 => TagName.new('ISOInfo'),
926
+ 0x0080 => TagName.new('ImageAdjustment'),
927
+ 0x0081 => TagName.new('ToneCompensation'),
928
+ 0x0082 => TagName.new('AuxiliaryLens'),
929
+ 0x0083 => TagName.new('LensType'),
930
+ 0x0084 => TagName.new('LensMinMaxFocalMaxAperture'),
931
+ 0x0085 => TagName.new('ManualFocusDistance'),
932
+ 0x0086 => TagName.new('DigitalZoomFactor'),
933
+ 0x0087 => TagName.new('FlashMode',
934
+ {0x00 => 'Did Not Fire',
935
+ 0x01 => 'Fired, Manual',
936
+ 0x07 => 'Fired, External',
937
+ 0x08 => 'Fired, Commander Mode ',
938
+ 0x09 => 'Fired, TTL Mode'}),
939
+ 0x0088 => TagName.new('AFFocusPosition',
940
+ {0x0000 => 'Center',
941
+ 0x0100 => 'Top',
942
+ 0x0200 => 'Bottom',
943
+ 0x0300 => 'Left',
944
+ 0x0400 => 'Right'}),
945
+ 0x0089 => TagName.new('BracketingMode',
946
+ {0x00 => 'Single frame, no bracketing',
947
+ 0x01 => 'Continuous, no bracketing',
948
+ 0x02 => 'Timer, no bracketing',
949
+ 0x10 => 'Single frame, exposure bracketing',
950
+ 0x11 => 'Continuous, exposure bracketing',
951
+ 0x12 => 'Timer, exposure bracketing',
952
+ 0x40 => 'Single frame, white balance bracketing',
953
+ 0x41 => 'Continuous, white balance bracketing',
954
+ 0x42 => 'Timer, white balance bracketing'}),
955
+ 0x008A => TagName.new('AutoBracketRelease'),
956
+ 0x008B => TagName.new('LensFStops'),
957
+ 0x008C => TagName.new('NEFCurve1'), # ExifTool calls this 'ContrastCurve'
958
+ 0x008D => TagName.new('ColorMode'),
959
+ 0x008F => TagName.new('SceneMode'),
960
+ 0x0090 => TagName.new('LightingType'),
961
+ 0x0091 => TagName.new('ShotInfo'), # First 4 bytes are a version number in ASCII
962
+ 0x0092 => TagName.new('HueAdjustment'),
963
+ # ExifTool calls this 'NEFCompression', should be 1-4
964
+ 0x0093 => TagName.new('Compression'),
965
+ 0x0094 => TagName.new('Saturation',
966
+ {-3 => 'B&W',
967
+ -2 => '-2',
968
+ -1 => '-1',
969
+ 0 => '0',
970
+ 1 => '1',
971
+ 2 => '2'}),
972
+ 0x0095 => TagName.new('NoiseReduction'),
973
+ 0x0096 => TagName.new('NEFCurve2'), # ExifTool calls this 'LinearizationTable'
974
+ 0x0097 => TagName.new('ColorBalance'), # First 4 bytes are a version number in ASCII
975
+ 0x0098 => TagName.new('LensData'), # First 4 bytes are a version number in ASCII
976
+ 0x0099 => TagName.new('RawImageCenter'),
977
+ 0x009A => TagName.new('SensorPixelSize'),
978
+ 0x009C => TagName.new('Scene Assist'),
979
+ 0x009E => TagName.new('RetouchHistory'),
980
+ 0x00A0 => TagName.new('SerialNumber'),
981
+ 0x00A2 => TagName.new('ImageDataSize'),
982
+ # 00A3 => unknown - a single byte 0
983
+ # 00A4 => In NEF, looks like a 4 byte ASCII version number ('0200')
984
+ 0x00A5 => TagName.new('ImageCount'),
985
+ 0x00A6 => TagName.new('DeletedImageCount'),
986
+ 0x00A7 => TagName.new('TotalShutterReleases'),
987
+ # First 4 bytes are a version number in ASCII, with version specific
988
+ # info to follow. Its hard to treat it as a string due to embedded nulls.
989
+ 0x00A8 => TagName.new('FlashInfo'),
990
+ 0x00A9 => TagName.new('ImageOptimization'),
991
+ 0x00AA => TagName.new('Saturation'),
992
+ 0x00AB => TagName.new('DigitalVariProgram'),
993
+ 0x00AC => TagName.new('ImageStabilization'),
994
+ 0x00AD => TagName.new('Responsive AF'), # 'AFResponse'
995
+ 0x00B0 => TagName.new('MultiExposure'),
996
+ 0x00B1 => TagName.new('HighISONoiseReduction'),
997
+ 0x00B7 => TagName.new('AFInfo'),
998
+ 0x00B8 => TagName.new('FileInfo'),
999
+ # 00B9 => unknown
1000
+ 0x0100 => TagName.new('DigitalICE'),
1001
+ 0x0103 => TagName.new('PreviewCompression',
1002
+ {1 => 'Uncompressed',
1003
+ 2 => 'CCITT 1D',
1004
+ 3 => 'T4/Group 3 Fax',
1005
+ 4 => 'T6/Group 4 Fax',
1006
+ 5 => 'LZW',
1007
+ 6 => 'JPEG (old-style)',
1008
+ 7 => 'JPEG',
1009
+ 8 => 'Adobe Deflate',
1010
+ 9 => 'JBIG B&W',
1011
+ 10 => 'JBIG Color',
1012
+ 32766 => 'Next',
1013
+ 32769 => 'Epson ERF Compressed',
1014
+ 32771 => 'CCIRLEW',
1015
+ 32773 => 'PackBits',
1016
+ 32809 => 'Thunderscan',
1017
+ 32895 => 'IT8CTPAD',
1018
+ 32896 => 'IT8LW',
1019
+ 32897 => 'IT8MP',
1020
+ 32898 => 'IT8BL',
1021
+ 32908 => 'PixarFilm',
1022
+ 32909 => 'PixarLog',
1023
+ 32946 => 'Deflate',
1024
+ 32947 => 'DCS',
1025
+ 34661 => 'JBIG',
1026
+ 34676 => 'SGILog',
1027
+ 34677 => 'SGILog24',
1028
+ 34712 => 'JPEG 2000',
1029
+ 34713 => 'Nikon NEF Compressed',
1030
+ 65000 => 'Kodak DCR Compressed',
1031
+ 65535 => 'Pentax PEF Compressed',}),
1032
+ 0x0201 => TagName.new('PreviewImageStart'),
1033
+ 0x0202 => TagName.new('PreviewImageLength'),
1034
+ 0x0213 => TagName.new('PreviewYCbCrPositioning',
1035
+ {1 => 'Centered',
1036
+ 2 => 'Co-sited'}),
1037
+ 0x0010 => TagName.new('DataDump'),
1038
+ }
1039
+
1040
+ MAKERNOTE_NIKON_OLDER_TAGS = {
1041
+ 0x0003 => TagName.new('Quality',
1042
+ {1 => 'VGA Basic',
1043
+ 2 => 'VGA Normal',
1044
+ 3 => 'VGA Fine',
1045
+ 4 => 'SXGA Basic',
1046
+ 5 => 'SXGA Normal',
1047
+ 6 => 'SXGA Fine'}),
1048
+ 0x0004 => TagName.new('ColorMode',
1049
+ {1 => 'Color',
1050
+ 2 => 'Monochrome'}),
1051
+ 0x0005 => TagName.new('ImageAdjustment',
1052
+ {0 => 'Normal',
1053
+ 1 => 'Bright+',
1054
+ 2 => 'Bright-',
1055
+ 3 => 'Contrast+',
1056
+ 4 => 'Contrast-'}),
1057
+ 0x0006 => TagName.new('CCDSpeed',
1058
+ {0 => 'ISO 80',
1059
+ 2 => 'ISO 160',
1060
+ 4 => 'ISO 320',
1061
+ 5 => 'ISO 100'}),
1062
+ 0x0007 => TagName.new('WhiteBalance',
1063
+ {0 => 'Auto',
1064
+ 1 => 'Preset',
1065
+ 2 => 'Daylight',
1066
+ 3 => 'Incandescent',
1067
+ 4 => 'Fluorescent',
1068
+ 5 => 'Cloudy',
1069
+ 6 => 'Speed Light'}),
1070
+ }
1071
+
1072
+ end # ::Exif
1073
+ end # ::Properties
1074
+ end # ::Image
1075
+ end # ::Cul