File Coverage

blib/lib/Image/ExifTool/Minolta.pm
Criterion Covered Total %
statement 16 22 72.7
branch 1 6 16.6
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 22 34 64.7


line stmt bran cond sub pod time code
1             #------------------------------------------------------------------------------
2             # File: Minolta.pm
3             #
4             # Description: Minolta EXIF maker notes tags
5             #
6             # Revisions: 04/06/2004 - P. Harvey Created
7             # 09/09/2005 - P. Harvey Added ability to write MRW files
8             #
9             # References: 1) http://www.dalibor.cz/minolta/makernote.htm
10             # 2) Jay Al-Saadi private communication (testing with A2)
11             # 3) Shingo Noguchi, PhotoXP (http://www.daifukuya.com/photoxp/)
12             # 5) http://www.cybercom.net/~dcoffin/dcraw/
13             # 6) Pedro Corte-Real private communication
14             # 7) ExifTool forum post by bronek (http://www.cpanforum.com/posts/1118)
15             # 8) http://www.chauveau-central.net/mrw-format/
16             # 9) CPAN Forum post by 'geve' (http://www.cpanforum.com/threads/2168)
17             # 10) http://homepage3.nifty.com/kamisaka/makernote/makernote_km.htm
18             # 11) http://www.dyxum.com/dforum/forum_posts.asp?TID=6371&PN=1 and
19             # http://www.dyxum.com/dAdmin/lenses/MakerNoteList_Public.asp?stro=makr
20             # http://dyxum.com/dforum/forum_posts.asp?TID=23435&PN=2
21             # 12) http://www.minolta-forum.de/forum/index.php?showtopic=14914
22             # 13) http://www.mhohner.de/minolta/lenses.php
23             # 14) Jeffery Small private communication (tests with 7D)
24             # 15) http://homepage3.nifty.com/kamisaka/makernote/makernote_sony.htm
25             # 16) Thomas Kassner private communication
26             # 17) Mladen Sever private communication
27             # 18) Olaf Ulrich private communication
28             # 19) Lukasz Stelmach private communication
29             # 20) Igal Milchtaich private communication (A100 firmware 1.04)
30             # 21) Jean-Michel Dubois private communication
31             # 22) http://www.mi-fo.de/forum/index.php?act=attach&type=post&id=6024
32             # 23) Marcin Krol private communication
33             # 24) http://cpanforum.com/threads/12291
34             # 26) https://exiftool.org/forum/index.php/topic,3521.0.html
35             # 27) https://exiftool.org/forum/index.php/topic,3833.0.html
36             # 28) Michael Reitinger private communication (RX100)
37             # 29) https://exiftool.org/forum/index.php/topic,4086.0.html
38             # IB) Iliah Borg private communication (LibRaw)
39             # JD) Jens Duttke private communication
40             # JR) Jos Roost private communication
41             # NJ) Niels Kristian Bech Jensen private communication
42             #------------------------------------------------------------------------------
43              
44             package Image::ExifTool::Minolta;
45              
46 28     28   7262 use strict;
  28         69  
  28         1610  
47 28         3089 use vars qw($VERSION %minoltaLensTypes %minoltaTeleconverters %minoltaColorMode
48 28     28   161 %sonyColorMode %minoltaSceneMode %afStatusInfo %metabonesID);
  28         62  
49 28     28   178 use Image::ExifTool qw(:DataAccess :Utils);
  28         66  
  28         7775  
50 28     28   1758 use Image::ExifTool::Exif;
  28         64  
  28         196594  
51              
52             $VERSION = '2.89';
53              
54             # Full list of product codes for Sony-compatible Minolta lenses
55             # (ref http://www.kb.sony.com/selfservice/documentLink.do?externalId=C1000570)
56             # NOTE: Unfortunately, these product codes sometimes do not match the first 4
57             # digits of the lens ID
58             # 2578 AF 16mm F2.8 FISH-EYE
59             # 2579 AF 20mm F2.8
60             # 2641 AF 20mm F2.8 NEW
61             # 2566 AF 24mm F2.8
62             # 2642 AF 24mm F2.8 NEW
63             # 2596 AF 28mm F2
64             # 2668 AF 28mm F2 NEW
65             # 2557 AF 28mm F2.8
66             # 2591 AF 35mm F1.4 G
67             # 2666 AF 35mm F1.4 G NEW
68             # 2597 AF 35mm F2
69             # 2667 AF 35mm F2 NEW
70             # 2562 AF 50mm F1.4
71             # 2662 AF 50mm F1.4 NEW
72             # 2550 AF 50mm F1.7
73             # 2613 AF 50mm F1.7 NEW
74             # 2592 AF 85mm F1.4
75             # 2629 AF 85mm F1.4 G
76             # 2677 AF 85mm F1.4 G (D)
77             # 2689 AF 85mm F1.4 G (D) Limited
78             # 2598 AF 100mm F2
79             # 2648 AF 100mm F2.8 SOFT
80             # 2556 AF 135mm F2.8
81             # 2656 STF 135mm F2.8 [T4.5]
82             # 2593 AF APO 20 0mm F2.8
83             # 2612 High Speed AF APO 200mm F2.8 G
84             # 2563 AF APO 300mm F2.8
85             # 2608 High Speed AF APO 300mm F2.8 G
86             # 2674 AF APO 300mm F2.8 G(D) SSM
87             # 2640 AF APO 300mm F4 G
88             # 2651 AF APO 400mm F4.5 G
89             # 2572 AF REFLEX 500mm F8
90             # 2565 AF APO 600mm F4
91             # 2609 High Speed AF APO 600mm F4 G
92             # 2564 AF MACRO 50mm F2.8
93             # 2638 AF MACRO 50mm F2.8 NEW
94             # 2675 AF MACRO 50mm F2.8 (D)
95             # 2646 AF MACRO 50mm F3.5
96             # 2581 AF MACRO 100mm F2.8
97             # 2639 AF MACRO 100mm F2.8 NEW
98             # 2676 AF MACRO 100mm F2.8 (D)
99             # 2658 AF APO TE LE MACRO 200mm F4 G
100             # 2594 AF MACRO ZOOM 1x-3x F1.7-2.8
101             # 2695 AF 17-35mm F2.8-4 (D)
102             # 2654 AF 17-35mm F3.5 G
103             # 2657 AF 20-35mm F3.5-4.5
104             # 2558 AF 24-50mm F4
105             # 2632 AF 24-50mm F4 NEW
106             # 2636 AF 24-85mm F3.5-4.5
107             # 2660 AF 24-85mm F3.5-4.5 NEW
108             # 2672 AF 24-105mm F3.5-4.5 (D)
109             # 2620 AF 28-70mm F2.8 G
110             # 2696 AF 28-75mm F2.8 (D)
111             # 2659 AF 28-80mm F3.5-5.6
112             # 2670 AF 28-80mm F3.5-5.6 II
113             # 2683 AF 28-80mm F3.5-5.6 (D)
114             # 2633 AF 28-80mm F4-5.6
115             # 2552 AF 28-85mm F3.5-4.5
116             # 2586 AF 28-85mm F3.5-4.5 NEW
117             # 2692 AF 28-100mm F3.5-5.6 (D)
118             # 2635 AF 28-105mm F3.5-4.5
119             # 2661 AF 28-105mm F3.5-4.5 NEW
120             # 2553 AF 28-135mm F4-4.5
121             # 2551 AF 35-70mm F4
122             # 2643 AF 35-70mm F3.5-4.5
123             # 2652 AF 35-70mm F3.5-4.5 NEW
124             # 2605 AF 35-80mm F4-5.6
125             # 2671 AF 35-80mm F4.5-5.6 II
126             # 2554 AF 35-105mm F3.5-4.5
127             # 2585 AF 35-105mm F3.5-4.5
128             # 2682 AF APO 70-200mm F2.8 G (D) SSM
129             # 2588 AF 70-210mm F4.5-5.6
130             # 2555 AF 70-210mm F4
131             # 2634 AF 70-210mm F4.5-5.6 NEW
132             # 2669 AF 70-210mm F4.5-5.6 II
133             # 2561 AF 75-300mm F4.5-5.6
134             # 2649 AF 75-300mm F4.5-5.6 NEW
135             # 2665 AF 75-300mm F4.5-5.6 II
136             # 2684 AF 75-300mm F4.5-5.6 (D)
137             # 2589 AF APO 80-200mm F2.8
138             # 2628 High-Speed AF APO 80-200mm F2.8 G
139             # 2604 AF 80-200mm F4.5-5.6
140             # 2560 AF 100-200mm F4.5
141             # 2606 AF 100-300mm F4.5-5.6
142             # 2631 AF APO 100-300mm F4.5-5.6
143             # 2681 AF APO 100-300mm F4.5-5.6 (D)
144             # 2644 AF APO 100-400mm F4.5-6.7
145             # 2618 AF Xi 28-80mm F4-5.6
146             # 2615 AF Xi 28-105mm F3.5-4.5
147             # 2624 AF PZ 35-80mm F4-5.6
148             # 2616 AF Xi 35-200mm F4.5-5.6
149             # 2619 AF Xi 80-200mm F4.5-5.6
150             # 2621 AF Xi 100-300mm F4.5-5.6
151             # 2698 AF DT 11-18mm F4.5-5.6 (D)
152             # 2697 AF DT 18-70mm F3.5-5.6 (D)
153             # 2699 AF DT 18-200mm F3.5-6.3 (D)
154             # 2590 1.4x TELE CONVERTER APO
155             # 2601 2x TELE CONVERTER APO
156             # 2610 1.4x TELE CONVERTER APO II
157             # 2611 2x TELE CONVERTER APO II
158             # 2687 1.4x TELE CONVERTER APO (D)
159             # 2688 2x TELE CONVERTER APO (D)
160              
161             # high bytes in Sony LensID's identifying Metabones adapters and high bytes of Canon LensID's
162             %metabonesID = (
163             # 0xef00 is used by Metabones, Fotodiox, Sigma and Viltrox adapters (JR)
164             0xef00 => \ 'Canon EF Adapter', # with Canon LensID 0x00xx
165             0xf000 => 0xef00, # with Canon LensID 0x01xx
166             0xf100 => 0xef00, # with Canon LensID 0x02xx
167             0xff00 => 0xef00, # with Canon LensID 0x10xx
168             0x7700 => \ 'Metabones Speed Booster', # with Canon LensID 0x00xx
169             0x7800 => 0x7700, # with Canon LensID 0x01xx
170             0x7900 => 0x7700, # with Canon LensID 0x02xx
171             0x8700 => 0x7700, # with Canon LensID 0x10xx
172             0xbc00 => \ 'Metabones Speed Booster Ultra', # with Canon LensID 0x00xx
173             0xbd00 => 0xbc00, # with Canon LensID 0x01xx
174             0xbe00 => 0xbc00, # with Canon LensID 0x02xx
175             0xcc00 => 0xbc00, # with Canon LensID 0x10xx
176             );
177              
178             # lens ID numbers (ref 3)
179             # ("New" and "II" appear in brackets if original version also has this LensType)
180             %minoltaLensTypes = (
181             Notes => q{
182             "New" or "II" appear in brackets if the original version of the lens has the
183             same LensType. Special logic is employed to identify the attached lens when
184             a Metabones Canon EF adapter is used.
185             },
186             OTHER => sub {
187             my ($val, $inv) = @_;
188             return undef if $inv;
189             my $id = $val & 0xff00;
190             # Note: Metabones Smart Adapter firmware versions before 31 kill
191             # the high byte for 2-byte Canon LensType values, so the reported lens
192             # will be incorrect for these
193             my $mb = $metabonesID{$id};
194             if ($mb) {
195             ref $mb or $id = $mb, $mb = $metabonesID{$id};
196             require Image::ExifTool::Canon;
197             my $lens = $Image::ExifTool::Canon::canonLensTypes{$val - $id};
198             return "$lens + $$mb" if $lens;
199             } elsif ($val >= 0x4900) { # test for Sigma MC-11 SA-E adapter with Sigma SA-mount lens
200             require Image::ExifTool::Sigma;
201             my $lens = $Image::ExifTool::Sigma::sigmaLensTypes{$val - 0x4900};
202             return "$lens + MC-11 SA-E" if $lens;
203             }
204             return undef;
205             },
206             0 => 'Minolta AF 28-85mm F3.5-4.5 New', # New added (ref 13/18)
207             1 => 'Minolta AF 80-200mm F2.8 HS-APO G', # white
208             2 => 'Minolta AF 28-70mm F2.8 G',
209             3 => 'Minolta AF 28-80mm F4-5.6',
210             4 => 'Minolta AF 85mm F1.4G', #exiv2 0.23
211             5 => 'Minolta AF 35-70mm F3.5-4.5 [II]', # (original and II, ref 13)
212             6 => 'Minolta AF 24-85mm F3.5-4.5 [New]', # (original and New, ref 13)
213             # 7 => 'AF 100-400mm F4.5-6.7 (D)', ??
214             7 => 'Minolta AF 100-300mm F4.5-5.6 APO [New] or 100-400mm or Sigma Lens',
215             7.1 => 'Minolta AF 100-400mm F4.5-6.7 APO', #JD
216             7.2 => 'Sigma AF 100-300mm F4 EX DG IF', #JD
217             8 => 'Minolta AF 70-210mm F4.5-5.6 [II]', # (original and II, ref 13)
218             9 => 'Minolta AF 50mm F3.5 Macro',
219             10 => 'Minolta AF 28-105mm F3.5-4.5 [New]', # (original and New, ref 13)
220             11 => 'Minolta AF 300mm F4 HS-APO G',
221             12 => 'Minolta AF 100mm F2.8 Soft Focus',
222             13 => 'Minolta AF 75-300mm F4.5-5.6 (New or II)', # (II and New, ref 13)
223             14 => 'Minolta AF 100-400mm F4.5-6.7 APO',
224             15 => 'Minolta AF 400mm F4.5 HS-APO G',
225             16 => 'Minolta AF 17-35mm F3.5 G',
226             17 => 'Minolta AF 20-35mm F3.5-4.5',
227             18 => 'Minolta AF 28-80mm F3.5-5.6 II',
228             19 => 'Minolta AF 35mm F1.4 G', # G added (ref 18), but not New as per ref 13
229             20 => 'Minolta/Sony 135mm F2.8 [T4.5] STF',
230             # 20 => 'Sony 135mm F2.8 [T4.5] STF (SAL135F28)', (ref JR)
231             22 => 'Minolta AF 35-80mm F4-5.6 II', # II added (ref 13)
232             23 => 'Minolta AF 200mm F4 Macro APO G',
233             24 => 'Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma or Tamron Lens',
234             # 24 => 'Sony 24-105mm F3.5-4.5 (SAL24105)', (ref JR)
235             24.1 => 'Sigma 18-50mm F2.8',
236             24.2 => 'Sigma 17-70mm F2.8-4.5 DC Macro', # (changed "(D)" to "DC Macro", ref JR)
237             24.3 => 'Sigma 20-40mm F2.8 EX DG Aspherical IF', #JD/22
238             24.4 => 'Sigma 18-200mm F3.5-6.3 DC', #22
239             24.5 => 'Sigma DC 18-125mm F4-5,6 D', #exiv2 0.23
240             # 24.6 => 'Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro', #JD
241             24.6 => 'Tamron SP AF 28-75mm F2.8 XR Di LD Aspherical [IF] Macro', #NJ (Model A09)
242             24.7 => 'Sigma 15-30mm F3.5-4.5 EX DG Aspherical', #JR
243             25 => 'Minolta AF 100-300mm F4.5-5.6 APO (D) or Sigma Lens',
244             25.1 => 'Sigma 100-300mm F4 EX (APO (D) or D IF)', #JD
245             25.2 => 'Sigma 70mm F2.8 EX DG Macro', #JD
246             25.3 => 'Sigma 20mm F1.8 EX DG Aspherical RF', #19
247             25.4 => 'Sigma 30mm F1.4 EX DC', #21/27
248             25.5 => 'Sigma 24mm F1.8 EX DG ASP Macro', #Florian Knorn
249             # 25 - also seen for an "old Sigma 50mm Macro" (forum2833)
250             27 => 'Minolta AF 85mm F1.4 G (D)', # added (D) (ref 13)
251             # 27 => 'Venus Optics Laowa 105mm F2 STF', #IB (NC)
252             28 => 'Minolta/Sony AF 100mm F2.8 Macro (D) or Tamron Lens',
253             # 28 => 'Sony 100mm F2.8 Macro (SAL100M28)', (ref 18/JR)
254             28.1 => 'Tamron SP AF 90mm F2.8 Di Macro', #JD (Model 272E)
255             28.2 => 'Tamron SP AF 180mm F3.5 Di LD [IF] Macro', #27 (Model B01) ("SP" moved - ref JR)
256             29 => 'Minolta/Sony AF 75-300mm F4.5-5.6 (D)', # Sony added (ref 13)
257             # 29 => 'Sony 75-300mm F4.5-5.6 (SAL75300)', (ref JR)
258             30 => 'Minolta AF 28-80mm F3.5-5.6 (D) or Sigma Lens',
259             30.1 => 'Sigma AF 10-20mm F4-5.6 EX DC', #JD
260             30.2 => 'Sigma AF 12-24mm F4.5-5.6 EX DG',
261             30.3 => 'Sigma 28-70mm EX DG F2.8', #16
262             30.4 => 'Sigma 55-200mm F4-5.6 DC', #JD
263             31 => 'Minolta/Sony AF 50mm F2.8 Macro (D) or F3.5',
264             # 31 => 'Sony 50mm F2.8 Macro (SAL50M28)', (ref JR)
265             31.1 => 'Minolta/Sony AF 50mm F3.5 Macro',
266             32 => 'Minolta/Sony AF 300mm F2.8 G or 1.5x Teleconverter', #13/18
267             # 32 => 'Minolta AF 300mm F2.8 APO G (D) SSM', (ref 13) ("APO" added - ref JR)
268             # 32 => 'Sony 300mm F2.8 G (SAL300F28G)', (ref 18/JR)
269             33 => 'Minolta/Sony AF 70-200mm F2.8 G',
270             # 33 => 'Sony 70-200mm F2.8 G (SAL70200G)', (ref JR)
271             # 33 => 'Minolta AF 70-200mm F2.8 APO G (D) SSM' (ref 13) ("APO" added - ref JR)
272             35 => 'Minolta AF 85mm F1.4 G (D) Limited',
273             36 => 'Minolta AF 28-100mm F3.5-5.6 (D)',
274             38 => 'Minolta AF 17-35mm F2.8-4 (D)', # (Konica Minolta, ref 13)
275             39 => 'Minolta AF 28-75mm F2.8 (D)', # (Konica Minolta, ref 13)
276             40 => 'Minolta/Sony AF DT 18-70mm F3.5-5.6 (D)', # (Konica Minolta, ref 13)
277             # 40 => 'Sony DT 18-70mm F3.5-5.6 (SAL1870)', (ref JR)
278             #40.1 => 'Sony AF DT 18-200mm F3.5-6.3', #11 (anomaly? - PH)
279             41 => 'Minolta/Sony AF DT 11-18mm F4.5-5.6 (D) or Tamron Lens', # (Konica Minolta, ref 13)
280             # 41 => 'Sony DT 11-18mm F4.5-5.6 (SAL1118)', (ref JR)
281             41.1 => 'Tamron SP AF 11-18mm F4.5-5.6 Di II LD Aspherical IF', #JD (Model A13)
282             42 => 'Minolta/Sony AF DT 18-200mm F3.5-6.3 (D)', # Sony added (ref 13) (Konica Minolta, ref 13)
283             # 42 => 'Sony DT 18-200mm F3.5-6.3 (SAL18200)', (ref JR)
284             43 => 'Sony 35mm F1.4 G (SAL35F14G)', # changed from Minolta to Sony (ref 13/18/JR) (but ref 11 shows both!)
285             44 => 'Sony 50mm F1.4 (SAL50F14)', # changed from Minolta to Sony (ref 13/18/JR)
286             45 => 'Carl Zeiss Planar T* 85mm F1.4 ZA (SAL85F14Z)', #JR
287             46 => 'Carl Zeiss Vario-Sonnar T* DT 16-80mm F3.5-4.5 ZA (SAL1680Z)', #JR
288             47 => 'Carl Zeiss Sonnar T* 135mm F1.8 ZA (SAL135F18Z)', #JR
289             48 => 'Carl Zeiss Vario-Sonnar T* 24-70mm F2.8 ZA SSM (SAL2470Z) or Other Lens', #11/JR
290             48.1 => 'Carl Zeiss Vario-Sonnar T* 24-70mm F2.8 ZA SSM II (SAL2470Z2)', #JR
291             48.2 => 'Tamron SP 24-70mm F2.8 Di USD', #IB (A007) (also with id 204)
292             49 => 'Sony DT 55-200mm F4-5.6 (SAL55200)', #JD/JR
293             50 => 'Sony DT 18-250mm F3.5-6.3 (SAL18250)', #11/JR
294             51 => 'Sony DT 16-105mm F3.5-5.6 (SAL16105)', #11/JR
295             #51.1 => 'Sony AF DT 55-200mm F4-5.5', #11 (anomaly? - PH)
296             # LensType 52 also seen for Fringer Contax_N to E-mount adapter Ver.31 and Ver.21 (ref JR)
297             52 => 'Sony 70-300mm F4.5-5.6 G SSM (SAL70300G) or G SSM II or Tamron Lens', #JD
298             52.1 => 'Sony 70-300mm F4.5-5.6 G SSM II (SAL70300G2)', #JR
299             52.2 => 'Tamron SP 70-300mm F4-5.6 Di USD', #JR,NJ (Model A005)
300             53 => 'Sony 70-400mm F4-5.6 G SSM (SAL70400G)', #17(/w correction by Stephen Bishop)/JR
301             54 => 'Carl Zeiss Vario-Sonnar T* 16-35mm F2.8 ZA SSM (SAL1635Z) or ZA SSM II', #17/JR
302             54.1 => 'Carl Zeiss Vario-Sonnar T* 16-35mm F2.8 ZA SSM II (SAL1635Z2)', #JR
303             55 => 'Sony DT 18-55mm F3.5-5.6 SAM (SAL1855) or SAM II', #PH
304             55.1 => 'Sony DT 18-55mm F3.5-5.6 SAM II (SAL18552)', #JR
305             56 => 'Sony DT 55-200mm F4-5.6 SAM (SAL55200-2)', #22/JR
306             57 => 'Sony DT 50mm F1.8 SAM (SAL50F18) or Tamron Lens or Commlite CM-EF-NEX adapter', #22/JR
307             57.1 => 'Tamron SP AF 60mm F2 Di II LD [IF] Macro 1:1', # (Model G005) (ref https://exiftool.org/forum/index.php/topic,3858.0.html)
308             57.2 => 'Tamron 18-270mm F3.5-6.3 Di II PZD', #27 (Model B008)
309             # (note: the Commlite CM-EF-NEX adapter also appears to give LensType 57, ref JR)
310             58 => 'Sony DT 30mm F2.8 Macro SAM (SAL30M28)', #22/JR
311             59 => 'Sony 28-75mm F2.8 SAM (SAL2875)', #21/JR
312             60 => 'Carl Zeiss Distagon T* 24mm F2 ZA SSM (SAL24F20Z)', #17/JR
313             61 => 'Sony 85mm F2.8 SAM (SAL85F28)', #17/JR
314             62 => 'Sony DT 35mm F1.8 SAM (SAL35F18)', #PH/JR
315             63 => 'Sony DT 16-50mm F2.8 SSM (SAL1650)', #17/JR
316             64 => 'Sony 500mm F4 G SSM (SAL500F40G)', #29
317             65 => 'Sony DT 18-135mm F3.5-5.6 SAM (SAL18135)', #JR
318             66 => 'Sony 300mm F2.8 G SSM II (SAL300F28G2)', #29
319             67 => 'Sony 70-200mm F2.8 G SSM II (SAL70200G2)', #JR
320             68 => 'Sony DT 55-300mm F4.5-5.6 SAM (SAL55300)', #29
321             69 => 'Sony 70-400mm F4-5.6 G SSM II (SAL70400G2)', #JR
322             70 => 'Carl Zeiss Planar T* 50mm F1.4 ZA SSM (SAL50F14Z)', #JR
323             128 => 'Tamron or Sigma Lens (128)',
324             128.1 => 'Tamron AF 18-200mm F3.5-6.3 XR Di II LD Aspherical [IF] Macro', #JR (Model A14)
325             # was 128.1 => 'Tamron 18-200mm F3.5-6.3',
326             128.2 => 'Tamron AF 28-300mm F3.5-6.3 XR Di LD Aspherical [IF] Macro', #JR (Model A061)
327             # was 128.2 => 'Tamron 28-300mm F3.5-6.3',
328             # (removed -- probably never existed, ref IB) 'Tamron 80-300mm F3.5-6.3',
329             128.3 => 'Tamron AF 28-200mm F3.8-5.6 XR Di Aspherical [IF] Macro', #JD (Model A031)
330             # also Tamron AF 28-200mm F3.8-5.6 Aspherical', #IB (Model 71D)
331             # and 'Tamron AF 28-200mm F3.8-5.6 LD Aspherical [IF] Super', #IB (Model 171D)
332             128.4 => 'Tamron SP AF 17-35mm F2.8-4 Di LD Aspherical IF', #JD (Model A05)
333             128.5 => 'Sigma AF 50-150mm F2.8 EX DC APO HSM II', #JD
334             128.6 => 'Sigma 10-20mm F3.5 EX DC HSM', #11 (Model 202-205)
335             128.7 => 'Sigma 70-200mm F2.8 II EX DG APO MACRO HSM', #24
336             128.8 => 'Sigma 10mm F2.8 EX DC HSM Fisheye', #Florian Knorn
337             # (yes, '128.10'. My condolences to typed languages that use this database - PH)
338             128.9 => 'Sigma 50mm F1.4 EX DG HSM', #Florian Knorn (Model A014, ref IB)
339             '128.10' => 'Sigma 85mm F1.4 EX DG HSM', #27
340             '128.11' => 'Sigma 24-70mm F2.8 IF EX DG HSM', #27
341             '128.12' => 'Sigma 18-250mm F3.5-6.3 DC OS HSM', #27
342             '128.13' => 'Sigma 17-50mm F2.8 EX DC HSM', #Exiv2
343             '128.14' => 'Sigma 17-70mm F2.8-4 DC Macro HSM', # (no OS for Sony mount, ref JR) (also C013 Model, ref IB)
344             '128.15' => 'Sigma 150mm F2.8 EX DG OS HSM APO Macro', #Marcus Holland-Moritz
345             '128.16' => 'Sigma 150-500mm F5-6.3 APO DG OS HSM', #IB
346             '128.17' => 'Tamron AF 28-105mm F4-5.6 [IF]', #IB (Model 179D)
347             '128.18' => 'Sigma 35mm F1.4 DG HSM', #JR
348             '128.19' => 'Sigma 18-35mm F1.8 DC HSM', #JR (Model A013, ref IB)
349             '128.20' => 'Sigma 50-500mm F4.5-6.3 APO DG OS HSM', #JR
350             '128.21' => 'Sigma 24-105mm F4 DG HSM | A', #JR (013)
351             '128.22' => 'Sigma 30mm F1.4', #IB
352             '128.23' => 'Sigma 35mm F1.4 DG HSM | A', #IB/JR (012)
353             '128.24' => 'Sigma 105mm F2.8 EX DG OS HSM Macro', #IB
354             '128.25' => 'Sigma 180mm F2.8 EX DG OS HSM APO Macro', #IB
355             '128.26' => 'Sigma 18-300mm F3.5-6.3 DC Macro HSM | C', #IB/JR (014)
356             '128.27' => 'Sigma 18-50mm F2.8-4.5 DC HSM', #IB
357             129 => 'Tamron Lens (129)',
358             129.1 => 'Tamron 200-400mm F5.6 LD', #12 (LD ref 23)
359             129.2 => 'Tamron 70-300mm F4-5.6 LD', #12
360             131 => 'Tamron 20-40mm F2.7-3.5 SP Aspherical IF', #23 (Model 266D)
361             135 => 'Vivitar 28-210mm F3.5-5.6', #16
362             136 => 'Tokina EMZ M100 AF 100mm F3.5', #JD
363             137 => 'Cosina 70-210mm F2.8-4 AF', #11
364             138 => 'Soligor 19-35mm F3.5-4.5', #11
365             139 => 'Tokina AF 28-300mm F4-6.3', #IB
366             # (the following Cosina 70-300mm lens was also marketed as a Phoenix, Vivitar Series 1, and
367             # some sort of 3rd-party marketing as a Voightlander 70-300mm F4.5-5.6 SKOPAR AF, ref IB)
368             142 => 'Cosina AF 70-300mm F4.5-5.6 MC', #IB (was 'Voigtlander 70-300mm F4.5-5.6', #JD)
369             146 => 'Voigtlander Macro APO-Lanthar 125mm F2.5 SL', #JD
370             194 => 'Tamron SP AF 17-50mm F2.8 XR Di II LD Aspherical [IF]', #23 (Model A16)
371             202 => 'Tamron SP AF 70-200mm F2.8 Di LD [IF] Macro', #JR (Model A001) (see also 255.7)
372             203 => 'Tamron SP 70-200mm F2.8 Di USD', #JR (Model A009)
373             204 => 'Tamron SP 24-70mm F2.8 Di USD', #JR (Model A007) (also with id 48)
374             212 => 'Tamron 28-300mm F3.5-6.3 Di PZD', #JR (Model A010)
375             213 => 'Tamron 16-300mm F3.5-6.3 Di II PZD Macro', #JR (Model B016)
376             214 => 'Tamron SP 150-600mm F5-6.3 Di USD', #JR (Model A011)
377             215 => 'Tamron SP 15-30mm F2.8 Di USD', #JR (Model A012)
378             216 => 'Tamron SP 45mm F1.8 Di USD', #forum8320 (F013)
379             217 => 'Tamron SP 35mm F1.8 Di USD', #forum8320 (F012)
380             218 => 'Tamron SP 90mm F2.8 Di Macro 1:1 USD (F017)', #JR (Model F017)
381             220 => 'Tamron SP 150-600mm F5-6.3 Di USD G2', #forum8846 (Model A022)
382             224 => 'Tamron SP 90mm F2.8 Di Macro 1:1 USD (F004)', #JR (Model F004)
383             255 => 'Tamron Lens (255)',
384             255.1 => 'Tamron SP AF 17-50mm F2.8 XR Di II LD Aspherical', # (Model A16)
385             255.2 => 'Tamron AF 18-250mm F3.5-6.3 XR Di II LD', #JD (Model A18?)
386             #? 225.2 => 'Tamron AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] Macro', #JR (Model A18)
387             255.3 => 'Tamron AF 55-200mm F4-5.6 Di II LD Macro', # (Model A15) (added "LD Macro", ref 23)
388             255.4 => 'Tamron AF 70-300mm F4-5.6 Di LD Macro 1:2', # (Model A17)
389             255.5 => 'Tamron SP AF 200-500mm F5.0-6.3 Di LD IF', # (Model A08)
390             255.6 => 'Tamron SP AF 10-24mm F3.5-4.5 Di II LD Aspherical IF', #22 (Model B001)
391             255.7 => 'Tamron SP AF 70-200mm F2.8 Di LD IF Macro', #22 (Model A001)
392             255.8 => 'Tamron SP AF 28-75mm F2.8 XR Di LD Aspherical IF', #24 (Model A09)
393             255.9 => 'Tamron AF 90-300mm F4.5-5.6 Telemacro', #Fredrik Agert
394             18688 => 'Sigma MC-11 SA-E Mount Converter with not-supported Sigma lens',
395             # The MC-11 SA-E Mount Converter uses this 18688 offset for not-supported SIGMA mount lenses.
396             # The MC-11 EF-E Mount Converter uses the 61184 offset for not-supported CANON mount lenses, as also used by Metabones.
397             # Both MC-11 SA-E and EF-E Mount Converters use the 504xx LensType2 values for supported SA-mount or EF-mount Sigma lenses.
398             25501 => 'Minolta AF 50mm F1.7', #7
399             25511 => 'Minolta AF 35-70mm F4 or Other Lens',
400             25511.1 => 'Sigma UC AF 28-70mm F3.5-4.5', #12/16(HighSpeed-AF)
401             25511.2 => 'Sigma AF 28-70mm F2.8', #JD
402             25511.3 => 'Sigma M-AF 70-200mm F2.8 EX Aspherical', #12
403             25511.4 => 'Quantaray M-AF 35-80mm F4-5.6', #JD
404             25511.5 => 'Tokina 28-70mm F2.8-4.5 AF', #IB
405             25521 => 'Minolta AF 28-85mm F3.5-4.5 or Other Lens', # not New (ref 18)
406             25521.1 => 'Tokina 19-35mm F3.5-4.5', #3
407             25521.2 => 'Tokina 28-70mm F2.8 AT-X', #7
408             25521.3 => 'Tokina 80-400mm F4.5-5.6 AT-X AF II 840', #JD
409             25521.4 => 'Tokina AF PRO 28-80mm F2.8 AT-X 280', #JD
410             25521.5 => 'Tokina AT-X PRO [II] AF 28-70mm F2.6-2.8 270', #24 (original + II versions)
411             25521.6 => 'Tamron AF 19-35mm F3.5-4.5', #JD (Model A10)
412             25521.7 => 'Angenieux AF 28-70mm F2.6', #JD
413             25521.8 => 'Tokina AT-X 17 AF 17mm F3.5', #27
414             25521.9 => 'Tokina 20-35mm F3.5-4.5 II AF', #IB
415             25531 => 'Minolta AF 28-135mm F4-4.5 or Other Lens',
416             25531.1 => 'Sigma ZOOM-alpha 35-135mm F3.5-4.5', #16
417             25531.2 => 'Sigma 28-105mm F2.8-4 Aspherical', #JD
418             25531.3 => 'Sigma 28-105mm F4-5.6 UC', #JR
419             25531.4 => 'Tokina AT-X 242 AF 24-200mm F3.5-5.6', #IB
420             25541 => 'Minolta AF 35-105mm F3.5-4.5', #13
421             25551 => 'Minolta AF 70-210mm F4 Macro or Sigma Lens',
422             25551.1 => 'Sigma 70-210mm F4-5.6 APO', #7
423             25551.2 => 'Sigma M-AF 70-200mm F2.8 EX APO', #6
424             25551.3 => 'Sigma 75-200mm F2.8-3.5', #22
425             25561 => 'Minolta AF 135mm F2.8',
426             25571 => 'Minolta/Sony AF 28mm F2.8', # Sony added (ref 18)
427             # 25571 => 'Sony 28mm F2.8 (SAL28F28)', (ref 18/JR)
428             25581 => 'Minolta AF 24-50mm F4',
429             25601 => 'Minolta AF 100-200mm F4.5',
430             25611 => 'Minolta AF 75-300mm F4.5-5.6 or Sigma Lens', #13
431             25611.1 => 'Sigma 70-300mm F4-5.6 DL Macro', #12 (also DG version ref 27, and APO version ref JR)
432             25611.2 => 'Sigma 300mm F4 APO Macro', #3/7
433             25611.3 => 'Sigma AF 500mm F4.5 APO', #JD
434             25611.4 => 'Sigma AF 170-500mm F5-6.3 APO Aspherical', #JD
435             25611.5 => 'Tokina AT-X AF 300mm F4', #JD
436             25611.6 => 'Tokina AT-X AF 400mm F5.6 SD', #22
437             25611.7 => 'Tokina AF 730 II 75-300mm F4.5-5.6', #JD
438             25611.8 => 'Sigma 800mm F5.6 APO', #https://exiftool.org/forum/index.php/topic,3472.0.html
439             25611.9 => 'Sigma AF 400mm F5.6 APO Macro', #27
440             '25611.10' => 'Sigma 1000mm F8 APO', #JR
441             25621 => 'Minolta AF 50mm F1.4 [New]', # original and New, not Sony (ref 13/18)
442             25631 => 'Minolta AF 300mm F2.8 APO or Sigma Lens', # changed G to APO (ref 13)
443             25631.1 => 'Sigma AF 50-500mm F4-6.3 EX DG APO', #JD
444             25631.2 => 'Sigma AF 170-500mm F5-6.3 APO Aspherical', #JD (also DG version, ref 27)
445             25631.3 => 'Sigma AF 500mm F4.5 EX DG APO', #JD
446             25631.4 => 'Sigma 400mm F5.6 APO', #22
447             25641 => 'Minolta AF 50mm F2.8 Macro or Sigma Lens',
448             25641.1 => 'Sigma 50mm F2.8 EX Macro', #11
449             25651 => 'Minolta AF 600mm F4 APO', # ("APO" added - ref JR)
450             25661 => 'Minolta AF 24mm F2.8 or Sigma Lens',
451             25661.1 => 'Sigma 17-35mm F2.8-4 EX Aspherical', #https://exiftool.org/forum/index.php/topic,3789.msg17679.html#msg17679
452             25721 => 'Minolta/Sony AF 500mm F8 Reflex',
453             # 25721 => 'Sony 500mm F8 Reflex (SAL500F80)', (ref JR)
454             25781 => 'Minolta/Sony AF 16mm F2.8 Fisheye or Sigma Lens', # Sony added (ref 13/18)
455             # 25781 => 'Sony 16mm F2.8 Fisheye (SAL16F28)', (ref 18/JR)
456             25781.1 => 'Sigma 8mm F4 EX [DG] Fisheye',
457             25781.2 => 'Sigma 14mm F3.5',
458             25781.3 => 'Sigma 15mm F2.8 Fisheye', #JD (writes 16mm to EXIF)
459             25791 => 'Minolta/Sony AF 20mm F2.8 or Tokina Lens', # Sony added (ref 11)
460             # 25791 => 'Sony 20mm F2.8 (SAL20F28)', (ref JR)
461             25791.1 => 'Tokina AT-X Pro DX 11-16mm F2.8', #https://exiftool.org/forum/index.php/topic,3593.0.html
462             25811 => 'Minolta AF 100mm F2.8 Macro [New] or Sigma or Tamron Lens', # not Sony (ref 13/18)
463             25811.1 => 'Sigma AF 90mm F2.8 Macro', #JD
464             25811.2 => 'Sigma AF 105mm F2.8 EX [DG] Macro', #JD
465             25811.3 => 'Sigma 180mm F5.6 Macro',
466             25811.4 => 'Sigma 180mm F3.5 EX DG Macro', #https://exiftool.org/forum/index.php/topic,3789.msg17679.html#msg17679
467             25811.5 => 'Tamron 90mm F2.8 Macro',
468             25851 => 'Beroflex 35-135mm F3.5-4.5', #16
469             25858 => 'Minolta AF 35-105mm F3.5-4.5 New or Tamron Lens',
470             25858.1 => 'Tamron 24-135mm F3.5-5.6', # (Model 190D)
471             25881 => 'Minolta AF 70-210mm F3.5-4.5',
472             25891 => 'Minolta AF 80-200mm F2.8 APO or Tokina Lens', # black
473             25891.1 => 'Tokina 80-200mm F2.8',
474             # 25901 - Note: only get this with older 1.4x and lenses with 5-digit LensTypes (ref 27)
475             # 25901 - also "Minolta AF 200mm F2.8 HS-APO G + Minolta AF 1.4x APO"
476             25901 => 'Minolta AF 200mm F2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x', #26
477             25901.1 => 'Minolta AF 600mm F4 HS-APO G + Minolta AF 1.4x APO', #27
478             25911 => 'Minolta AF 35mm F1.4', #(from Sony list) (not G as per ref 13)
479             25921 => 'Minolta AF 85mm F1.4 G (D)',
480             25931 => 'Minolta AF 200mm F2.8 APO', # (not "G", see 26121 - ref JR)
481             25941 => 'Minolta AF 3x-1x F1.7-2.8 Macro',
482             25961 => 'Minolta AF 28mm F2',
483             25971 => 'Minolta AF 35mm F2 [New]', #13
484             25981 => 'Minolta AF 100mm F2',
485             # 26011 - Note: only get this with older 2x and lenses with 5-digit LensTypes (ref 27)
486             # 26011 - also "Minolta AF 200mm F2.8 HS-APO G + Minolta AF 2x APO"
487             26011 => 'Minolta AF 200mm F2.8 G APO + Minolta AF 2x APO or Other Lens + 2x', #26
488             26011.1 => 'Minolta AF 600mm F4 HS-APO G + Minolta AF 2x APO', #27
489             26041 => 'Minolta AF 80-200mm F4.5-5.6',
490             26051 => 'Minolta AF 35-80mm F4-5.6', #(from Sony list)
491             26061 => 'Minolta AF 100-300mm F4.5-5.6', # not (D) (ref 13/18)
492             26071 => 'Minolta AF 35-80mm F4-5.6', #13
493             26081 => 'Minolta AF 300mm F2.8 HS-APO G', # HS-APO added (ref 13/18)
494             26091 => 'Minolta AF 600mm F4 HS-APO G',
495             26121 => 'Minolta AF 200mm F2.8 HS-APO G',
496             26131 => 'Minolta AF 50mm F1.7 New',
497             26151 => 'Minolta AF 28-105mm F3.5-4.5 xi', # xi, not Power Zoom (ref 13/18)
498             26161 => 'Minolta AF 35-200mm F4.5-5.6 xi', # xi, not Power Zoom (ref 13/18)
499             26181 => 'Minolta AF 28-80mm F4-5.6 xi', # xi, not Power Zoom (ref 13/18)
500             26191 => 'Minolta AF 80-200mm F4.5-5.6 xi', # xi, not Power Zoom (ref 13/18)
501             26201 => 'Minolta AF 28-70mm F2.8 G', #11
502             26211 => 'Minolta AF 100-300mm F4.5-5.6 xi', # xi, not Power Zoom (ref 13/18)
503             26241 => 'Minolta AF 35-80mm F4-5.6 Power Zoom',
504             26281 => 'Minolta AF 80-200mm F2.8 HS-APO G', #11 ("HS-APO" added, white, probably same as 1, non-HS is 25891 - ref JR)
505             26291 => 'Minolta AF 85mm F1.4 New',
506             26311 => 'Minolta AF 100-300mm F4.5-5.6 APO', #11 (does not exist? https://www.dyxum.com/dforum/lens-data-requested_topic23435_page2.html)
507             26321 => 'Minolta AF 24-50mm F4 New',
508             26381 => 'Minolta AF 50mm F2.8 Macro New',
509             26391 => 'Minolta AF 100mm F2.8 Macro',
510             26411 => 'Minolta/Sony AF 20mm F2.8 New', # Sony added (ref 13)
511             26421 => 'Minolta AF 24mm F2.8 New',
512             26441 => 'Minolta AF 100-400mm F4.5-6.7 APO', #11
513             26621 => 'Minolta AF 50mm F1.4 New',
514             26671 => 'Minolta AF 35mm F2 New',
515             26681 => 'Minolta AF 28mm F2 New',
516             26721 => 'Minolta AF 24-105mm F3.5-4.5 (D)', #11
517             # 30464: newer firmware versions of the Speed Booster report type 30464 (=0x7700)
518             # - this is the base to which the Canon LensType is added
519             30464 => 'Metabones Canon EF Speed Booster', #Metabones (to this, add Canon LensType)
520             45671 => 'Tokina 70-210mm F4-5.6', #22
521             45681 => 'Tokina AF 35-200mm F4-5.6 Zoom SD', #IB (model 352)
522             45701 => 'Tamron AF 35-135mm F3.5-4.5', #IB (model 40d)
523             45711 => 'Vivitar 70-210mm F4.5-5.6', #IB
524             45741 => '2x Teleconverter or Tamron or Tokina Lens', #18
525             45741.1 => 'Tamron SP AF 90mm F2.5', #JD
526             45741.2 => 'Tokina RF 500mm F8.0 x2', #JD
527             45741.3 => 'Tokina 300mm F2.8 x2',
528             45751 => '1.4x Teleconverter', #18
529             45851 => 'Tamron SP AF 300mm F2.8 LD IF', #11
530             45861 => 'Tamron SP AF 35-105mm F2.8 LD Aspherical IF', #Fredrik Agert
531             45871 => 'Tamron AF 70-210mm F2.8 SP LD', #Fabio Suprani
532             # 48128: the Speed Booster Ultra appears to report type 48128 (=0xbc00)
533             # - this is the base to which the Canon LensType is added
534             48128 => 'Metabones Canon EF Speed Booster Ultra', #JR (to this, add Canon LensType)
535             # 61184: older firmware versions of both the Speed Booster and the Smart Adapter
536             # report type 61184 (=0xef00), and add only the lower byte of the Canon LensType (ref JR).
537             # For newer firmware versions this is only used by the Smart Adapter, and
538             # the full Canon LensType code is added - PH
539             # the metabones adapter translates Canon L -> G, II -> II, USM -> SSM, IS -> OSS (ref JR)
540             # This offset is used by Metabones, Fotodiox, Sigma MC-11 EF-E and Viltrox Canon EF adapters.
541             61184 => 'Canon EF Adapter', #JR (to this, add Canon LensType)
542             # 65280 = 0xff00
543             65280 => 'Sigma 16mm F2.8 Filtermatic Fisheye', #IB
544             # all M42-type lenses give a value of 65535 (and FocalLength=0, FNumber=1)
545             65535 => 'E-Mount, T-Mount, Other Lens or no lens', #JD/JR
546             '65535.1' => 'Arax MC 35mm F2.8 Tilt+Shift', #JD
547             '65535.2' => 'Arax MC 80mm F2.8 Tilt+Shift', #JD
548             '65535.3' => 'Zenitar MF 16mm F2.8 Fisheye M42', #JD
549             '65535.4' => 'Samyang 500mm Mirror F8.0', #19
550             '65535.5' => 'Pentacon Auto 135mm F2.8', #19
551             '65535.6' => 'Pentacon Auto 29mm F2.8', #19
552             '65535.7' => 'Helios 44-2 58mm F2.0', #19
553             );
554              
555             %minoltaTeleconverters = (
556             0x00 => 'None',
557             0x04 => 'Minolta/Sony AF 1.4x APO (D) (0x04)', # (Andy Johnson, A77 APO and APO D)
558             0x05 => 'Minolta/Sony AF 2x APO (D) (0x05)', # (Andy Johnson, A77 APO D)
559             0x48 => 'Minolta/Sony AF 2x APO (D)',
560             # 0x48 => 'Sony 2x Teleconverter (SAL20TC)', (ref JR)
561             0x50 => 'Minolta AF 2x APO II',
562             0x60 => 'Minolta AF 2x APO',#26
563             0x88 => 'Minolta/Sony AF 1.4x APO (D)',
564             # 0x88 => 'Sony 1.4x Teleconverter (SAL14TC)', (ref JR)
565             0x90 => 'Minolta AF 1.4x APO II',
566             0xa0 => 'Minolta AF 1.4x APO',#26
567             );
568              
569             %minoltaColorMode = (
570             0 => 'Natural color',
571             1 => 'Black & White',
572             2 => 'Vivid color',
573             3 => 'Solarization',
574             4 => 'Adobe RGB',
575             5 => 'Sepia', #10
576             9 => 'Natural', #10
577             12 => 'Portrait', #10
578             13 => 'Natural sRGB',
579             14 => 'Natural+ sRGB',
580             15 => 'Landscape', #10
581             16 => 'Evening', #10
582             17 => 'Night Scene', #10
583             18 => 'Night Portrait', #10
584             0x84 => 'Embed Adobe RGB',
585             );
586              
587             %sonyColorMode = ( #15
588             0 => 'Standard',
589             1 => 'Vivid', #PH
590             2 => 'Portrait',
591             3 => 'Landscape',
592             4 => 'Sunset',
593             5 => 'Night View/Portrait', #(portrait if flash is on)
594             6 => 'B&W',
595             7 => 'Adobe RGB',
596             12 => 'Neutral', # Sony
597             13 => 'Clear', #JR (NC)
598             14 => 'Deep', #JR
599             15 => 'Light', #JR (NC)
600             16 => 'Autumn Leaves', #JR (NC)
601             17 => 'Sepia', #JR
602             18 => 'FL', #JR (7SM3)
603             19 => 'Vivid 2', #JR (7SM3)
604             20 => 'IN', #JR (7SM3)
605             21 => 'SH', #JR (7SM3)
606             22 => 'FL2', #JR (ILME-FX2)
607             23 => 'FL3', #JR (ILME-FX2)
608             100 => 'Neutral', #JD
609             101 => 'Clear', #JD
610             102 => 'Deep', #JD
611             103 => 'Light', #JD
612             104 => 'Night View', #JD
613             105 => 'Autumn Leaves', #JD
614             255 => 'Off', #JR (new for ILCE-7SM3, July 2020)
615             0xffffffff => 'n/a', #PH
616             );
617              
618             %minoltaSceneMode = (
619             0 => 'Standard',
620             1 => 'Portrait',
621             2 => 'Text',
622             3 => 'Night Scene',
623             4 => 'Sunset',
624             5 => 'Sports',
625             6 => 'Landscape',
626             7 => 'Night Portrait', #JD
627             8 => 'Macro',
628             9 => 'Super Macro',
629             16 => 'Auto', # (RX100 'Intelligent Auto' - PH)
630             17 => 'Night View/Portrait',
631             18 => 'Sweep Panorama', #PH (SLT-A55V)
632             19 => 'Handheld Night Shot', #PH
633             20 => 'Anti Motion Blur', #PH
634             21 => 'Cont. Priority AE', #PH
635             22 => 'Auto+',
636             23 => '3D Sweep Panorama', #PH (SLT-A55V)
637             24 => 'Superior Auto', #28
638             25 => 'High Sensitivity', #28
639             26 => 'Fireworks', #28
640             27 => 'Food', #28
641             28 => 'Pet', #28
642             33 => 'HDR', #JR
643             0xffff => 'n/a', #PH
644             );
645              
646             # tag information for AFStatus tags (ref 20)
647             %afStatusInfo = (
648             Format => 'int16s',
649             # 0=in focus, -32768=out of focus, -ve=front focus, +ve=back focus
650             PrintConvColumns => 2,
651             PrintConv => {
652             0 => 'In Focus',
653             -32768 => 'Out of Focus',
654             OTHER => sub {
655             my ($val, $inv) = @_;
656             $inv and $val =~ /([-+]?\d+)/, return $1;
657             return $val < 0 ? "Front Focus ($val)" : "Back Focus (+$val)";
658             },
659             },
660             );
661              
662             my %exposureIndicator = (
663             0 => 'Not Indicated',
664             1 => 'Under Scale',
665             119 => 'Bottom of Scale',
666             120 => '-2.0',
667             121 => '-1.7',
668             122 => '-1.5',
669             123 => '-1.3',
670             124 => '-1.0',
671             125 => '-0.7',
672             126 => '-0.5',
673             127 => '-0.3',
674             128 => '0',
675             129 => '+0.3',
676             130 => '+0.5',
677             131 => '+0.7',
678             132 => '+1.0',
679             133 => '+1.3',
680             134 => '+1.5',
681             135 => '+1.7',
682             136 => '+2.0',
683             253 => 'Top of Scale',
684             254 => 'Over Scale',
685             );
686              
687             my %onOff = ( 0 => 'On', 1 => 'Off' );
688             my %offOn = ( 0 => 'Off', 1 => 'On' );
689              
690             # Minolta tag table
691             %Image::ExifTool::Minolta::Main = (
692             WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
693             CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
694             WRITABLE => 1,
695             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
696             0x0000 => {
697             Name => 'MakerNoteVersion',
698             Writable => 'undef',
699             Count => 4,
700             },
701             0x0001 => {
702             Name => 'MinoltaCameraSettingsOld',
703             SubDirectory => {
704             TagTable => 'Image::ExifTool::Minolta::CameraSettings',
705             ByteOrder => 'BigEndian',
706             },
707             },
708             0x0003 => {
709             Name => 'MinoltaCameraSettings',
710             # These camera settings are different for the DiMAGE X31
711             Condition => '$self->{Model} ne "DiMAGE X31"',
712             SubDirectory => {
713             TagTable => 'Image::ExifTool::Minolta::CameraSettings',
714             ByteOrder => 'BigEndian',
715             },
716             },
717             0x0004 => { #8
718             Name => 'MinoltaCameraSettings7D',
719             SubDirectory => {
720             TagTable => 'Image::ExifTool::Minolta::CameraSettings7D',
721             ByteOrder => 'BigEndian',
722             },
723             },
724             0x0010 => { #20 (count: 256)
725             Name => 'CameraInfoA100',
726             Condition => '$$self{Model} eq "DSLR-A100"',
727             SubDirectory => {
728             TagTable => 'Image::ExifTool::Minolta::CameraInfoA100',
729             ByteOrder => 'LittleEndian',
730             },
731             },
732             # it appears that image stabilization is on if this tag exists (ref 2),
733             # but it is an 8kB binary data block!
734             0x0018 => [
735             {
736             Name => 'ISInfoA100',
737             Condition => '$self->{Model} eq "DSLR-A100"',
738             SubDirectory => {
739             TagTable => 'Image::ExifTool::Minolta::ISInfoA100',
740             ByteOrder => 'BigEndian',
741             },
742             },{
743             Name => 'ImageStabilization',
744             Condition => '$self->{Model} =~ /^DiMAGE (A1|A2|X1)$/',
745             Notes => q{
746             a block of binary data which exists in DiMAGE A2 (and A1/X1?) images only if
747             image stabilization is enabled
748             },
749             ValueConv => '"On"',
750             },
751             ],
752             0x0020 => {
753             Name => 'WBInfoA100',
754             Condition => '$$self{Model} eq "DSLR-A100"',
755             Notes => 'currently decoded only for the Sony A100',
756             SubDirectory => {
757             TagTable => 'Image::ExifTool::Minolta::WBInfoA100',
758             ByteOrder => 'BigEndian',
759             },
760             },
761             0x0040 => {
762             Name => 'CompressedImageSize',
763             Writable => 'int32u',
764             },
765             0x0081 => {
766             # JPEG preview found in DiMAGE 7 images
767             %Image::ExifTool::previewImageTagInfo,
768             Groups => { 2 => 'Preview' },
769             Permanent => 1, # don't add this to a file
770             },
771             0x0088 => {
772             Name => 'PreviewImageStart',
773             Flags => 'IsOffset',
774             OffsetPair => 0x0089, # point to associated byte count
775             DataTag => 'PreviewImage',
776             Writable => 'int32u',
777             WriteGroup => 'MakerNotes',
778             Protected => 2,
779             # Note: Sony also uses this tag in A100 ARW images, but it points
780             # to the same data as JpgFromRaw
781             },
782             0x0089 => {
783             Name => 'PreviewImageLength',
784             OffsetPair => 0x0088, # point to associated offset
785             DataTag => 'PreviewImage',
786             Writable => 'int32u',
787             WriteGroup => 'MakerNotes',
788             Protected => 2,
789             },
790             0x0100 => { #10
791             Name => 'SceneMode',
792             Writable => 'int32u',
793             PrintConv => \%minoltaSceneMode,
794             },
795             0x0101 => [
796             {
797             Name => 'ColorMode',
798             Condition => '$self->{Make} !~ /^SONY/',
799             Priority => 0, # Other ColorMode is more reliable for A2
800             Writable => 'int32u',
801             PrintConv => \%minoltaColorMode,
802             },
803             { #15
804             Name => 'ColorMode',
805             Writable => 'int32u',
806             Notes => 'Sony models',
807             PrintConv => \%sonyColorMode,
808             },
809             ],
810             0x0102 => {
811             Name => 'MinoltaQuality',
812             Writable => 'int32u',
813             # PrintConv strings conform with Minolta reference manual (ref NJ)
814             # (note that Minolta calls an uncompressed TIFF image "Super fine")
815             PrintConv => {
816             0 => 'Raw',
817             1 => 'Super Fine',
818             2 => 'Fine',
819             3 => 'Standard',
820             4 => 'Economy',
821             5 => 'Extra fine',
822             },
823             },
824             # (0x0103 is the same as 0x0102 above) -- this is true for some
825             # cameras (A2/7Hi), but not others - PH
826             0x0103 => [
827             {
828             Name => 'MinoltaQuality',
829             Writable => 'int32u',
830             Condition => '$self->{Model} =~ /^DiMAGE (A2|7Hi)$/',
831             Notes => 'quality for DiMAGE A2/7Hi',
832             Priority => 0, # lower priority because this doesn't work for A200
833             PrintConv => { #NJ
834             0 => 'Raw',
835             1 => 'Super Fine',
836             2 => 'Fine',
837             3 => 'Standard',
838             4 => 'Economy',
839             5 => 'Extra fine',
840             },
841             },
842             { #PH
843             Name => 'MinoltaImageSize',
844             Writable => 'int32u',
845             Condition => '$self->{Model} !~ /^DiMAGE A200$/',
846             Notes => 'image size for other models except A200',
847             PrintConv => {
848             1 => '1600x1200',
849             2 => '1280x960',
850             3 => '640x480',
851             5 => '2560x1920',
852             6 => '2272x1704',
853             7 => '2048x1536',
854             },
855             },
856             ],
857             0x0104 => { #14
858             Name => 'FlashExposureComp',
859             Description => 'Flash Exposure Compensation',
860             Writable => 'rational64s',
861             },
862             0x0105 => { #10
863             Name => 'Teleconverter',
864             Writable => 'int32u',
865             PrintHex => 1,
866             PrintConv => \%minoltaTeleconverters,
867             },
868             0x0107 => { #8
869             Name => 'ImageStabilization',
870             Writable => 'int32u',
871             PrintConv => {
872             1 => 'Off',
873             5 => 'On',
874             },
875             },
876             0x0109 => { #20
877             Name => 'RawAndJpgRecording',
878             Writable => 'int32u',
879             PrintConv => \%offOn,
880             },
881             0x010a => {
882             Name => 'ZoneMatching',
883             Writable => 'int32u',
884             PrintConv => {
885             0 => 'ISO Setting Used',
886             1 => 'High Key',
887             2 => 'Low Key',
888             },
889             },
890             0x010b => {
891             Name => 'ColorTemperature',
892             Writable => 'int32u',
893             },
894             0x010c => { #3 (Alpha 7)
895             Name => 'LensType',
896             Writable => 'int32u',
897             SeparateTable => 1,
898             ValueConvInv => 'int($val)', # (must truncate decimal part)
899             PrintConv => \%minoltaLensTypes,
900             PrintInt => 1,
901             },
902             # 0x010e - WhiteBalance according to ref #10
903             0x0111 => { #20
904             Name => 'ColorCompensationFilter',
905             Writable => 'int32s',
906             Notes => 'ranges from -2 for green to +2 for magenta',
907             },
908             0x0112 => { #PH (from Sony tags, NC)
909             Name => 'WhiteBalanceFineTune',
910             Format => 'int32s',
911             Writable => 'int32u',
912             },
913             0x0113 => { #PH
914             Name => 'ImageStabilization',
915             Condition => '$self->{Model} eq "DSLR-A100"',
916             Notes => 'valid for Sony A100 only',
917             Writable => 'int32u',
918             PrintConv => \%offOn,
919             },
920             0x0114 => [
921             { #8
922             Name => 'MinoltaCameraSettings5D',
923             Condition => '$self->{Model} =~ /^(DYNAX 5D|MAXXUM 5D|ALPHA SWEET)/',
924             SubDirectory => {
925             TagTable => 'Image::ExifTool::Minolta::CameraSettings5D',
926             ByteOrder => 'BigEndian',
927             },
928             },
929             { #PH
930             Name => 'CameraSettingsA100',
931             Condition => '$self->{Model} eq "DSLR-A100"',
932             SubDirectory => {
933             TagTable => 'Image::ExifTool::Minolta::CameraSettingsA100',
934             ByteOrder => 'BigEndian', # required because order differs for ARW and JPG images
935             },
936             },
937             ],
938             0x0115 => { #20
939             Name => 'WhiteBalance',
940             Writable => 'int32u',
941             PrintHex => 1,
942             PrintConv => {
943             0x00 => 'Auto',
944             0x01 => 'Color Temperature/Color Filter',
945             0x10 => 'Daylight',
946             0x20 => 'Cloudy',
947             0x30 => 'Shade',
948             0x40 => 'Tungsten',
949             0x50 => 'Flash',
950             0x60 => 'Fluorescent',
951             0x70 => 'Custom',
952             },
953             },
954             0x0e00 => {
955             Name => 'PrintIM',
956             Description => 'Print Image Matching',
957             Writable => 0,
958             SubDirectory => {
959             TagTable => 'Image::ExifTool::PrintIM::Main',
960             },
961             },
962             0x0f00 => {
963             Name => 'MinoltaCameraSettings2',
964             Writable => 0,
965             Binary => 1,
966             },
967             );
968              
969             %Image::ExifTool::Minolta::CameraSettings = (
970             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
971             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
972             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
973             WRITABLE => 1,
974             PRIORITY => 0, # not as reliable as other tags
975             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
976             FORMAT => 'int32u',
977             FIRST_ENTRY => 0,
978             NOTES => q{
979             There is some variability in CameraSettings information between different
980             models (and sometimes even between different firmware versions), so this
981             information may not be as reliable as it should be. Because of this, tags
982             in the following tables are set to lower priority to prevent them from
983             superseding the values of same-named tags in other locations when duplicate
984             tags are disabled.
985             },
986             1 => {
987             Name => 'ExposureMode',
988             PrintConv => {
989             0 => 'Program',
990             1 => 'Aperture Priority',
991             2 => 'Shutter Priority',
992             3 => 'Manual',
993             },
994             },
995             2 => {
996             Name => 'FlashMode',
997             PrintConv => {
998             0 => 'Fill flash',
999             1 => 'Red-eye reduction',
1000             2 => 'Rear flash sync',
1001             3 => 'Wireless',
1002             4 => 'Off?', #PH
1003             },
1004             },
1005             3 => {
1006             Name => 'WhiteBalance',
1007             PrintConv => 'Image::ExifTool::Minolta::ConvertWhiteBalance($val)',
1008             },
1009             4 => {
1010             Name => 'MinoltaImageSize',
1011             PrintConv => {
1012             0 => 'Full',
1013             1 => '1600x1200',
1014             2 => '1280x960',
1015             3 => '640x480',
1016             6 => '2080x1560', #PH (A2)
1017             7 => '2560x1920', #PH (A2)
1018             8 => '3264x2176', #PH (A2)
1019             },
1020             },
1021             5 => {
1022             Name => 'MinoltaQuality',
1023             PrintConv => { #NJ
1024             0 => 'Raw',
1025             1 => 'Super Fine',
1026             2 => 'Fine',
1027             3 => 'Standard',
1028             4 => 'Economy',
1029             5 => 'Extra Fine',
1030             },
1031             },
1032             6 => {
1033             Name => 'DriveMode',
1034             PrintConv => {
1035             0 => 'Single',
1036             1 => 'Continuous',
1037             2 => 'Self-timer',
1038             4 => 'Bracketing',
1039             5 => 'Interval',
1040             6 => 'UHS continuous',
1041             7 => 'HS continuous',
1042             },
1043             },
1044             7 => {
1045             Name => 'MeteringMode',
1046             PrintConv => {
1047             0 => 'Multi-segment',
1048             1 => 'Center-weighted average',
1049             2 => 'Spot',
1050             },
1051             },
1052             8 => {
1053             Name => 'ISO',
1054             ValueConv => '2 ** (($val-48)/8) * 100',
1055             ValueConvInv => '48 + 8*log($val/100)/log(2)',
1056             PrintConv => 'int($val + 0.5)',
1057             PrintConvInv => '$val',
1058             },
1059             9 => {
1060             Name => 'ExposureTime',
1061             ValueConv => '2 ** ((48-$val)/8)',
1062             ValueConvInv => '48 - 8*log($val)/log(2)',
1063             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1064             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1065             },
1066             10 => {
1067             Name => 'FNumber',
1068             ValueConv => '2 ** (($val-8)/16)',
1069             ValueConvInv => '8 + 16*log($val)/log(2)',
1070             PrintConv => 'sprintf("%.1f",$val)',
1071             PrintConvInv => '$val',
1072             },
1073             11 => {
1074             Name => 'MacroMode',
1075             PrintConv => {
1076             0 => 'Off',
1077             1 => 'On',
1078             },
1079             },
1080             12 => {
1081             Name => 'DigitalZoom',
1082             PrintConv => {
1083             0 => 'Off',
1084             1 => 'Electronic magnification',
1085             2 => '2x',
1086             },
1087             },
1088             13 => {
1089             Name => 'ExposureCompensation',
1090             ValueConv => '$val/3 - 2',
1091             ValueConvInv => '($val + 2) * 3',
1092             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1093             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1094             },
1095             14 => {
1096             Name => 'BracketStep',
1097             PrintConv => {
1098             0 => '1/3 EV',
1099             1 => '2/3 EV',
1100             2 => '1 EV',
1101             },
1102             },
1103             16 => 'IntervalLength',
1104             17 => 'IntervalNumber',
1105             18 => {
1106             Name => 'FocalLength',
1107             ValueConv => '$val / 256',
1108             ValueConvInv => '$val * 256',
1109             PrintConv => 'sprintf("%.1f mm",$val)',
1110             PrintConvInv => '$val=~s/\s*mm$//;$val',
1111             },
1112             19 => {
1113             Name => 'FocusDistance',
1114             ValueConv => '$val / 1000',
1115             ValueConvInv => '$val * 1000',
1116             PrintConv => '$val ? "$val m" : "inf"',
1117             PrintConvInv => '$val eq "inf" ? 0 : $val =~ s/\s*m$//, $val',
1118             },
1119             20 => {
1120             Name => 'FlashFired',
1121             PrintConv => {
1122             0 => 'No',
1123             1 => 'Yes',
1124             },
1125             },
1126             21 => {
1127             Name => 'MinoltaDate',
1128             Groups => { 2 => 'Time' },
1129             Shift => 'Time',
1130             ValueConv => 'sprintf("%4d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
1131             ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
1132             },
1133             22 => {
1134             Name => 'MinoltaTime',
1135             Groups => { 2 => 'Time' },
1136             Shift => 'Time',
1137             ValueConv => 'sprintf("%.2d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
1138             ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
1139             },
1140             23 => {
1141             Name => 'MaxAperture',
1142             ValueConv => '2 ** (($val-8)/16)',
1143             ValueConvInv => '8 + 16*log($val)/log(2)',
1144             PrintConv => 'sprintf("%.1f",$val)',
1145             PrintConvInv => '$val',
1146             },
1147             26 => {
1148             Name => 'FileNumberMemory',
1149             PrintConv => \%offOn,
1150             },
1151             27 => 'LastFileNumber',
1152             28 => {
1153             Name => 'ColorBalanceRed',
1154             ValueConv => '$val / 256',
1155             ValueConvInv => '$val * 256',
1156             },
1157             29 => {
1158             Name => 'ColorBalanceGreen',
1159             ValueConv => '$val / 256',
1160             ValueConvInv => '$val * 256',
1161             },
1162             30 => {
1163             Name => 'ColorBalanceBlue',
1164             ValueConv => '$val / 256',
1165             ValueConvInv => '$val * 256',
1166             },
1167             31 => {
1168             Name => 'Saturation',
1169             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1170             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1171             %Image::ExifTool::Exif::printParameter,
1172             },
1173             32 => {
1174             Name => 'Contrast',
1175             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1176             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1177             %Image::ExifTool::Exif::printParameter,
1178             },
1179             33 => {
1180             Name => 'Sharpness',
1181             PrintConv => {
1182             0 => 'Hard',
1183             1 => 'Normal',
1184             2 => 'Soft',
1185             },
1186             },
1187             34 => {
1188             Name => 'SubjectProgram',
1189             PrintConv => {
1190             0 => 'None',
1191             1 => 'Portrait',
1192             2 => 'Text',
1193             3 => 'Night portrait',
1194             4 => 'Sunset',
1195             5 => 'Sports action',
1196             },
1197             },
1198             35 => {
1199             Name => 'FlashExposureComp',
1200             Description => 'Flash Exposure Compensation',
1201             ValueConv => '($val - 6) / 3',
1202             ValueConvInv => '$val * 3 + 6',
1203             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1204             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1205             },
1206             36 => {
1207             Name => 'ISOSetting',
1208             PrintConv => {
1209             0 => 100,
1210             1 => 200,
1211             2 => 400,
1212             3 => 800,
1213             4 => 'Auto',
1214             5 => 64,
1215             },
1216             },
1217             37 => {
1218             Name => 'MinoltaModelID',
1219             PrintConv => {
1220             0 => 'DiMAGE 7, X1, X21 or X31',
1221             1 => 'DiMAGE 5',
1222             2 => 'DiMAGE S304',
1223             3 => 'DiMAGE S404',
1224             4 => 'DiMAGE 7i',
1225             5 => 'DiMAGE 7Hi',
1226             6 => 'DiMAGE A1',
1227             7 => 'DiMAGE A2 or S414',
1228             },
1229             },
1230             38 => {
1231             Name => 'IntervalMode',
1232             PrintConv => {
1233             0 => 'Still Image',
1234             1 => 'Time-lapse Movie',
1235             },
1236             },
1237             39 => {
1238             Name => 'FolderName',
1239             PrintConv => {
1240             0 => 'Standard Form',
1241             1 => 'Data Form',
1242             },
1243             },
1244             40 => {
1245             Name => 'ColorMode',
1246             PrintConv => {
1247             0 => 'Natural color',
1248             1 => 'Black & White',
1249             2 => 'Vivid color',
1250             3 => 'Solarization',
1251             4 => 'Adobe RGB',
1252             },
1253             },
1254             41 => {
1255             Name => 'ColorFilter',
1256             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1257             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1258             },
1259             42 => 'BWFilter',
1260             43 => {
1261             Name => 'InternalFlash',
1262             PrintConv => {
1263             0 => 'No',
1264             1 => 'Fired',
1265             },
1266             },
1267             44 => {
1268             Name => 'Brightness',
1269             ValueConv => '$val/8 - 6',
1270             ValueConvInv => '($val + 6) * 8',
1271             },
1272             45 => 'SpotFocusPointX',
1273             46 => 'SpotFocusPointY',
1274             47 => {
1275             Name => 'WideFocusZone',
1276             PrintConv => {
1277             0 => 'No zone',
1278             1 => 'Center zone (horizontal orientation)',
1279             2 => 'Center zone (vertical orientation)',
1280             3 => 'Left zone',
1281             4 => 'Right zone',
1282             },
1283             },
1284             48 => {
1285             Name => 'FocusMode',
1286             PrintConv => {
1287             0 => 'AF',
1288             1 => 'MF',
1289             },
1290             },
1291             49 => {
1292             Name => 'FocusArea',
1293             PrintConv => {
1294             0 => 'Wide Focus (normal)',
1295             1 => 'Spot Focus',
1296             },
1297             },
1298             50 => {
1299             Name => 'DECPosition',
1300             PrintConv => {
1301             0 => 'Exposure',
1302             1 => 'Contrast',
1303             2 => 'Saturation',
1304             3 => 'Filter',
1305             },
1306             },
1307             # 7Hi only:
1308             51 => {
1309             Name => 'ColorProfile',
1310             Condition => '$self->{Model} eq "DiMAGE 7Hi"',
1311             Notes => 'DiMAGE 7Hi only',
1312             PrintConv => {
1313             0 => 'Not Embedded',
1314             1 => 'Embedded',
1315             },
1316             },
1317             # (the following may be entry 51 for other models?)
1318             52 => {
1319             Name => 'DataImprint',
1320             Condition => '$self->{Model} eq "DiMAGE 7Hi"',
1321             Notes => 'DiMAGE 7Hi only',
1322             PrintConv => {
1323             0 => 'None',
1324             1 => 'YYYY/MM/DD',
1325             2 => 'MM/DD/HH:MM',
1326             3 => 'Text',
1327             4 => 'Text + ID#',
1328             },
1329             },
1330             63 => { #9
1331             Name => 'FlashMetering',
1332             PrintConv => {
1333             0 => 'ADI (Advanced Distance Integration)',
1334             1 => 'Pre-flash TTL',
1335             2 => 'Manual flash control',
1336             },
1337             },
1338             );
1339              
1340             # Camera settings used by the 7D (ref 8)
1341             %Image::ExifTool::Minolta::CameraSettings7D = (
1342             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1343             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1344             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1345             WRITABLE => 1,
1346             PRIORITY => 0,
1347             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1348             FORMAT => 'int16u',
1349             FIRST_ENTRY => 0,
1350             0x00 => {
1351             Name => 'ExposureMode',
1352             PrintConv => {
1353             0 => 'Program',
1354             1 => 'Aperture Priority',
1355             2 => 'Shutter Priority',
1356             3 => 'Manual',
1357             4 => 'Auto',
1358             5 => 'Program-shift A',
1359             6 => 'Program-shift S',
1360             },
1361             },
1362             0x02 => { #PH
1363             Name => 'MinoltaImageSize',
1364             PrintConv => {
1365             0 => 'Large',
1366             1 => 'Medium',
1367             2 => 'Small',
1368             },
1369             },
1370             0x03 => {
1371             Name => 'MinoltaQuality',
1372             PrintConv => {
1373             0 => 'RAW',
1374             16 => 'Fine', #PH
1375             32 => 'Normal', #PH
1376             34 => 'RAW+JPEG',
1377             48 => 'Economy', #PH
1378             },
1379             },
1380             0x04 => {
1381             Name => 'WhiteBalance',
1382             PrintConv => {
1383             0 => 'Auto',
1384             1 => 'Daylight',
1385             2 => 'Shade',
1386             3 => 'Cloudy',
1387             4 => 'Tungsten',
1388             5 => 'Fluorescent',
1389             0x100 => 'Kelvin',
1390             0x200 => 'Manual',
1391             },
1392             },
1393             0x0e => {
1394             Name => 'FocusMode',
1395             PrintConv => {
1396             0 => 'AF-S',
1397             1 => 'AF-C',
1398             # Note: these two are reversed in ref 8
1399             3 => 'Manual', #JD
1400             4 => 'AF-A', #JD
1401             },
1402             },
1403             0x10 => {
1404             Name => 'AFPoints',
1405             PrintConv => {
1406             0 => '(none)',
1407             BITMASK => {
1408             0 => 'Center',
1409             1 => 'Top',
1410             2 => 'Top-right',
1411             3 => 'Right',
1412             4 => 'Bottom-right',
1413             5 => 'Bottom',
1414             6 => 'Bottom-left',
1415             7 => 'Left',
1416             8 => 'Top-left',
1417             },
1418             },
1419             },
1420             0x15 => {
1421             Name => 'Flash',
1422             PrintConv => \%offOn,
1423             },
1424             0x16 => { #10
1425             Name => 'FlashMode',
1426             PrintConv => {
1427             0 => 'Normal',
1428             1 => 'Red-eye reduction',
1429             2 => 'Rear flash sync',
1430             },
1431             },
1432             0x1c => {
1433             Name => 'ISOSetting',
1434             PrintConv => {
1435             0 => 'Auto', #10
1436             1 => 100,
1437             3 => 200,
1438             4 => 400,
1439             5 => 800,
1440             6 => 1600,
1441             7 => 3200,
1442             },
1443             },
1444             0x1e => {
1445             Name => 'ExposureCompensation',
1446             Format => 'int16s',
1447             ValueConv => '$val / 24',
1448             ValueConvInv => '$val * 24',
1449             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1450             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1451             },
1452             0x25 => {
1453             Name => 'ColorSpace',
1454             PrintConv => {
1455             0 => 'Natural sRGB',
1456             1 => 'Natural+ sRGB',
1457             4 => 'Adobe RGB',
1458             },
1459             },
1460             0x26 => {
1461             Name => 'Sharpness',
1462             ValueConv => '$val - 10',
1463             ValueConvInv => '$val + 10',
1464             },
1465             0x27 => {
1466             Name => 'Contrast',
1467             ValueConv => '$val - 10',
1468             ValueConvInv => '$val + 10',
1469             },
1470             0x28 => {
1471             Name => 'Saturation',
1472             ValueConv => '$val - 10',
1473             ValueConvInv => '$val + 10',
1474             },
1475             0x2d => 'FreeMemoryCardImages',
1476             0x3f => {
1477             Format => 'int16s',
1478             Name => 'ColorTemperature',
1479             ValueConv => '$val * 100',
1480             ValueConvInv => '$val / 100',
1481             },
1482             0x40 => { #10
1483             Name => 'HueAdjustment',
1484             ValueConv => '$val - 10',
1485             ValueConvInv => '$val + 10',
1486             },
1487             0x46 => {
1488             Name => 'Rotation',
1489             PrintConv => {
1490             72 => 'Horizontal (normal)',
1491             76 => 'Rotate 90 CW',
1492             82 => 'Rotate 270 CW',
1493             },
1494             },
1495             0x47 => {
1496             Name => 'FNumber',
1497             ValueConv => '2 ** (($val-8)/16)',
1498             ValueConvInv => '8 + 16*log($val)/log(2)',
1499             PrintConv => 'sprintf("%.1f",$val)',
1500             PrintConvInv => '$val',
1501             },
1502             0x48 => {
1503             Name => 'ExposureTime',
1504             ValueConv => '2 ** ((48-$val)/8)',
1505             ValueConvInv => '48 - 8*log($val)/log(2)',
1506             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1507             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1508             },
1509             0x4a => 'FreeMemoryCardImages',
1510             0x5e => {
1511             Name => 'ImageNumber',
1512             Notes => q{
1513             this information may appear at index 98 (0x62), depending on firmware
1514             version
1515             },
1516             ValueConv => '$val + 1',
1517             ValueConvInv => '$val - 1',
1518             },
1519             0x60 => {
1520             Name => 'NoiseReduction',
1521             PrintConv => \%offOn,
1522             },
1523             0x62 => {
1524             Name => 'ImageNumber2',
1525             ValueConv => '$val + 1',
1526             ValueConvInv => '$val - 1',
1527             },
1528             0x71 => {
1529             Name => 'ImageStabilization',
1530             PrintConv => \%offOn,
1531             },
1532             0x75 => {
1533             Name => 'ZoneMatchingOn',
1534             PrintConv => \%offOn,
1535             },
1536             );
1537              
1538             # Camera settings used by the 5D (ref 8)
1539             %Image::ExifTool::Minolta::CameraSettings5D = (
1540             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1541             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1542             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1543             WRITABLE => 1,
1544             PRIORITY => 0,
1545             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1546             FORMAT => 'int16u',
1547             FIRST_ENTRY => 0,
1548             0x0a => {
1549             Name => 'ExposureMode',
1550             PrintConv => {
1551             0 => 'Program',
1552             1 => 'Aperture Priority',
1553             2 => 'Shutter Priority',
1554             3 => 'Manual',
1555             4 => 'Auto?',
1556             4131 => 'Connected Copying?',
1557             },
1558             },
1559             0x0c => { #PH
1560             Name => 'MinoltaImageSize',
1561             PrintConv => {
1562             0 => 'Large',
1563             1 => 'Medium',
1564             2 => 'Small',
1565             },
1566             },
1567             0x0d => {
1568             Name => 'MinoltaQuality',
1569             PrintConv => {
1570             0 => 'RAW',
1571             16 => 'Fine', #PH
1572             32 => 'Normal', #PH
1573             34 => 'RAW+JPEG',
1574             48 => 'Economy', #PH
1575             },
1576             },
1577             0x0e => {
1578             Name => 'WhiteBalance',
1579             PrintConv => {
1580             0 => 'Auto',
1581             1 => 'Daylight',
1582             2 => 'Cloudy',
1583             3 => 'Shade',
1584             4 => 'Tungsten',
1585             5 => 'Fluorescent',
1586             6 => 'Flash',
1587             0x100 => 'Kelvin',
1588             0x200 => 'Manual',
1589             },
1590             },
1591             # 0x0f-0x11 something to do with WB RGB levels as shot? (PH)
1592             # 0x12-0x17 RGB levels for other WB modes (with G missing)? (PH)
1593             0x1f => { #PH
1594             Name => 'Flash',
1595             PrintConv => {
1596             0 => 'Did not fire',
1597             1 => 'Fired',
1598             },
1599             },
1600             0x20 => { #10
1601             Name => 'FlashMode',
1602             PrintConv => {
1603             0 => 'Normal',
1604             1 => 'Red-eye reduction',
1605             2 => 'Rear flash sync',
1606             },
1607             },
1608             0x25 => {
1609             Name => 'MeteringMode',
1610             PrintConv => {
1611             0 => 'Multi-segment',
1612             1 => 'Center-weighted average',
1613             2 => 'Spot',
1614             },
1615             },
1616             0x26 => {
1617             Name => 'ISOSetting',
1618             PrintConv => {
1619             0 => 'Auto',
1620             1 => 100,
1621             3 => 200,
1622             4 => 400,
1623             5 => 800,
1624             6 => 1600,
1625             7 => 3200,
1626             8 => '200 (Zone Matching High)',
1627             10 => '80 (Zone Matching Low)',
1628             },
1629             },
1630             # looks wrong:
1631             # 0x28 => { #10
1632             # Name => 'ExposureCompensation',
1633             # ValueConv => '$val / 24',
1634             # ValueConvInv => '$val * 24',
1635             # },
1636             0x2f => { #10
1637             Name => 'ColorSpace',
1638             PrintConv => {
1639             0 => 'Natural sRGB',
1640             1 => 'Natural+ sRGB',
1641             2 => 'Monochrome',
1642             4 => 'Adobe RGB (ICC)',
1643             5 => 'Adobe RGB',
1644             },
1645             },
1646             0x30 => {
1647             Name => 'Sharpness',
1648             ValueConv => '$val - 10',
1649             ValueConvInv => '$val + 10',
1650             },
1651             0x31 => {
1652             Name => 'Contrast',
1653             ValueConv => '$val - 10',
1654             ValueConvInv => '$val + 10',
1655             },
1656             0x32 => {
1657             Name => 'Saturation',
1658             ValueConv => '$val - 10',
1659             ValueConvInv => '$val + 10',
1660             },
1661             0x35 => { #PH
1662             Name => 'ExposureTime',
1663             ValueConv => '2 ** ((48-$val)/8)',
1664             ValueConvInv => '48 - 8*log($val)/log(2)',
1665             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1666             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1667             },
1668             0x36 => { #PH
1669             Name => 'FNumber',
1670             ValueConv => '2 ** (($val-8)/16)',
1671             ValueConvInv => '8 + 16*log($val)/log(2)',
1672             PrintConv => 'sprintf("%.1f",$val)',
1673             PrintConvInv => '$val',
1674             },
1675             0x37 => 'FreeMemoryCardImages',
1676             # 0x38 definitely not related to exposure comp as in ref 8 (PH)
1677             0x49 => { #PH
1678             Name => 'ColorTemperature',
1679             Format => 'int16s',
1680             ValueConv => '$val * 100',
1681             ValueConvInv => '$val / 100',
1682             },
1683             0x4a => { #10
1684             Name => 'HueAdjustment',
1685             ValueConv => '$val - 10',
1686             ValueConvInv => '$val + 10',
1687             },
1688             0x50 => {
1689             Name => 'Rotation',
1690             PrintConv => {
1691             72 => 'Horizontal (normal)',
1692             76 => 'Rotate 90 CW',
1693             82 => 'Rotate 270 CW',
1694             },
1695             },
1696             0x53 => {
1697             Name => 'ExposureCompensation',
1698             ValueConv => '$val / 100 - 3',
1699             ValueConvInv => '($val + 3) * 100',
1700             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1701             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1702             },
1703             0x54 => 'FreeMemoryCardImages',
1704             0x65 => { #10
1705             Name => 'Rotation',
1706             PrintConv => {
1707             0 => 'Horizontal (normal)',
1708             1 => 'Rotate 90 CW',
1709             2 => 'Rotate 270 CW',
1710             },
1711             },
1712             # 0x66 maybe program mode or some setting like this? (PH)
1713             0x6e => { #10
1714             Name => 'ColorTemperature',
1715             Format => 'int16s',
1716             ValueConv => '$val * 100',
1717             ValueConvInv => '$val / 100',
1718             },
1719             0x71 => { #10
1720             Name => 'PictureFinish',
1721             PrintConv => {
1722             0 => 'Natural',
1723             1 => 'Natural+',
1724             2 => 'Portrait',
1725             3 => 'Wind Scene',
1726             4 => 'Evening Scene',
1727             5 => 'Night Scene',
1728             6 => 'Night Portrait',
1729             7 => 'Monochrome',
1730             8 => 'Adobe RGB',
1731             9 => 'Adobe RGB (ICC)',
1732             },
1733             },
1734             # 0x95 FlashStrength? (PH)
1735             # 0xa4 similar information to 0x27, except with different values
1736             0xae => {
1737             Name => 'ImageNumber',
1738             ValueConv => '$val + 1',
1739             ValueConvInv => '$val - 1',
1740             },
1741             0xb0 => {
1742             Name => 'NoiseReduction',
1743             PrintConv => \%offOn,
1744             },
1745             0xbd => {
1746             Name => 'ImageStabilization',
1747             PrintConv => \%offOn,
1748             },
1749             );
1750              
1751             # Camera settings used by the Sony DSLR-A100 (ref 20)
1752             %Image::ExifTool::Minolta::CameraInfoA100 = (
1753             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1754             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1755             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1756             NOTES => 'Camera information for the Sony DSLR-A100.',
1757             WRITABLE => 1,
1758             PRIORITY => 0, # may not be as reliable as other information
1759             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1760             FIRST_ENTRY => 0,
1761             0x01 => { #PH
1762             Name => 'AFSensorActive',
1763             PrintConv => {
1764             0 => 'Top-right',
1765             1 => 'Bottom-right',
1766             2 => 'Bottom',
1767             3 => 'Middle Horizontal',
1768             4 => 'Center Vertical',
1769             5 => 'Top',
1770             6 => 'Top-left',
1771             7 => 'Bottom-left',
1772             },
1773             },
1774             0x02 => {
1775             Name => 'AFStatusActiveSensor',
1776             %afStatusInfo,
1777             Notes => q{
1778             the focus status at shutter release. May not reflect the status after
1779             focusing if the image is focused then recomposed
1780             },
1781             },
1782             0x04 => { Name => 'AFStatusTop-right', %afStatusInfo },
1783             0x06 => { Name => 'AFStatusBottom-right', %afStatusInfo },
1784             0x08 => { Name => 'AFStatusBottom', %afStatusInfo },
1785             0x0a => {
1786             Name => 'AFStatusMiddleHorizontal',
1787             %afStatusInfo,
1788             Notes => q{
1789             any of the three horizontal sensors at the middle of the focus frame: Left,
1790             Center or Right
1791             },
1792             },
1793             0x0c => { Name => 'AFStatusCenterVertical', %afStatusInfo },
1794             0x0e => { Name => 'AFStatusTop', %afStatusInfo },
1795             0x10 => { Name => 'AFStatusTop-left', %afStatusInfo },
1796             0x12 => { Name => 'AFStatusBottom-left', %afStatusInfo },
1797             0x14 => {
1798             Name => 'FocusLocked',
1799             # (Focus can be locked in all modes other than Manual and Continuous,
1800             # and the latter can be overridden by pushing the Spot AF button)
1801             PrintConv => {
1802             0 => 'Manual Focus',
1803             4 => 'No',
1804             16 => 'Continuous Focus',
1805             64 => 'Yes',
1806             },
1807             },
1808             0x15 => {
1809             Name => 'AFPoint',
1810             PrintConvColumns => 2,
1811             PrintConv => {
1812             0 => 'Auto',
1813             1 => 'Center',
1814             2 => 'Top',
1815             3 => 'Top-right',
1816             4 => 'Right',
1817             5 => 'Bottom-right',
1818             6 => 'Bottom',
1819             7 => 'Bottom-left',
1820             8 => 'Left',
1821             9 => 'Top-left',
1822             },
1823             },
1824             0x16 => {
1825             Name => 'AFMode',
1826             PrintConv => {
1827             0 => 'DMF',
1828             1 => 'AF-S',
1829             2 => 'AF-C',
1830             3 => 'AF-A',
1831             },
1832             },
1833             0x2d => { Name => 'AFStatusLeft', %afStatusInfo },
1834             0x2f => { Name => 'AFStatusCenterHorizontal',%afStatusInfo },
1835             0x31 => { Name => 'AFStatusRight', %afStatusInfo },
1836             0x33 => {
1837             Name => 'AFAreaMode',
1838             PrintConv => {
1839             0 => 'Wide',
1840             1 => 'Local',
1841             2 => 'Spot',
1842             },
1843             },
1844             );
1845              
1846             # Image stabilization information used by the Sony DSLR-A100 (ref 20)
1847             %Image::ExifTool::Minolta::ISInfoA100 = (
1848             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1849             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1850             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1851             NOTES => 'Image stabilization information for the Sony DSLR-A100.',
1852             WRITABLE => 1,
1853             PRIORITY => 0, # may not be as reliable as other information
1854             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1855             FIRST_ENTRY => 0,
1856             0 => {
1857             Name => 'ImageStabilization',
1858             Format => 'int16u',
1859             PrintHex => 1,
1860             PrintConv => {
1861             0x0000 => 'Off',
1862             0x2784 => 'On',
1863             },
1864             },
1865             );
1866              
1867             # Camera settings used by the Sony DSLR-A100 (ref PH)
1868             %Image::ExifTool::Minolta::CameraSettingsA100 = (
1869             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1870             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1871             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1872             NOTES => 'Camera settings information for the Sony DSLR-A100.',
1873             WRITABLE => 1,
1874             PRIORITY => 0, # may not be as reliable as other information
1875             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1876             FORMAT => 'int16u',
1877             FIRST_ENTRY => 0,
1878             0x00 => { #15
1879             Name => 'ExposureMode',
1880             PrintHex => 1,
1881             PrintConv => {
1882             0 => 'Program',
1883             1 => 'Aperture Priority',
1884             2 => 'Shutter Priority',
1885             3 => 'Manual',
1886             4 => 'Auto',
1887             5 => 'Program Shift A', #20
1888             6 => 'Program Shift S', #20
1889             0x1013 => 'Portrait',
1890             0x1023 => 'Sports', #20
1891             0x1033 => 'Sunset', #20
1892             0x1043 => 'Night View/Portrait', #20
1893             0x1053 => 'Landscape',
1894             0x1083 => 'Macro', #20
1895             },
1896             },
1897             0x01 => { #15
1898             Name => 'ExposureCompensationSetting',
1899             # (differs from ExposureCompensation for exposure bracketing shots, ref 20)
1900             ValueConv => '$val / 100 - 3',
1901             ValueConvInv => 'int(($val + 3) * 100 + 0.5)',
1902             },
1903             0x05 => { #20 (requires external flash)
1904             Name => 'HighSpeedSync',
1905             PrintConv => \%offOn,
1906             },
1907             0x06 => { #20
1908             Name => 'ShutterSpeedSetting',
1909             Notes => 'used only in M and S exposure modes',
1910             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
1911             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
1912             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
1913             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
1914             },
1915             0x07 => { #20
1916             Name => 'ApertureSetting',
1917             Notes => 'used only in M and A exposure modes',
1918             ValueConv => '2 ** (($val/8 - 1) / 2)',
1919             ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
1920             PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1921             PrintConvInv => '$val',
1922             },
1923             0x08 => { #20
1924             Name => 'ExposureTime',
1925             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
1926             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
1927             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
1928             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
1929             },
1930             0x09 => { #15/20
1931             Name => 'FNumber',
1932             ValueConv => '2 ** (($val/8 - 1) / 2)',
1933             ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
1934             PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1935             PrintConvInv => '$val',
1936             },
1937             0x0a => { #20
1938             Name => 'DriveMode2', # (one of these is probably DriveModeSetting like Sony - PH)
1939             PrintHex => 1,
1940             PrintConv => {
1941             0x000 => 'Self-timer 10 sec',
1942             0x001 => 'Continuous',
1943             0x302 => 'Single-frame Bracketing Low',
1944             0x702 => 'Single-frame Bracketing High',
1945             0x303 => 'Continous Bracketing Low',
1946             0x703 => 'Continuous Bracketing High',
1947             0x004 => 'Self-timer 2 sec',
1948             0x005 => 'Single Frame',
1949             0x008 => 'White Balance Bracketing Low',
1950             0x009 => 'White Balance Bracketing High',
1951             },
1952             },
1953             0x0b => { #15
1954             Name => 'WhiteBalance',
1955             PrintHex => 1,
1956             PrintConv => {
1957             0 => 'Auto',
1958             1 => 'Daylight',
1959             2 => 'Cloudy',
1960             3 => 'Shade',
1961             4 => 'Tungsten',
1962             5 => 'Fluorescent',
1963             6 => 'Flash',
1964             0x100 => 'Kelvin',
1965             0x200 => 'Manual',
1966             },
1967             },
1968             0x0c => { #20
1969             Name => 'FocusMode',
1970             PrintConv => {
1971             0 => 'AF-S',
1972             1 => 'AF-C',
1973             4 => 'AF-A',
1974             5 => 'Manual',
1975             6 => 'DMF',
1976             },
1977             },
1978             0x0d => { #20
1979             Name => 'AFPointSelected', # (v8.88: renamed from LocalAFAreaPoint)
1980             # (9-point centre-cross AF system, ref JR)
1981             PrintConv => {
1982             1 => 'Center',
1983             2 => 'Top',
1984             3 => 'Top-right',
1985             4 => 'Right',
1986             5 => 'Bottom-right',
1987             6 => 'Bottom',
1988             7 => 'Bottom-left',
1989             8 => 'Left',
1990             9 => 'Top-left',
1991             },
1992             },
1993             0x0e => { #20
1994             Name => 'AFAreaMode',
1995             PrintConv => {
1996             0 => 'Wide',
1997             1 => 'Local',
1998             2 => 'Spot',
1999             },
2000             },
2001             0x0f => { #20
2002             Name => 'FlashMode',
2003             PrintConv => {
2004             0 => 'Auto',
2005             2 => 'Rear Sync',
2006             3 => 'Wireless',
2007             4 => 'Fill Flash',
2008             },
2009             },
2010             0x10 => { #20
2011             Name => 'FlashExposureCompSet',
2012             Description => 'Flash Exposure Comp. Setting',
2013             # (may differ from FlashExposureComp for flash bracketing shots)
2014             ValueConv => '$val / 100 - 3',
2015             ValueConvInv => 'int(($val + 3) * 100 + 0.5)',
2016             },
2017             0x12 => { #15/20
2018             Name => 'MeteringMode',
2019             PrintConv => {
2020             0 => 'Multi-segment',
2021             1 => 'Center-weighted average',
2022             2 => 'Spot',
2023             },
2024             },
2025             0x13 => { #15/20
2026             Name => 'ISOSetting',
2027             PrintConv => {
2028             0 => 'Auto',
2029             48 => 100,
2030             56 => 200,
2031             64 => 400,
2032             72 => 800,
2033             80 => 1600,
2034             174 => '80 (Zone Matching Low)',
2035             184 => '200 (Zone Matching High)',
2036             },
2037             },
2038             0x14 => { #15/20
2039             Name => 'ZoneMatchingMode',
2040             PrintConv => {
2041             0 => 'Off',
2042             1 => 'Standard',
2043             2 => 'Advanced',
2044             },
2045             },
2046             0x15 => { #15/20
2047             Name => 'DynamicRangeOptimizer',
2048             # this and the Sony tag 0xb025 DynamicRangeOptimizer give the actual mode
2049             # applied to the image. The Minolta CameraSettingsA100 0x0027 tag gives
2050             # the setting. There is a longish list of scenarios in which, regardless
2051             # of the latter, DRO is not applied (ref 20)
2052             Notes => 'as applied to image',
2053             PrintConv => {
2054             0 => 'Off',
2055             1 => 'Standard',
2056             2 => 'Advanced',
2057             },
2058             },
2059             0x16 => { #15
2060             Name => 'ColorMode',
2061             PrintConv => {
2062             0 => 'Standard',
2063             1 => 'Vivid',
2064             2 => 'Portrait',
2065             3 => 'Landscape',
2066             4 => 'Sunset',
2067             5 => 'Night Scene',
2068             7 => 'B&W',
2069             8 => 'Adobe RGB',
2070             },
2071             },
2072             0x17 => { # 15/20
2073             Name => 'ColorSpace',
2074             PrintConv => {
2075             0 => 'sRGB',
2076             2 => 'B&W', #PH (A100)
2077             5 => 'Adobe RGB',
2078             },
2079             },
2080             0x18 => { #15
2081             Name => 'Sharpness',
2082             ValueConv => '$val - 10',
2083             ValueConvInv => '$val + 10',
2084             %Image::ExifTool::Exif::printParameter,
2085             },
2086             0x19 => { #15
2087             Name => 'Contrast',
2088             ValueConv => '$val - 10',
2089             ValueConvInv => '$val + 10',
2090             %Image::ExifTool::Exif::printParameter,
2091             },
2092             0x1a => { #15
2093             Name => 'Saturation',
2094             ValueConv => '$val - 10',
2095             ValueConvInv => '$val + 10',
2096             %Image::ExifTool::Exif::printParameter,
2097             },
2098             0x1c => { #20
2099             Name => 'FlashMetering',
2100             PrintConv => {
2101             0 => 'ADI (Advanced Distance Integration)',
2102             1 => 'Pre-flash TTL',
2103             },
2104             },
2105             0x1d => { #20
2106             Name => 'PrioritySetupShutterRelease',
2107             PrintConv => {
2108             0 => 'AF',
2109             1 => 'Release',
2110             },
2111             },
2112             0x1e => { #PH
2113             Name => 'DriveMode',
2114             PrintConv => {
2115             0 => 'Single Frame',
2116             1 => 'Continuous',
2117             2 => 'Self-timer',
2118             3 => 'Continuous Bracketing',
2119             4 => 'Single-Frame Bracketing',
2120             5 => 'White Balance Bracketing',
2121             },
2122             },
2123             0x1f => { #20
2124             Name => 'SelfTimerTime',
2125             PrintConv => {
2126             0 => '10 s',
2127             4 => '2 s',
2128             },
2129             },
2130             0x20 => { #20
2131             Name => 'ContinuousBracketing',
2132             PrintHex => 1,
2133             PrintConv => {
2134             0x303 => 'Low',
2135             0x703 => 'High',
2136             },
2137             },
2138             0x21 => { #20
2139             Name => 'SingleFrameBracketing',
2140             PrintHex => 1,
2141             PrintConv => {
2142             0x302 => 'Low',
2143             0x702 => 'High',
2144             },
2145             },
2146             0x22 => { #20
2147             Name => 'WhiteBalanceBracketing',
2148             PrintHex => 1,
2149             PrintConv => {
2150             0x08 => 'Low',
2151             0x09 => 'High',
2152             },
2153             },
2154             0x023 => { #20
2155             Name => 'WhiteBalanceSetting',
2156             PrintHex => 1,
2157             # (not sure what bit 0x8000 indicates)
2158             PrintConv => {
2159             0 => 'Auto',
2160             1 => 'Preset',
2161             2 => 'Custom',
2162             3 => 'Color Temperature/Color Filter',
2163             0x8001 => 'Preset',
2164             0x8002 => 'Custom',
2165             0x8003 => 'Color Temperature/Color Filter',
2166             },
2167             },
2168             0x24 => { #20
2169             Name => 'PresetWhiteBalance',
2170             PrintConv => {
2171             1 => 'Daylight',
2172             2 => 'Cloudy',
2173             3 => 'Shade',
2174             4 => 'Tungsten',
2175             5 => 'Fluorescent',
2176             6 => 'Flash',
2177             },
2178             },
2179             0x25 => { #20
2180             Name => 'ColorTemperatureSetting',
2181             PrintConv => {
2182             0 => 'Temperature',
2183             2 => 'Color Filter',
2184             },
2185             },
2186             0x26 => { #20
2187             Name => 'CustomWBSetting',
2188             PrintConv => {
2189             0 => 'Setup',
2190             1 => 'Recall',
2191             },
2192             },
2193             0x27 => { #20
2194             Name => 'DynamicRangeOptimizerSetting',
2195             Notes => 'as set in camera',
2196             PrintConv => {
2197             0 => 'Off',
2198             1 => 'Standard',
2199             2 => 'Advanced',
2200             },
2201             },
2202             0x32 => 'FreeMemoryCardImages', #20
2203             0x34 => 'CustomWBRedLevel', #20
2204             0x35 => 'CustomWBGreenLevel', #20
2205             0x36 => 'CustomWBBlueLevel', #20
2206             0x37 => { #20
2207             Name => 'CustomWBError',
2208             PrintConv => {
2209             0 => 'OK',
2210             1 => 'Error',
2211             },
2212             },
2213             0x38 => { #20
2214             Name => 'WhiteBalanceFineTune',
2215             Format => 'int16s',
2216             },
2217             0x39 => { #20
2218             Name => 'ColorTemperature',
2219             ValueConv => '$val * 100',
2220             ValueConvInv => '$val / 100',
2221             },
2222             0x3a => { #20
2223             Name => 'ColorCompensationFilter',
2224             Format => 'int16s',
2225             Notes => 'ranges from -2 for green to +2 for magenta',
2226             },
2227             0x3b => { #20
2228             Name => 'SonyImageSize',
2229             PrintConv => {
2230             0 => 'Standard',
2231             1 => 'Medium',
2232             2 => 'Small',
2233             },
2234             },
2235             0x3c => { #20
2236             Name => 'SonyQuality',
2237             PrintConv => {
2238             0 => 'RAW',
2239             32 => 'Fine',
2240             34 => 'RAW + JPEG',
2241             48 => 'Standard',
2242             },
2243             },
2244             0x3d => { #20
2245             Name => 'InstantPlaybackTime',
2246             PrintConv => '"$val s"',
2247             PrintConvInv => '$val=~s/\s*s//; $val',
2248             },
2249             0x3e => { #20
2250             Name => 'InstantPlaybackSetup',
2251             PrintConv => {
2252             0 => 'Image and Information',
2253             1 => 'Image Only',
2254             # 2 appears to be unused
2255             3 => 'Image and Histogram',
2256             },
2257             },
2258             0x3f => { #PH
2259             Name => 'NoiseReduction',
2260             PrintConv => \%offOn,
2261             },
2262             0x40 => { #20
2263             Name => 'EyeStartAF',
2264             PrintConv => \%onOff,
2265             },
2266             0x41 => { #20
2267             Name => 'RedEyeReduction',
2268             PrintConv => \%offOn,
2269             },
2270             0x42 => { #20
2271             Name => 'FlashDefault',
2272             PrintConv => {
2273             0 => 'Auto',
2274             1 => 'Fill Flash',
2275             },
2276             },
2277             0x43 => { #20
2278             Name => 'AutoBracketOrder',
2279             PrintConv => {
2280             0 => '0 - +',
2281             1 => '- 0 +',
2282             },
2283             },
2284             0x44 => { #20
2285             Name => 'FocusHoldButton',
2286             PrintConv => {
2287             0 => 'Focus Hold',
2288             1 => 'DOF Preview',
2289             },
2290             },
2291             0x45 => { #20
2292             Name => 'AELButton',
2293             PrintConv => {
2294             0 => 'Hold',
2295             1 => 'Toggle',
2296             2 => 'Spot Hold',
2297             3 => 'Spot Toggle',
2298             },
2299             },
2300             0x46 => { #20
2301             Name => 'ControlDialSet',
2302             PrintConv => {
2303             0 => 'Shutter Speed',
2304             1 => 'Aperture',
2305             },
2306             },
2307             0x47 => { #20
2308             Name => 'ExposureCompensationMode',
2309             PrintConv => {
2310             0 => 'Ambient and Flash',
2311             1 => 'Ambient Only',
2312             },
2313             },
2314             0x48 => { #20
2315             Name => 'AFAssist',
2316             PrintConv => \%onOff,
2317             },
2318             0x49 => { #20
2319             Name => 'CardShutterLock',
2320             PrintConv => \%onOff,
2321             },
2322             0x4a => { #20
2323             Name => 'LensShutterLock',
2324             PrintConv => \%onOff,
2325             },
2326             0x4b => { #20
2327             Name => 'AFAreaIllumination',
2328             PrintConv => {
2329             0 => '0.3 s',
2330             1 => '0.6 s',
2331             2 => 'Off',
2332             },
2333             },
2334             0x4c => { #20
2335             Name => 'MonitorDisplayOff',
2336             PrintConv => {
2337             0 => 'Automatic',
2338             1 => 'Manual',
2339             },
2340             },
2341             0x4d => { #20
2342             Name => 'RecordDisplay',
2343             PrintConv => {
2344             0 => 'Auto Rotate',
2345             1 => 'Horizontal',
2346             },
2347             },
2348             0x4e => { #20
2349             Name => 'PlayDisplay',
2350             PrintConv => {
2351             0 => 'Auto Rotate',
2352             1 => 'Manual Rotate',
2353             },
2354             },
2355             0x50 => { #20
2356             Name => 'ExposureIndicator',
2357             SeparateTable => 'ExposureIndicator',
2358             PrintConv => \%exposureIndicator,
2359             },
2360             0x51 => { #20
2361             Name => 'AELExposureIndicator',
2362             Notes => 'also indicates exposure for next shot when bracketing',
2363             SeparateTable => 'ExposureIndicator',
2364             PrintConv => \%exposureIndicator,
2365             },
2366             0x52 => { #20
2367             Name => 'ExposureBracketingIndicatorLast',
2368             Notes => 'indicator for last shot when bracketing',
2369             SeparateTable => 'ExposureIndicator',
2370             PrintConv => \%exposureIndicator,
2371             },
2372             0x53 => { #20
2373             Name => 'MeteringOffScaleIndicator',
2374             Notes => 'two flashing triangles when under or over metering scale',
2375             PrintConv => {
2376             0 => 'Within Range',
2377             1 => 'Under/Over Range',
2378             255 => 'Out of Range',
2379             },
2380             },
2381             0x54 => { #20
2382             Name => 'FlashExposureIndicator',
2383             SeparateTable => 'ExposureIndicator',
2384             PrintConv => \%exposureIndicator,
2385             },
2386             0x55 => { #20
2387             Name => 'FlashExposureIndicatorNext',
2388             Notes => 'indicator for next shot when bracketing',
2389             SeparateTable => 'ExposureIndicator',
2390             PrintConv => \%exposureIndicator,
2391             },
2392             0x56 => { #20
2393             Name => 'FlashExposureIndicatorLast',
2394             Notes => 'indicator for last shot when bracketing',
2395             SeparateTable => 'ExposureIndicator',
2396             PrintConv => \%exposureIndicator,
2397             },
2398             0x58 => { #20
2399             Name => 'FocusModeSwitch',
2400             PrintConv => {
2401             0 => 'AF',
2402             1 => 'MF',
2403             },
2404             },
2405             0x59 => { #20
2406             Name => 'FlashType',
2407             PrintConv => {
2408             0 => 'Off',
2409             1 => 'Built-in', # (also when built-in flash is a trigger in wireless mode)
2410             2 => 'External',
2411             },
2412             },
2413             0x5a => { #15
2414             Name => 'Rotation',
2415             PrintConv => {
2416             0 => 'Horizontal (normal)',
2417             1 => 'Rotate 270 CW',
2418             2 => 'Rotate 90 CW',
2419             },
2420             },
2421             0x5b => { #20
2422             Name => 'AELock',
2423             PrintConv => \%offOn,
2424             },
2425             0x57 => { #15
2426             Name => 'ImageStabilization',
2427             PrintConv => \%offOn,
2428             },
2429             0x5e => { #15
2430             Name => 'ColorTemperature',
2431             ValueConv => '$val * 100',
2432             ValueConvInv => '$val / 100',
2433             },
2434             0x5f => { #20
2435             Name => 'ColorCompensationFilter',
2436             Format => 'int16s',
2437             Notes => 'ranges from -2 for green to +2 for magenta',
2438             },
2439             0x60 => { #20
2440             Name => 'BatteryState',
2441             PrintConv => {
2442             3 => 'Very Low',
2443             4 => 'Low',
2444             5 => 'Half Full',
2445             6 => 'Sufficient Power Remaining',
2446             },
2447             },
2448             );
2449              
2450             # white balance information stored by the Sony DSLR-A100 (ref 20)
2451             %Image::ExifTool::Minolta::WBInfoA100 = (
2452             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2453             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
2454             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
2455             NOTES => 'White balance information for the Sony DSLR-A100.',
2456             WRITABLE => 1,
2457             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2458             FIRST_ENTRY => 0,
2459             PRIORITY => 0,
2460             0x0e => {
2461             Name => 'DriveMode',
2462             PrintConv => {
2463             0 => 'Self-timer 10 sec',
2464             1 => 'Continuous',
2465             2 => 'Single-frame Exposure Bracketing',
2466             3 => 'Continuous Exposure Bracketing',
2467             4 => 'Self-Timer 2 sec',
2468             5 => 'Single Frame',
2469             8 => 'White Balance Bracketing Low',
2470             9 => 'White Balance Bracketing High',
2471             },
2472             },
2473             0x10 => {
2474             Name => 'Rotation',
2475             PrintConv => {
2476             0 => 'Horizontal (normal)',
2477             1 => 'Rotate 270 CW',
2478             2 => 'Rotate 90 CW',
2479             },
2480             },
2481             0x14 => {
2482             Name => 'ImageStabilizationSetting',
2483             PrintConv => { 0 => 'Off', 1 => 'On' },
2484             },
2485             0x15 => {
2486             Name => 'DynamicRangeOptimizerMode',
2487             PrintConv => {
2488             0 => 'Off',
2489             1 => 'Standard',
2490             2 => 'Advanced',
2491             },
2492             },
2493             0x2a => {
2494             Name => 'ExposureCompensationMode',
2495             PrintConv => {
2496             0 => 'Ambient and Flash',
2497             1 => 'Ambient Only',
2498             },
2499             },
2500             0x2b => 'WBBracketShotNumber',
2501             0x2c => {
2502             Name => 'WhiteBalanceBracketing',
2503             PrintConv => {
2504             0 => 'Off',
2505             1 => 'Low',
2506             2 => 'High',
2507             },
2508             },
2509             0x2d => 'ExposureBracketShotNumber',
2510             0x31 => {
2511             Name => 'FlashFunction',
2512             Format => 'int16u',
2513             PrintHex => 1,
2514             PrintConv => {
2515             0x0000 => 'No flash',
2516             0x0300 => 'Built-in flash',
2517             # (the following refers to an external flash)
2518             0x1205 => 'Manual',
2519             0x120e => 'Strobe',
2520             #0x122e => ?
2521             0x128e => 'Fill flash, Pre-flash TTL',
2522             0x12ae => 'Bounce flash',
2523             0x140e => 'Rear sync, ADI',
2524             0x148e => 'Fill flash, ADI',
2525             0x1580 => 'Wireless',
2526             # 0x17ae => ?
2527             0x178e => 'HSS',
2528             },
2529             },
2530             0x34 => {
2531             Name => 'ExposureMode',
2532             Format => 'int16u',
2533             PrintHex => 1,
2534             PrintConvColumns => 2,
2535             PrintConv => {
2536             0x0000 => 'Program',
2537             0x0001 => 'Aperture Priority',
2538             0x0002 => 'Shutter Priority',
2539             0x0003 => 'Manual',
2540             0x0004 => 'Auto',
2541             0x0005 => 'Program Shift A',
2542             0x0006 => 'Program Shift S',
2543             0x1013 => 'Portrait',
2544             0x1023 => 'Sports',
2545             0x1033 => 'Sunset',
2546             0x1043 => 'Night View/Portrait',
2547             0x1053 => 'Landscape',
2548             0x1083 => 'Macro',
2549             },
2550             },
2551             0x36 => {
2552             Name => 'ColorMode',
2553             Format => 'int16u',
2554             PrintConv => {
2555             0x00 => 'Standard',
2556             0x01 => 'Vivid',
2557             0x02 => 'Portrait',
2558             0x03 => 'Landscape',
2559             0x04 => 'Sunset',
2560             0x05 => 'Night View',
2561             0x07 => 'B&W',
2562             0x08 => 'Adobe RGB',
2563             },
2564             },
2565             0x38 => {
2566             Name => 'AverageLV',
2567             Format => 'int16u',
2568             Notes => 'arithmetic mean of the readings from the 40 honeycomb segments',
2569             ValueConv => '($val-106)/8',
2570             ValueConvInv => '$val * 8 + 106',
2571             },
2572             # 0x3a - int16u: Approx FocusDistance in metres (0x0f50=inf)
2573             0x3c => {
2574             Name => 'FrameNumber',
2575             # Numbers > 1 appear in continuous and continuous bracketing drive modes,
2576             # as well as WB bracketing.
2577             },
2578             0x96 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
2579             0xae => { Name => 'WB_GBRGLevels', Format => 'int16u[4]' },
2580             0xc0 => {
2581             Name => 'WB_RedLevelsTungsten',
2582             Notes => '7 values for adjustments of -3 through +3',
2583             Format => 'int16u[7]',
2584             },
2585             0xce => { Name => 'WB_BlueLevelsTungsten', Format => 'int16u[7]' },
2586             0xdc => { Name => 'WB_RedLevelsDaylight', Format => 'int16u[7]' },
2587             0xea => { Name => 'WB_BlueLevelsDaylight', Format => 'int16u[7]' },
2588             0xf8 => { Name => 'WB_RedLevelsCloudy', Format => 'int16u[7]' },
2589             0x106 => { Name => 'WB_BlueLevelsCloudy', Format => 'int16u[7]' },
2590             0x114 => { Name => 'WB_RedLevelsFlash', Format => 'int16u[7]' },
2591             0x122 => { Name => 'WB_BlueLevelsFlash', Format => 'int16u[7]' },
2592             0x14c => {
2593             Name => 'WB_RedLevelsFluorescent',
2594             Format => 'int16u[7]',
2595             Notes => q{
2596             white balance red presets for fluorescent -2 through +4: -2=Fluorescent,
2597             -1=WhiteFluorescent, 0=CoolWhiteFluorescent, +1=DayWhiteFluorescent and
2598             +3=DaylightFluorescent
2599             },
2600             },
2601             0x15a => { Name => 'WB_BlueLevelsFluorescent', Format => 'int16u[7]' },
2602             0x168 => { Name => 'WB_RedLevelsShade', Format => 'int16u[7]' },
2603             0x176 => { Name => 'WB_BlueLevelsShade', Format => 'int16u[7]' },
2604             0x188 => { Name => 'WB_RedLevel6500K', Format => 'int16u' },
2605             0x18a => { Name => 'WB_BlueLevel6500K', Format => 'int16u' },
2606             0x18c => { Name => 'WB_RedLevelCustom', Format => 'int16u' },
2607             0x18e => { Name => 'WB_BlueLevelCustom', Format => 'int16u' },
2608             0x198 => { Name => 'WB_RedLevel3500K', Format => 'int16u' },
2609             0x19a => { Name => 'WB_BlueLevel3500K', Format => 'int16u' },
2610             0x1be => {
2611             Name => 'WB_RedLevelsKelvin',
2612             Format => 'int16u[75]',
2613             Notes => 'values for 2500-9900 K, in increments of 100 K',
2614             },
2615             0x254 => { Name => 'WB_BlueLevelsKelvin', Format => 'int16u[75]' },
2616             0x304 => { Name => 'WB_RBLevelsFlash', Format => 'int16u[2]' },
2617             0x308 => { Name => 'WB_RBLevelsCoolWhiteF', Format => 'int16u[2]' },
2618             0x3e8 => { Name => 'WB_RBLevelsTungsten', Format => 'int16u[2]' },
2619             0x3ec => { Name => 'WB_RBLevelsDaylight', Format => 'int16u[2]' },
2620             0x3f0 => { Name => 'WB_RBLevelsCloudy', Format => 'int16u[2]' },
2621             0x3f4 => { Name => 'WB_RBLevelsFlash', Format => 'int16u[2]' },
2622             0x3fc => { Name => 'WB_RedLevelsFluorescent', Format => 'int16u[7]' },
2623             0x40a => { Name => 'WB_BlueLevelsFluorescent', Format => 'int16u[7]' },
2624             0x418 => { Name => 'WB_RBLevelsShade', Format => 'int16u[2]' },
2625             0x420 => { Name => 'WB_RBLevels6500K', Format => 'int16u[2]' },
2626             0x424 => { Name => 'WB_RBLevelsCustom', Format => 'int16u[2]' },
2627             0x430 => { Name => 'WB_RBLevels3500K', Format => 'int16u[2]' },
2628             0x528 => { Name => 'WB_RBLevelsDaylight', Format => 'int16u[2]' },
2629             0x546 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
2630             0x628 => {
2631             Name => 'AEMeteringSegments',
2632             Format => 'int8u[40]',
2633             Notes => q{
2634             metering values from the 40 honeycomb segments, converted to LV. The first
2635             value is for the outer cell, then the values are given row by row, from top
2636             to bottom, with each row scanned left-to-right. The 21st value is the
2637             middle cell, which gives the spot metering
2638             },
2639             ValueConv => sub { join ' ', map( { ($_ - 106) / 8 } split(' ',$_[0]) ) },
2640             ValueConvInv => sub { join ' ', map( { int($_ * 8 + 106.5) } split(' ',$_[0]) ) },
2641             },
2642             0x690 => {
2643             Name => 'MeasuredLV',
2644             Notes => 'measured light value based on MeteringMode',
2645             ValueConv => '($val-106)/8',
2646             ValueConvInv => '$val * 8 + 106',
2647             },
2648             0x691 => {
2649             Name => 'BrightnessValue',
2650             ValueConv => '($val-106)/8',
2651             ValueConvInv => '$val * 8 + 106',
2652             },
2653             # 0x87f - int8u: 33mm Equivalent magnification (FocusDistance = (1.5 * $val + 1) * FocalLength) (255=inf)
2654             0x104c => { # (9600 bytes: 4 sets of 40x30 int16u values in the range 0-8191)
2655             Name => 'TiffMeteringImage',
2656             Format => 'undef[9600]',
2657             Notes => q{
2658             13-bit RBGG (?) 40x30 pixels, presumably metering info, converted to a 16-bit
2659             TIFF image;
2660             },
2661             ValueConv => sub {
2662             my ($val, $et) = @_;
2663             return undef unless length $val >= 9600;
2664             return \ "Binary data 7404 bytes" unless $et->Options('Binary');
2665             my @dat = unpack('n*', $val); # for Big-endian
2666             # TIFF header for a 16-bit RGB 10dpi 40x30 image
2667             $val = Image::ExifTool::MakeTiffHeader(40,30,3,16,10);
2668             # re-order data to RGB pixels
2669             my ($i, @val);
2670             for ($i=0; $i<40*30; ++$i) {
2671             # data is 13-bit (max 8191), shift left to fill 16 bits
2672             # (typically, this gives a very dark image since the data should
2673             # really be anti-logged to convert from EV to perceived brightness)
2674             # push @val, $dat[$i]<<3, $dat[$i+2400]<<3, $dat[$i+1200]<<3;
2675             push @val, int(5041.1*log($dat[$i]+1)/log(2)), int(5041.1*log($dat[$i+2400]+1)/log(2)), int(5041.1*log($dat[$i+1200]+1)/log(2));
2676             }
2677             $val .= pack('v*', @val); # add TIFF strip data
2678             return \$val;
2679             },
2680             },
2681             0x49b8 => {
2682             Name => 'ExposureTime',
2683             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
2684             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
2685             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
2686             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
2687             },
2688             0x49ba => {
2689             Name => 'ISO',
2690             ValueConv => '2 ** (($val-48)/8) * 100',
2691             ValueConvInv => '48 + 8*log($val/100)/log(2)',
2692             PrintConv => 'int($val + 0.5)',
2693             PrintConvInv => '$val',
2694             },
2695             0x49bb => { # (https://exiftool.org/forum/index.php/topic,3688.0.html)
2696             # if this value is the 35mm equivalent magnification, then the formula could
2697             # be (1.5 * 2**($val/16-5)+1) * FocalLength, but this tends to underestimate
2698             # distance by about 18% (ref 20) (255=inf)
2699             Name => 'FocusDistance',
2700             ValueConv => '2**(($val-126)/16)',
2701             ValueConvInv => 'log($val)/log(2)*16+126',
2702             PrintConv => '$val > 266 ? "inf" : sprintf("%.2f m", $val)',
2703             PrintConvInv => '$val=~s/ ?m//; $val=~/inf/i ? 267 : $val',
2704             },
2705             0x49bd => {
2706             Name => 'LensType',
2707             Format => 'int16uRev',
2708             SeparateTable => 1,
2709             ValueConvInv => 'int($val)', # (must truncate decimal part)
2710             PrintConv => \%minoltaLensTypes,
2711             PrintInt => 1,
2712             },
2713             0x49c0 => {
2714             Name => 'ExposureCompensation', # (in exposure bracketing, this is the actual value used)
2715             Format => 'int8s',
2716             ValueConv => '$val / 8',
2717             ValueConvInv => '$val * 8',
2718             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2719             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2720             },
2721             0x49c1 => {
2722             Name => 'FlashExposureComp',
2723             Description => 'Flash Exposure Compensation',
2724             Format => 'int8s',
2725             ValueConv => '$val / 8',
2726             ValueConvInv => '$val * 8',
2727             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2728             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2729             },
2730             0x49c2 => {
2731             Name => 'ImageStabilization',
2732             PrintConv => \%offOn,
2733             },
2734             0x49c3 => {
2735             Name => 'BrightnessValue',
2736             ValueConv => '($val-106)/8',
2737             ValueConvInv => '$val * 8 + 106',
2738             },
2739             0x49c5 => {
2740             Name => 'MaxAperture',
2741             ValueConv => '2 ** (($val-8)/16)',
2742             ValueConvInv => '8 + 16*log($val)/log(2)',
2743             PrintConv => 'sprintf("%.1f",$val)',
2744             PrintConvInv => '$val',
2745             },
2746             # 0x49c6 - gives focal length using same formula as 0x49bb
2747             0x49c7 => {
2748             Name => 'FNumber',
2749             ValueConv => '2 ** (($val-8)/16)',
2750             ValueConvInv => '8 + 16*log($val)/log(2)',
2751             PrintConv => 'sprintf("%.1f",$val)',
2752             PrintConvInv => '$val',
2753             },
2754             0x49dc => {
2755             Name => 'InternalSerialNumber',
2756             Format => 'string[12]',
2757             },
2758             );
2759              
2760             # tags in Konica Minolta MOV videos (ref PH)
2761             # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
2762             %Image::ExifTool::Minolta::MOV1 = (
2763             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2764             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2765             FIRST_ENTRY => 0,
2766             NOTES => q{
2767             This information is found in MOV videos from some Konica Minolta models such
2768             as the DiMage Z10 and X50.
2769             },
2770             0 => {
2771             Name => 'Make',
2772             Format => 'string[32]',
2773             },
2774             0x20 => {
2775             Name => 'ModelType',
2776             Format => 'string[8]',
2777             },
2778             # (01 00 at offset 0x28)
2779             0x2e => {
2780             Name => 'ExposureTime',
2781             Format => 'int32u',
2782             ValueConv => '$val ? 10 / $val : 0',
2783             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2784             },
2785             0x32 => {
2786             Name => 'FNumber',
2787             Format => 'rational64u',
2788             PrintConv => 'sprintf("%.1f",$val)',
2789             },
2790             0x3a => {
2791             Name => 'ExposureCompensation',
2792             Format => 'rational64s',
2793             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
2794             },
2795             # 0x4c => 'WhiteBalance', ?
2796             0x50 => {
2797             Name => 'FocalLength',
2798             Format => 'rational64u',
2799             PrintConv => 'sprintf("%.1f mm",$val)',
2800             },
2801             );
2802              
2803             # tags in Minolta MOV videos (ref PH)
2804             # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
2805             %Image::ExifTool::Minolta::MOV2 = (
2806             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2807             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2808             FIRST_ENTRY => 0,
2809             NOTES => q{
2810             This information is found in MOV videos from some Minolta models such as the
2811             DiMAGE X and Xt.
2812             },
2813             0 => {
2814             Name => 'Make',
2815             Format => 'string[32]',
2816             },
2817             0x18 => {
2818             Name => 'ModelType',
2819             Format => 'string[8]',
2820             },
2821             # (01 00 at offset 0x20)
2822             0x26 => {
2823             Name => 'ExposureTime',
2824             Format => 'int32u',
2825             ValueConv => '$val ? 10 / $val : 0',
2826             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2827             },
2828             0x2a => {
2829             Name => 'FNumber',
2830             Format => 'rational64u',
2831             PrintConv => 'sprintf("%.1f",$val)',
2832             },
2833             0x32 => {
2834             Name => 'ExposureCompensation',
2835             Format => 'rational64s',
2836             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
2837             },
2838             # 0x44 => 'WhiteBalance', ?
2839             0x48 => {
2840             Name => 'FocalLength',
2841             Format => 'rational64u',
2842             PrintConv => 'sprintf("%.1f mm",$val)',
2843             },
2844             );
2845              
2846             # more tags in Minolta MOV videos (ref PH)
2847             %Image::ExifTool::Minolta::MMA = (
2848             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2849             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2850             NOTES => q{
2851             This information is found in MOV videos from Minolta models such as the
2852             DiMAGE A2, S414 and 7Hi.
2853             },
2854             0 => {
2855             Name => 'Make',
2856             Format => 'string[20]',
2857             },
2858             20 => {
2859             Name => 'SoftwareVersion',
2860             Format => 'string[16]',
2861             },
2862             );
2863              
2864             # basic Minolta white balance lookup
2865             my %minoltaWhiteBalance = (
2866             0 => 'Auto',
2867             1 => 'Daylight',
2868             2 => 'Cloudy',
2869             3 => 'Tungsten',
2870             5 => 'Custom',
2871             7 => 'Fluorescent',
2872             8 => 'Fluorescent 2',
2873             11 => 'Custom 2',
2874             12 => 'Custom 3',
2875             # the following come from tests with the A2 (ref 2)
2876             0x0800000 => 'Auto',
2877             0x1800000 => 'Daylight',
2878             0x2800000 => 'Cloudy',
2879             0x3800000 => 'Tungsten',
2880             0x4800000 => 'Flash',
2881             0x5800000 => 'Fluorescent',
2882             0x6800000 => 'Shade',
2883             0x7800000 => 'Custom1',
2884             0x8800000 => 'Custom2',
2885             0x9800000 => 'Custom3',
2886             );
2887              
2888             #------------------------------------------------------------------------------
2889             # PrintConv for Minolta white balance
2890             sub ConvertWhiteBalance($)
2891             {
2892 3     3 0 9 my $val = shift;
2893 3         12 my $printConv = $minoltaWhiteBalance{$val};
2894 3 50       12 unless (defined $printConv) {
2895 0 0       0 if ($val & 0xffff0000) {
2896             # the A2 values can be shifted by +- 3 settings, where
2897             # each setting adds or subtracts 0x0010000 (ref 2)
2898 0         0 my $type = ($val & 0xff000000) + 0x800000;
2899 0 0       0 if ($minoltaWhiteBalance{$type}) {
2900 0         0 $printConv = $minoltaWhiteBalance{$type} .
2901             sprintf("%+.8g", ($val - $type) / 0x10000);
2902             } else {
2903 0         0 $printConv = sprintf("Unknown (0x%x)", $val);
2904             }
2905             } else {
2906 0         0 $printConv = sprintf("Unknown ($val)");
2907             }
2908             }
2909 3         27 return $printConv;
2910             }
2911              
2912             1; # end
2913              
2914             __END__