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   4901 use strict;
  28         108  
  28         1166  
47 28         2947 use vars qw($VERSION %minoltaLensTypes %minoltaTeleconverters %minoltaColorMode
48 28     28   179 %sonyColorMode %minoltaSceneMode %afStatusInfo %metabonesID);
  28         68  
49 28     28   198 use Image::ExifTool qw(:DataAccess :Utils);
  28         76  
  28         5824  
50 28     28   1537 use Image::ExifTool::Exif;
  28         137  
  28         148030  
51              
52             $VERSION = '2.88';
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             100 => 'Neutral', #JD
607             101 => 'Clear', #JD
608             102 => 'Deep', #JD
609             103 => 'Light', #JD
610             104 => 'Night View', #JD
611             105 => 'Autumn Leaves', #JD
612             255 => 'Off', #JR (new for ILCE-7SM3, July 2020)
613             0xffffffff => 'n/a', #PH
614             );
615              
616             %minoltaSceneMode = (
617             0 => 'Standard',
618             1 => 'Portrait',
619             2 => 'Text',
620             3 => 'Night Scene',
621             4 => 'Sunset',
622             5 => 'Sports',
623             6 => 'Landscape',
624             7 => 'Night Portrait', #JD
625             8 => 'Macro',
626             9 => 'Super Macro',
627             16 => 'Auto', # (RX100 'Intelligent Auto' - PH)
628             17 => 'Night View/Portrait',
629             18 => 'Sweep Panorama', #PH (SLT-A55V)
630             19 => 'Handheld Night Shot', #PH
631             20 => 'Anti Motion Blur', #PH
632             21 => 'Cont. Priority AE', #PH
633             22 => 'Auto+',
634             23 => '3D Sweep Panorama', #PH (SLT-A55V)
635             24 => 'Superior Auto', #28
636             25 => 'High Sensitivity', #28
637             26 => 'Fireworks', #28
638             27 => 'Food', #28
639             28 => 'Pet', #28
640             33 => 'HDR', #JR
641             0xffff => 'n/a', #PH
642             );
643              
644             # tag information for AFStatus tags (ref 20)
645             %afStatusInfo = (
646             Format => 'int16s',
647             # 0=in focus, -32768=out of focus, -ve=front focus, +ve=back focus
648             PrintConvColumns => 2,
649             PrintConv => {
650             0 => 'In Focus',
651             -32768 => 'Out of Focus',
652             OTHER => sub {
653             my ($val, $inv) = @_;
654             $inv and $val =~ /([-+]?\d+)/, return $1;
655             return $val < 0 ? "Front Focus ($val)" : "Back Focus (+$val)";
656             },
657             },
658             );
659              
660             my %exposureIndicator = (
661             0 => 'Not Indicated',
662             1 => 'Under Scale',
663             119 => 'Bottom of Scale',
664             120 => '-2.0',
665             121 => '-1.7',
666             122 => '-1.5',
667             123 => '-1.3',
668             124 => '-1.0',
669             125 => '-0.7',
670             126 => '-0.5',
671             127 => '-0.3',
672             128 => '0',
673             129 => '+0.3',
674             130 => '+0.5',
675             131 => '+0.7',
676             132 => '+1.0',
677             133 => '+1.3',
678             134 => '+1.5',
679             135 => '+1.7',
680             136 => '+2.0',
681             253 => 'Top of Scale',
682             254 => 'Over Scale',
683             );
684              
685             my %onOff = ( 0 => 'On', 1 => 'Off' );
686             my %offOn = ( 0 => 'Off', 1 => 'On' );
687              
688             # Minolta tag table
689             %Image::ExifTool::Minolta::Main = (
690             WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
691             CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
692             WRITABLE => 1,
693             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
694             0x0000 => {
695             Name => 'MakerNoteVersion',
696             Writable => 'undef',
697             Count => 4,
698             },
699             0x0001 => {
700             Name => 'MinoltaCameraSettingsOld',
701             SubDirectory => {
702             TagTable => 'Image::ExifTool::Minolta::CameraSettings',
703             ByteOrder => 'BigEndian',
704             },
705             },
706             0x0003 => {
707             Name => 'MinoltaCameraSettings',
708             # These camera settings are different for the DiMAGE X31
709             Condition => '$self->{Model} ne "DiMAGE X31"',
710             SubDirectory => {
711             TagTable => 'Image::ExifTool::Minolta::CameraSettings',
712             ByteOrder => 'BigEndian',
713             },
714             },
715             0x0004 => { #8
716             Name => 'MinoltaCameraSettings7D',
717             SubDirectory => {
718             TagTable => 'Image::ExifTool::Minolta::CameraSettings7D',
719             ByteOrder => 'BigEndian',
720             },
721             },
722             0x0010 => { #20 (count: 256)
723             Name => 'CameraInfoA100',
724             Condition => '$$self{Model} eq "DSLR-A100"',
725             SubDirectory => {
726             TagTable => 'Image::ExifTool::Minolta::CameraInfoA100',
727             ByteOrder => 'LittleEndian',
728             },
729             },
730             # it appears that image stabilization is on if this tag exists (ref 2),
731             # but it is an 8kB binary data block!
732             0x0018 => [
733             {
734             Name => 'ISInfoA100',
735             Condition => '$self->{Model} eq "DSLR-A100"',
736             SubDirectory => {
737             TagTable => 'Image::ExifTool::Minolta::ISInfoA100',
738             ByteOrder => 'BigEndian',
739             },
740             },{
741             Name => 'ImageStabilization',
742             Condition => '$self->{Model} =~ /^DiMAGE (A1|A2|X1)$/',
743             Notes => q{
744             a block of binary data which exists in DiMAGE A2 (and A1/X1?) images only if
745             image stabilization is enabled
746             },
747             ValueConv => '"On"',
748             },
749             ],
750             0x0020 => {
751             Name => 'WBInfoA100',
752             Condition => '$$self{Model} eq "DSLR-A100"',
753             Notes => 'currently decoded only for the Sony A100',
754             SubDirectory => {
755             TagTable => 'Image::ExifTool::Minolta::WBInfoA100',
756             ByteOrder => 'BigEndian',
757             },
758             },
759             0x0040 => {
760             Name => 'CompressedImageSize',
761             Writable => 'int32u',
762             },
763             0x0081 => {
764             # JPEG preview found in DiMAGE 7 images
765             %Image::ExifTool::previewImageTagInfo,
766             Groups => { 2 => 'Preview' },
767             Permanent => 1, # don't add this to a file
768             },
769             0x0088 => {
770             Name => 'PreviewImageStart',
771             Flags => 'IsOffset',
772             OffsetPair => 0x0089, # point to associated byte count
773             DataTag => 'PreviewImage',
774             Writable => 'int32u',
775             WriteGroup => 'MakerNotes',
776             Protected => 2,
777             # Note: Sony also uses this tag in A100 ARW images, but it points
778             # to the same data as JpgFromRaw
779             },
780             0x0089 => {
781             Name => 'PreviewImageLength',
782             OffsetPair => 0x0088, # point to associated offset
783             DataTag => 'PreviewImage',
784             Writable => 'int32u',
785             WriteGroup => 'MakerNotes',
786             Protected => 2,
787             },
788             0x0100 => { #10
789             Name => 'SceneMode',
790             Writable => 'int32u',
791             PrintConv => \%minoltaSceneMode,
792             },
793             0x0101 => [
794             {
795             Name => 'ColorMode',
796             Condition => '$self->{Make} !~ /^SONY/',
797             Priority => 0, # Other ColorMode is more reliable for A2
798             Writable => 'int32u',
799             PrintConv => \%minoltaColorMode,
800             },
801             { #15
802             Name => 'ColorMode',
803             Writable => 'int32u',
804             Notes => 'Sony models',
805             PrintConv => \%sonyColorMode,
806             },
807             ],
808             0x0102 => {
809             Name => 'MinoltaQuality',
810             Writable => 'int32u',
811             # PrintConv strings conform with Minolta reference manual (ref NJ)
812             # (note that Minolta calls an uncompressed TIFF image "Super fine")
813             PrintConv => {
814             0 => 'Raw',
815             1 => 'Super Fine',
816             2 => 'Fine',
817             3 => 'Standard',
818             4 => 'Economy',
819             5 => 'Extra fine',
820             },
821             },
822             # (0x0103 is the same as 0x0102 above) -- this is true for some
823             # cameras (A2/7Hi), but not others - PH
824             0x0103 => [
825             {
826             Name => 'MinoltaQuality',
827             Writable => 'int32u',
828             Condition => '$self->{Model} =~ /^DiMAGE (A2|7Hi)$/',
829             Notes => 'quality for DiMAGE A2/7Hi',
830             Priority => 0, # lower priority because this doesn't work for A200
831             PrintConv => { #NJ
832             0 => 'Raw',
833             1 => 'Super Fine',
834             2 => 'Fine',
835             3 => 'Standard',
836             4 => 'Economy',
837             5 => 'Extra fine',
838             },
839             },
840             { #PH
841             Name => 'MinoltaImageSize',
842             Writable => 'int32u',
843             Condition => '$self->{Model} !~ /^DiMAGE A200$/',
844             Notes => 'image size for other models except A200',
845             PrintConv => {
846             1 => '1600x1200',
847             2 => '1280x960',
848             3 => '640x480',
849             5 => '2560x1920',
850             6 => '2272x1704',
851             7 => '2048x1536',
852             },
853             },
854             ],
855             0x0104 => { #14
856             Name => 'FlashExposureComp',
857             Description => 'Flash Exposure Compensation',
858             Writable => 'rational64s',
859             },
860             0x0105 => { #10
861             Name => 'Teleconverter',
862             Writable => 'int32u',
863             PrintHex => 1,
864             PrintConv => \%minoltaTeleconverters,
865             },
866             0x0107 => { #8
867             Name => 'ImageStabilization',
868             Writable => 'int32u',
869             PrintConv => {
870             1 => 'Off',
871             5 => 'On',
872             },
873             },
874             0x0109 => { #20
875             Name => 'RawAndJpgRecording',
876             Writable => 'int32u',
877             PrintConv => \%offOn,
878             },
879             0x010a => {
880             Name => 'ZoneMatching',
881             Writable => 'int32u',
882             PrintConv => {
883             0 => 'ISO Setting Used',
884             1 => 'High Key',
885             2 => 'Low Key',
886             },
887             },
888             0x010b => {
889             Name => 'ColorTemperature',
890             Writable => 'int32u',
891             },
892             0x010c => { #3 (Alpha 7)
893             Name => 'LensType',
894             Writable => 'int32u',
895             SeparateTable => 1,
896             ValueConvInv => 'int($val)', # (must truncate decimal part)
897             PrintConv => \%minoltaLensTypes,
898             PrintInt => 1,
899             },
900             # 0x010e - WhiteBalance according to ref #10
901             0x0111 => { #20
902             Name => 'ColorCompensationFilter',
903             Writable => 'int32s',
904             Notes => 'ranges from -2 for green to +2 for magenta',
905             },
906             0x0112 => { #PH (from Sony tags, NC)
907             Name => 'WhiteBalanceFineTune',
908             Format => 'int32s',
909             Writable => 'int32u',
910             },
911             0x0113 => { #PH
912             Name => 'ImageStabilization',
913             Condition => '$self->{Model} eq "DSLR-A100"',
914             Notes => 'valid for Sony A100 only',
915             Writable => 'int32u',
916             PrintConv => \%offOn,
917             },
918             0x0114 => [
919             { #8
920             Name => 'MinoltaCameraSettings5D',
921             Condition => '$self->{Model} =~ /^(DYNAX 5D|MAXXUM 5D|ALPHA SWEET)/',
922             SubDirectory => {
923             TagTable => 'Image::ExifTool::Minolta::CameraSettings5D',
924             ByteOrder => 'BigEndian',
925             },
926             },
927             { #PH
928             Name => 'CameraSettingsA100',
929             Condition => '$self->{Model} eq "DSLR-A100"',
930             SubDirectory => {
931             TagTable => 'Image::ExifTool::Minolta::CameraSettingsA100',
932             ByteOrder => 'BigEndian', # required because order differs for ARW and JPG images
933             },
934             },
935             ],
936             0x0115 => { #20
937             Name => 'WhiteBalance',
938             Writable => 'int32u',
939             PrintHex => 1,
940             PrintConv => {
941             0x00 => 'Auto',
942             0x01 => 'Color Temperature/Color Filter',
943             0x10 => 'Daylight',
944             0x20 => 'Cloudy',
945             0x30 => 'Shade',
946             0x40 => 'Tungsten',
947             0x50 => 'Flash',
948             0x60 => 'Fluorescent',
949             0x70 => 'Custom',
950             },
951             },
952             0x0e00 => {
953             Name => 'PrintIM',
954             Description => 'Print Image Matching',
955             Writable => 0,
956             SubDirectory => {
957             TagTable => 'Image::ExifTool::PrintIM::Main',
958             },
959             },
960             0x0f00 => {
961             Name => 'MinoltaCameraSettings2',
962             Writable => 0,
963             Binary => 1,
964             },
965             );
966              
967             %Image::ExifTool::Minolta::CameraSettings = (
968             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
969             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
970             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
971             WRITABLE => 1,
972             PRIORITY => 0, # not as reliable as other tags
973             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
974             FORMAT => 'int32u',
975             FIRST_ENTRY => 0,
976             NOTES => q{
977             There is some variability in CameraSettings information between different
978             models (and sometimes even between different firmware versions), so this
979             information may not be as reliable as it should be. Because of this, tags
980             in the following tables are set to lower priority to prevent them from
981             superseding the values of same-named tags in other locations when duplicate
982             tags are disabled.
983             },
984             1 => {
985             Name => 'ExposureMode',
986             PrintConv => {
987             0 => 'Program',
988             1 => 'Aperture Priority',
989             2 => 'Shutter Priority',
990             3 => 'Manual',
991             },
992             },
993             2 => {
994             Name => 'FlashMode',
995             PrintConv => {
996             0 => 'Fill flash',
997             1 => 'Red-eye reduction',
998             2 => 'Rear flash sync',
999             3 => 'Wireless',
1000             4 => 'Off?', #PH
1001             },
1002             },
1003             3 => {
1004             Name => 'WhiteBalance',
1005             PrintConv => 'Image::ExifTool::Minolta::ConvertWhiteBalance($val)',
1006             },
1007             4 => {
1008             Name => 'MinoltaImageSize',
1009             PrintConv => {
1010             0 => 'Full',
1011             1 => '1600x1200',
1012             2 => '1280x960',
1013             3 => '640x480',
1014             6 => '2080x1560', #PH (A2)
1015             7 => '2560x1920', #PH (A2)
1016             8 => '3264x2176', #PH (A2)
1017             },
1018             },
1019             5 => {
1020             Name => 'MinoltaQuality',
1021             PrintConv => { #NJ
1022             0 => 'Raw',
1023             1 => 'Super Fine',
1024             2 => 'Fine',
1025             3 => 'Standard',
1026             4 => 'Economy',
1027             5 => 'Extra Fine',
1028             },
1029             },
1030             6 => {
1031             Name => 'DriveMode',
1032             PrintConv => {
1033             0 => 'Single',
1034             1 => 'Continuous',
1035             2 => 'Self-timer',
1036             4 => 'Bracketing',
1037             5 => 'Interval',
1038             6 => 'UHS continuous',
1039             7 => 'HS continuous',
1040             },
1041             },
1042             7 => {
1043             Name => 'MeteringMode',
1044             PrintConv => {
1045             0 => 'Multi-segment',
1046             1 => 'Center-weighted average',
1047             2 => 'Spot',
1048             },
1049             },
1050             8 => {
1051             Name => 'ISO',
1052             ValueConv => '2 ** (($val-48)/8) * 100',
1053             ValueConvInv => '48 + 8*log($val/100)/log(2)',
1054             PrintConv => 'int($val + 0.5)',
1055             PrintConvInv => '$val',
1056             },
1057             9 => {
1058             Name => 'ExposureTime',
1059             ValueConv => '2 ** ((48-$val)/8)',
1060             ValueConvInv => '48 - 8*log($val)/log(2)',
1061             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1062             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1063             },
1064             10 => {
1065             Name => 'FNumber',
1066             ValueConv => '2 ** (($val-8)/16)',
1067             ValueConvInv => '8 + 16*log($val)/log(2)',
1068             PrintConv => 'sprintf("%.1f",$val)',
1069             PrintConvInv => '$val',
1070             },
1071             11 => {
1072             Name => 'MacroMode',
1073             PrintConv => {
1074             0 => 'Off',
1075             1 => 'On',
1076             },
1077             },
1078             12 => {
1079             Name => 'DigitalZoom',
1080             PrintConv => {
1081             0 => 'Off',
1082             1 => 'Electronic magnification',
1083             2 => '2x',
1084             },
1085             },
1086             13 => {
1087             Name => 'ExposureCompensation',
1088             ValueConv => '$val/3 - 2',
1089             ValueConvInv => '($val + 2) * 3',
1090             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1091             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1092             },
1093             14 => {
1094             Name => 'BracketStep',
1095             PrintConv => {
1096             0 => '1/3 EV',
1097             1 => '2/3 EV',
1098             2 => '1 EV',
1099             },
1100             },
1101             16 => 'IntervalLength',
1102             17 => 'IntervalNumber',
1103             18 => {
1104             Name => 'FocalLength',
1105             ValueConv => '$val / 256',
1106             ValueConvInv => '$val * 256',
1107             PrintConv => 'sprintf("%.1f mm",$val)',
1108             PrintConvInv => '$val=~s/\s*mm$//;$val',
1109             },
1110             19 => {
1111             Name => 'FocusDistance',
1112             ValueConv => '$val / 1000',
1113             ValueConvInv => '$val * 1000',
1114             PrintConv => '$val ? "$val m" : "inf"',
1115             PrintConvInv => '$val eq "inf" ? 0 : $val =~ s/\s*m$//, $val',
1116             },
1117             20 => {
1118             Name => 'FlashFired',
1119             PrintConv => {
1120             0 => 'No',
1121             1 => 'Yes',
1122             },
1123             },
1124             21 => {
1125             Name => 'MinoltaDate',
1126             Groups => { 2 => 'Time' },
1127             Shift => 'Time',
1128             ValueConv => 'sprintf("%4d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
1129             ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
1130             },
1131             22 => {
1132             Name => 'MinoltaTime',
1133             Groups => { 2 => 'Time' },
1134             Shift => 'Time',
1135             ValueConv => 'sprintf("%.2d:%.2d:%.2d",$val>>16,($val&0xff00)>>8,$val&0xff)',
1136             ValueConvInv => 'my @a=($val=~/(\d+):(\d+):(\d+)/); @a ? ($a[0]<<16)+($a[1]<<8)+$a[2] : undef',
1137             },
1138             23 => {
1139             Name => 'MaxAperture',
1140             ValueConv => '2 ** (($val-8)/16)',
1141             ValueConvInv => '8 + 16*log($val)/log(2)',
1142             PrintConv => 'sprintf("%.1f",$val)',
1143             PrintConvInv => '$val',
1144             },
1145             26 => {
1146             Name => 'FileNumberMemory',
1147             PrintConv => \%offOn,
1148             },
1149             27 => 'LastFileNumber',
1150             28 => {
1151             Name => 'ColorBalanceRed',
1152             ValueConv => '$val / 256',
1153             ValueConvInv => '$val * 256',
1154             },
1155             29 => {
1156             Name => 'ColorBalanceGreen',
1157             ValueConv => '$val / 256',
1158             ValueConvInv => '$val * 256',
1159             },
1160             30 => {
1161             Name => 'ColorBalanceBlue',
1162             ValueConv => '$val / 256',
1163             ValueConvInv => '$val * 256',
1164             },
1165             31 => {
1166             Name => 'Saturation',
1167             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1168             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1169             %Image::ExifTool::Exif::printParameter,
1170             },
1171             32 => {
1172             Name => 'Contrast',
1173             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1174             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1175             %Image::ExifTool::Exif::printParameter,
1176             },
1177             33 => {
1178             Name => 'Sharpness',
1179             PrintConv => {
1180             0 => 'Hard',
1181             1 => 'Normal',
1182             2 => 'Soft',
1183             },
1184             },
1185             34 => {
1186             Name => 'SubjectProgram',
1187             PrintConv => {
1188             0 => 'None',
1189             1 => 'Portrait',
1190             2 => 'Text',
1191             3 => 'Night portrait',
1192             4 => 'Sunset',
1193             5 => 'Sports action',
1194             },
1195             },
1196             35 => {
1197             Name => 'FlashExposureComp',
1198             Description => 'Flash Exposure Compensation',
1199             ValueConv => '($val - 6) / 3',
1200             ValueConvInv => '$val * 3 + 6',
1201             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1202             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1203             },
1204             36 => {
1205             Name => 'ISOSetting',
1206             PrintConv => {
1207             0 => 100,
1208             1 => 200,
1209             2 => 400,
1210             3 => 800,
1211             4 => 'Auto',
1212             5 => 64,
1213             },
1214             },
1215             37 => {
1216             Name => 'MinoltaModelID',
1217             PrintConv => {
1218             0 => 'DiMAGE 7, X1, X21 or X31',
1219             1 => 'DiMAGE 5',
1220             2 => 'DiMAGE S304',
1221             3 => 'DiMAGE S404',
1222             4 => 'DiMAGE 7i',
1223             5 => 'DiMAGE 7Hi',
1224             6 => 'DiMAGE A1',
1225             7 => 'DiMAGE A2 or S414',
1226             },
1227             },
1228             38 => {
1229             Name => 'IntervalMode',
1230             PrintConv => {
1231             0 => 'Still Image',
1232             1 => 'Time-lapse Movie',
1233             },
1234             },
1235             39 => {
1236             Name => 'FolderName',
1237             PrintConv => {
1238             0 => 'Standard Form',
1239             1 => 'Data Form',
1240             },
1241             },
1242             40 => {
1243             Name => 'ColorMode',
1244             PrintConv => {
1245             0 => 'Natural color',
1246             1 => 'Black & White',
1247             2 => 'Vivid color',
1248             3 => 'Solarization',
1249             4 => 'Adobe RGB',
1250             },
1251             },
1252             41 => {
1253             Name => 'ColorFilter',
1254             ValueConv => '$val - ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1255             ValueConvInv => '$val + ($self->{Model}=~/DiMAGE A2/ ? 5 : 3)',
1256             },
1257             42 => 'BWFilter',
1258             43 => {
1259             Name => 'InternalFlash',
1260             PrintConv => {
1261             0 => 'No',
1262             1 => 'Fired',
1263             },
1264             },
1265             44 => {
1266             Name => 'Brightness',
1267             ValueConv => '$val/8 - 6',
1268             ValueConvInv => '($val + 6) * 8',
1269             },
1270             45 => 'SpotFocusPointX',
1271             46 => 'SpotFocusPointY',
1272             47 => {
1273             Name => 'WideFocusZone',
1274             PrintConv => {
1275             0 => 'No zone',
1276             1 => 'Center zone (horizontal orientation)',
1277             2 => 'Center zone (vertical orientation)',
1278             3 => 'Left zone',
1279             4 => 'Right zone',
1280             },
1281             },
1282             48 => {
1283             Name => 'FocusMode',
1284             PrintConv => {
1285             0 => 'AF',
1286             1 => 'MF',
1287             },
1288             },
1289             49 => {
1290             Name => 'FocusArea',
1291             PrintConv => {
1292             0 => 'Wide Focus (normal)',
1293             1 => 'Spot Focus',
1294             },
1295             },
1296             50 => {
1297             Name => 'DECPosition',
1298             PrintConv => {
1299             0 => 'Exposure',
1300             1 => 'Contrast',
1301             2 => 'Saturation',
1302             3 => 'Filter',
1303             },
1304             },
1305             # 7Hi only:
1306             51 => {
1307             Name => 'ColorProfile',
1308             Condition => '$self->{Model} eq "DiMAGE 7Hi"',
1309             Notes => 'DiMAGE 7Hi only',
1310             PrintConv => {
1311             0 => 'Not Embedded',
1312             1 => 'Embedded',
1313             },
1314             },
1315             # (the following may be entry 51 for other models?)
1316             52 => {
1317             Name => 'DataImprint',
1318             Condition => '$self->{Model} eq "DiMAGE 7Hi"',
1319             Notes => 'DiMAGE 7Hi only',
1320             PrintConv => {
1321             0 => 'None',
1322             1 => 'YYYY/MM/DD',
1323             2 => 'MM/DD/HH:MM',
1324             3 => 'Text',
1325             4 => 'Text + ID#',
1326             },
1327             },
1328             63 => { #9
1329             Name => 'FlashMetering',
1330             PrintConv => {
1331             0 => 'ADI (Advanced Distance Integration)',
1332             1 => 'Pre-flash TTL',
1333             2 => 'Manual flash control',
1334             },
1335             },
1336             );
1337              
1338             # Camera settings used by the 7D (ref 8)
1339             %Image::ExifTool::Minolta::CameraSettings7D = (
1340             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1341             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1342             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1343             WRITABLE => 1,
1344             PRIORITY => 0,
1345             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1346             FORMAT => 'int16u',
1347             FIRST_ENTRY => 0,
1348             0x00 => {
1349             Name => 'ExposureMode',
1350             PrintConv => {
1351             0 => 'Program',
1352             1 => 'Aperture Priority',
1353             2 => 'Shutter Priority',
1354             3 => 'Manual',
1355             4 => 'Auto',
1356             5 => 'Program-shift A',
1357             6 => 'Program-shift S',
1358             },
1359             },
1360             0x02 => { #PH
1361             Name => 'MinoltaImageSize',
1362             PrintConv => {
1363             0 => 'Large',
1364             1 => 'Medium',
1365             2 => 'Small',
1366             },
1367             },
1368             0x03 => {
1369             Name => 'MinoltaQuality',
1370             PrintConv => {
1371             0 => 'RAW',
1372             16 => 'Fine', #PH
1373             32 => 'Normal', #PH
1374             34 => 'RAW+JPEG',
1375             48 => 'Economy', #PH
1376             },
1377             },
1378             0x04 => {
1379             Name => 'WhiteBalance',
1380             PrintConv => {
1381             0 => 'Auto',
1382             1 => 'Daylight',
1383             2 => 'Shade',
1384             3 => 'Cloudy',
1385             4 => 'Tungsten',
1386             5 => 'Fluorescent',
1387             0x100 => 'Kelvin',
1388             0x200 => 'Manual',
1389             },
1390             },
1391             0x0e => {
1392             Name => 'FocusMode',
1393             PrintConv => {
1394             0 => 'AF-S',
1395             1 => 'AF-C',
1396             # Note: these two are reversed in ref 8
1397             3 => 'Manual', #JD
1398             4 => 'AF-A', #JD
1399             },
1400             },
1401             0x10 => {
1402             Name => 'AFPoints',
1403             PrintConv => {
1404             0 => '(none)',
1405             BITMASK => {
1406             0 => 'Center',
1407             1 => 'Top',
1408             2 => 'Top-right',
1409             3 => 'Right',
1410             4 => 'Bottom-right',
1411             5 => 'Bottom',
1412             6 => 'Bottom-left',
1413             7 => 'Left',
1414             8 => 'Top-left',
1415             },
1416             },
1417             },
1418             0x15 => {
1419             Name => 'Flash',
1420             PrintConv => \%offOn,
1421             },
1422             0x16 => { #10
1423             Name => 'FlashMode',
1424             PrintConv => {
1425             0 => 'Normal',
1426             1 => 'Red-eye reduction',
1427             2 => 'Rear flash sync',
1428             },
1429             },
1430             0x1c => {
1431             Name => 'ISOSetting',
1432             PrintConv => {
1433             0 => 'Auto', #10
1434             1 => 100,
1435             3 => 200,
1436             4 => 400,
1437             5 => 800,
1438             6 => 1600,
1439             7 => 3200,
1440             },
1441             },
1442             0x1e => {
1443             Name => 'ExposureCompensation',
1444             Format => 'int16s',
1445             ValueConv => '$val / 24',
1446             ValueConvInv => '$val * 24',
1447             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1448             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1449             },
1450             0x25 => {
1451             Name => 'ColorSpace',
1452             PrintConv => {
1453             0 => 'Natural sRGB',
1454             1 => 'Natural+ sRGB',
1455             4 => 'Adobe RGB',
1456             },
1457             },
1458             0x26 => {
1459             Name => 'Sharpness',
1460             ValueConv => '$val - 10',
1461             ValueConvInv => '$val + 10',
1462             },
1463             0x27 => {
1464             Name => 'Contrast',
1465             ValueConv => '$val - 10',
1466             ValueConvInv => '$val + 10',
1467             },
1468             0x28 => {
1469             Name => 'Saturation',
1470             ValueConv => '$val - 10',
1471             ValueConvInv => '$val + 10',
1472             },
1473             0x2d => 'FreeMemoryCardImages',
1474             0x3f => {
1475             Format => 'int16s',
1476             Name => 'ColorTemperature',
1477             ValueConv => '$val * 100',
1478             ValueConvInv => '$val / 100',
1479             },
1480             0x40 => { #10
1481             Name => 'HueAdjustment',
1482             ValueConv => '$val - 10',
1483             ValueConvInv => '$val + 10',
1484             },
1485             0x46 => {
1486             Name => 'Rotation',
1487             PrintConv => {
1488             72 => 'Horizontal (normal)',
1489             76 => 'Rotate 90 CW',
1490             82 => 'Rotate 270 CW',
1491             },
1492             },
1493             0x47 => {
1494             Name => 'FNumber',
1495             ValueConv => '2 ** (($val-8)/16)',
1496             ValueConvInv => '8 + 16*log($val)/log(2)',
1497             PrintConv => 'sprintf("%.1f",$val)',
1498             PrintConvInv => '$val',
1499             },
1500             0x48 => {
1501             Name => 'ExposureTime',
1502             ValueConv => '2 ** ((48-$val)/8)',
1503             ValueConvInv => '48 - 8*log($val)/log(2)',
1504             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1505             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1506             },
1507             0x4a => 'FreeMemoryCardImages',
1508             0x5e => {
1509             Name => 'ImageNumber',
1510             Notes => q{
1511             this information may appear at index 98 (0x62), depending on firmware
1512             version
1513             },
1514             ValueConv => '$val + 1',
1515             ValueConvInv => '$val - 1',
1516             },
1517             0x60 => {
1518             Name => 'NoiseReduction',
1519             PrintConv => \%offOn,
1520             },
1521             0x62 => {
1522             Name => 'ImageNumber2',
1523             ValueConv => '$val + 1',
1524             ValueConvInv => '$val - 1',
1525             },
1526             0x71 => {
1527             Name => 'ImageStabilization',
1528             PrintConv => \%offOn,
1529             },
1530             0x75 => {
1531             Name => 'ZoneMatchingOn',
1532             PrintConv => \%offOn,
1533             },
1534             );
1535              
1536             # Camera settings used by the 5D (ref 8)
1537             %Image::ExifTool::Minolta::CameraSettings5D = (
1538             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1539             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1540             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1541             WRITABLE => 1,
1542             PRIORITY => 0,
1543             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1544             FORMAT => 'int16u',
1545             FIRST_ENTRY => 0,
1546             0x0a => {
1547             Name => 'ExposureMode',
1548             PrintConv => {
1549             0 => 'Program',
1550             1 => 'Aperture Priority',
1551             2 => 'Shutter Priority',
1552             3 => 'Manual',
1553             4 => 'Auto?',
1554             4131 => 'Connected Copying?',
1555             },
1556             },
1557             0x0c => { #PH
1558             Name => 'MinoltaImageSize',
1559             PrintConv => {
1560             0 => 'Large',
1561             1 => 'Medium',
1562             2 => 'Small',
1563             },
1564             },
1565             0x0d => {
1566             Name => 'MinoltaQuality',
1567             PrintConv => {
1568             0 => 'RAW',
1569             16 => 'Fine', #PH
1570             32 => 'Normal', #PH
1571             34 => 'RAW+JPEG',
1572             48 => 'Economy', #PH
1573             },
1574             },
1575             0x0e => {
1576             Name => 'WhiteBalance',
1577             PrintConv => {
1578             0 => 'Auto',
1579             1 => 'Daylight',
1580             2 => 'Cloudy',
1581             3 => 'Shade',
1582             4 => 'Tungsten',
1583             5 => 'Fluorescent',
1584             6 => 'Flash',
1585             0x100 => 'Kelvin',
1586             0x200 => 'Manual',
1587             },
1588             },
1589             # 0x0f-0x11 something to do with WB RGB levels as shot? (PH)
1590             # 0x12-0x17 RGB levels for other WB modes (with G missing)? (PH)
1591             0x1f => { #PH
1592             Name => 'Flash',
1593             PrintConv => {
1594             0 => 'Did not fire',
1595             1 => 'Fired',
1596             },
1597             },
1598             0x20 => { #10
1599             Name => 'FlashMode',
1600             PrintConv => {
1601             0 => 'Normal',
1602             1 => 'Red-eye reduction',
1603             2 => 'Rear flash sync',
1604             },
1605             },
1606             0x25 => {
1607             Name => 'MeteringMode',
1608             PrintConv => {
1609             0 => 'Multi-segment',
1610             1 => 'Center-weighted average',
1611             2 => 'Spot',
1612             },
1613             },
1614             0x26 => {
1615             Name => 'ISOSetting',
1616             PrintConv => {
1617             0 => 'Auto',
1618             1 => 100,
1619             3 => 200,
1620             4 => 400,
1621             5 => 800,
1622             6 => 1600,
1623             7 => 3200,
1624             8 => '200 (Zone Matching High)',
1625             10 => '80 (Zone Matching Low)',
1626             },
1627             },
1628             # looks wrong:
1629             # 0x28 => { #10
1630             # Name => 'ExposureCompensation',
1631             # ValueConv => '$val / 24',
1632             # ValueConvInv => '$val * 24',
1633             # },
1634             0x2f => { #10
1635             Name => 'ColorSpace',
1636             PrintConv => {
1637             0 => 'Natural sRGB',
1638             1 => 'Natural+ sRGB',
1639             2 => 'Monochrome',
1640             4 => 'Adobe RGB (ICC)',
1641             5 => 'Adobe RGB',
1642             },
1643             },
1644             0x30 => {
1645             Name => 'Sharpness',
1646             ValueConv => '$val - 10',
1647             ValueConvInv => '$val + 10',
1648             },
1649             0x31 => {
1650             Name => 'Contrast',
1651             ValueConv => '$val - 10',
1652             ValueConvInv => '$val + 10',
1653             },
1654             0x32 => {
1655             Name => 'Saturation',
1656             ValueConv => '$val - 10',
1657             ValueConvInv => '$val + 10',
1658             },
1659             0x35 => { #PH
1660             Name => 'ExposureTime',
1661             ValueConv => '2 ** ((48-$val)/8)',
1662             ValueConvInv => '48 - 8*log($val)/log(2)',
1663             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1664             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1665             },
1666             0x36 => { #PH
1667             Name => 'FNumber',
1668             ValueConv => '2 ** (($val-8)/16)',
1669             ValueConvInv => '8 + 16*log($val)/log(2)',
1670             PrintConv => 'sprintf("%.1f",$val)',
1671             PrintConvInv => '$val',
1672             },
1673             0x37 => 'FreeMemoryCardImages',
1674             # 0x38 definitely not related to exposure comp as in ref 8 (PH)
1675             0x49 => { #PH
1676             Name => 'ColorTemperature',
1677             Format => 'int16s',
1678             ValueConv => '$val * 100',
1679             ValueConvInv => '$val / 100',
1680             },
1681             0x4a => { #10
1682             Name => 'HueAdjustment',
1683             ValueConv => '$val - 10',
1684             ValueConvInv => '$val + 10',
1685             },
1686             0x50 => {
1687             Name => 'Rotation',
1688             PrintConv => {
1689             72 => 'Horizontal (normal)',
1690             76 => 'Rotate 90 CW',
1691             82 => 'Rotate 270 CW',
1692             },
1693             },
1694             0x53 => {
1695             Name => 'ExposureCompensation',
1696             ValueConv => '$val / 100 - 3',
1697             ValueConvInv => '($val + 3) * 100',
1698             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1699             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1700             },
1701             0x54 => 'FreeMemoryCardImages',
1702             0x65 => { #10
1703             Name => 'Rotation',
1704             PrintConv => {
1705             0 => 'Horizontal (normal)',
1706             1 => 'Rotate 90 CW',
1707             2 => 'Rotate 270 CW',
1708             },
1709             },
1710             # 0x66 maybe program mode or some setting like this? (PH)
1711             0x6e => { #10
1712             Name => 'ColorTemperature',
1713             Format => 'int16s',
1714             ValueConv => '$val * 100',
1715             ValueConvInv => '$val / 100',
1716             },
1717             0x71 => { #10
1718             Name => 'PictureFinish',
1719             PrintConv => {
1720             0 => 'Natural',
1721             1 => 'Natural+',
1722             2 => 'Portrait',
1723             3 => 'Wind Scene',
1724             4 => 'Evening Scene',
1725             5 => 'Night Scene',
1726             6 => 'Night Portrait',
1727             7 => 'Monochrome',
1728             8 => 'Adobe RGB',
1729             9 => 'Adobe RGB (ICC)',
1730             },
1731             },
1732             # 0x95 FlashStrength? (PH)
1733             # 0xa4 similar information to 0x27, except with different values
1734             0xae => {
1735             Name => 'ImageNumber',
1736             ValueConv => '$val + 1',
1737             ValueConvInv => '$val - 1',
1738             },
1739             0xb0 => {
1740             Name => 'NoiseReduction',
1741             PrintConv => \%offOn,
1742             },
1743             0xbd => {
1744             Name => 'ImageStabilization',
1745             PrintConv => \%offOn,
1746             },
1747             );
1748              
1749             # Camera settings used by the Sony DSLR-A100 (ref 20)
1750             %Image::ExifTool::Minolta::CameraInfoA100 = (
1751             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1752             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1753             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1754             NOTES => 'Camera information for the Sony DSLR-A100.',
1755             WRITABLE => 1,
1756             PRIORITY => 0, # may not be as reliable as other information
1757             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1758             FIRST_ENTRY => 0,
1759             0x01 => { #PH
1760             Name => 'AFSensorActive',
1761             PrintConv => {
1762             0 => 'Top-right',
1763             1 => 'Bottom-right',
1764             2 => 'Bottom',
1765             3 => 'Middle Horizontal',
1766             4 => 'Center Vertical',
1767             5 => 'Top',
1768             6 => 'Top-left',
1769             7 => 'Bottom-left',
1770             },
1771             },
1772             0x02 => {
1773             Name => 'AFStatusActiveSensor',
1774             %afStatusInfo,
1775             Notes => q{
1776             the focus status at shutter release. May not reflect the status after
1777             focusing if the image is focused then recomposed
1778             },
1779             },
1780             0x04 => { Name => 'AFStatusTop-right', %afStatusInfo },
1781             0x06 => { Name => 'AFStatusBottom-right', %afStatusInfo },
1782             0x08 => { Name => 'AFStatusBottom', %afStatusInfo },
1783             0x0a => {
1784             Name => 'AFStatusMiddleHorizontal',
1785             %afStatusInfo,
1786             Notes => q{
1787             any of the three horizontal sensors at the middle of the focus frame: Left,
1788             Center or Right
1789             },
1790             },
1791             0x0c => { Name => 'AFStatusCenterVertical', %afStatusInfo },
1792             0x0e => { Name => 'AFStatusTop', %afStatusInfo },
1793             0x10 => { Name => 'AFStatusTop-left', %afStatusInfo },
1794             0x12 => { Name => 'AFStatusBottom-left', %afStatusInfo },
1795             0x14 => {
1796             Name => 'FocusLocked',
1797             # (Focus can be locked in all modes other than Manual and Continuous,
1798             # and the latter can be overridden by pushing the Spot AF button)
1799             PrintConv => {
1800             0 => 'Manual Focus',
1801             4 => 'No',
1802             16 => 'Continuous Focus',
1803             64 => 'Yes',
1804             },
1805             },
1806             0x15 => {
1807             Name => 'AFPoint',
1808             PrintConvColumns => 2,
1809             PrintConv => {
1810             0 => 'Auto',
1811             1 => 'Center',
1812             2 => 'Top',
1813             3 => 'Top-right',
1814             4 => 'Right',
1815             5 => 'Bottom-right',
1816             6 => 'Bottom',
1817             7 => 'Bottom-left',
1818             8 => 'Left',
1819             9 => 'Top-left',
1820             },
1821             },
1822             0x16 => {
1823             Name => 'AFMode',
1824             PrintConv => {
1825             0 => 'DMF',
1826             1 => 'AF-S',
1827             2 => 'AF-C',
1828             3 => 'AF-A',
1829             },
1830             },
1831             0x2d => { Name => 'AFStatusLeft', %afStatusInfo },
1832             0x2f => { Name => 'AFStatusCenterHorizontal',%afStatusInfo },
1833             0x31 => { Name => 'AFStatusRight', %afStatusInfo },
1834             0x33 => {
1835             Name => 'AFAreaMode',
1836             PrintConv => {
1837             0 => 'Wide',
1838             1 => 'Local',
1839             2 => 'Spot',
1840             },
1841             },
1842             );
1843              
1844             # Image stabilization information used by the Sony DSLR-A100 (ref 20)
1845             %Image::ExifTool::Minolta::ISInfoA100 = (
1846             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1847             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1848             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1849             NOTES => 'Image stabilization information for the Sony DSLR-A100.',
1850             WRITABLE => 1,
1851             PRIORITY => 0, # may not be as reliable as other information
1852             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1853             FIRST_ENTRY => 0,
1854             0 => {
1855             Name => 'ImageStabilization',
1856             Format => 'int16u',
1857             PrintHex => 1,
1858             PrintConv => {
1859             0x0000 => 'Off',
1860             0x2784 => 'On',
1861             },
1862             },
1863             );
1864              
1865             # Camera settings used by the Sony DSLR-A100 (ref PH)
1866             %Image::ExifTool::Minolta::CameraSettingsA100 = (
1867             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1868             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1869             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1870             NOTES => 'Camera settings information for the Sony DSLR-A100.',
1871             WRITABLE => 1,
1872             PRIORITY => 0, # may not be as reliable as other information
1873             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1874             FORMAT => 'int16u',
1875             FIRST_ENTRY => 0,
1876             0x00 => { #15
1877             Name => 'ExposureMode',
1878             PrintHex => 1,
1879             PrintConv => {
1880             0 => 'Program',
1881             1 => 'Aperture Priority',
1882             2 => 'Shutter Priority',
1883             3 => 'Manual',
1884             4 => 'Auto',
1885             5 => 'Program Shift A', #20
1886             6 => 'Program Shift S', #20
1887             0x1013 => 'Portrait',
1888             0x1023 => 'Sports', #20
1889             0x1033 => 'Sunset', #20
1890             0x1043 => 'Night View/Portrait', #20
1891             0x1053 => 'Landscape',
1892             0x1083 => 'Macro', #20
1893             },
1894             },
1895             0x01 => { #15
1896             Name => 'ExposureCompensationSetting',
1897             # (differs from ExposureCompensation for exposure bracketing shots, ref 20)
1898             ValueConv => '$val / 100 - 3',
1899             ValueConvInv => 'int(($val + 3) * 100 + 0.5)',
1900             },
1901             0x05 => { #20 (requires external flash)
1902             Name => 'HighSpeedSync',
1903             PrintConv => \%offOn,
1904             },
1905             0x06 => { #20
1906             Name => 'ShutterSpeedSetting',
1907             Notes => 'used only in M and S exposure modes',
1908             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
1909             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
1910             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
1911             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
1912             },
1913             0x07 => { #20
1914             Name => 'ApertureSetting',
1915             Notes => 'used only in M and A exposure modes',
1916             ValueConv => '2 ** (($val/8 - 1) / 2)',
1917             ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
1918             PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1919             PrintConvInv => '$val',
1920             },
1921             0x08 => { #20
1922             Name => 'ExposureTime',
1923             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
1924             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
1925             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
1926             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
1927             },
1928             0x09 => { #15/20
1929             Name => 'FNumber',
1930             ValueConv => '2 ** (($val/8 - 1) / 2)',
1931             ValueConvInv => 'int((log($val) * 2 / log(2) + 1) * 8 + 0.5)',
1932             PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1933             PrintConvInv => '$val',
1934             },
1935             0x0a => { #20
1936             Name => 'DriveMode2', # (one of these is probably DriveModeSetting like Sony - PH)
1937             PrintHex => 1,
1938             PrintConv => {
1939             0x000 => 'Self-timer 10 sec',
1940             0x001 => 'Continuous',
1941             0x302 => 'Single-frame Bracketing Low',
1942             0x702 => 'Single-frame Bracketing High',
1943             0x303 => 'Continous Bracketing Low',
1944             0x703 => 'Continuous Bracketing High',
1945             0x004 => 'Self-timer 2 sec',
1946             0x005 => 'Single Frame',
1947             0x008 => 'White Balance Bracketing Low',
1948             0x009 => 'White Balance Bracketing High',
1949             },
1950             },
1951             0x0b => { #15
1952             Name => 'WhiteBalance',
1953             PrintHex => 1,
1954             PrintConv => {
1955             0 => 'Auto',
1956             1 => 'Daylight',
1957             2 => 'Cloudy',
1958             3 => 'Shade',
1959             4 => 'Tungsten',
1960             5 => 'Fluorescent',
1961             6 => 'Flash',
1962             0x100 => 'Kelvin',
1963             0x200 => 'Manual',
1964             },
1965             },
1966             0x0c => { #20
1967             Name => 'FocusMode',
1968             PrintConv => {
1969             0 => 'AF-S',
1970             1 => 'AF-C',
1971             4 => 'AF-A',
1972             5 => 'Manual',
1973             6 => 'DMF',
1974             },
1975             },
1976             0x0d => { #20
1977             Name => 'AFPointSelected', # (v8.88: renamed from LocalAFAreaPoint)
1978             # (9-point centre-cross AF system, ref JR)
1979             PrintConv => {
1980             1 => 'Center',
1981             2 => 'Top',
1982             3 => 'Top-right',
1983             4 => 'Right',
1984             5 => 'Bottom-right',
1985             6 => 'Bottom',
1986             7 => 'Bottom-left',
1987             8 => 'Left',
1988             9 => 'Top-left',
1989             },
1990             },
1991             0x0e => { #20
1992             Name => 'AFAreaMode',
1993             PrintConv => {
1994             0 => 'Wide',
1995             1 => 'Local',
1996             2 => 'Spot',
1997             },
1998             },
1999             0x0f => { #20
2000             Name => 'FlashMode',
2001             PrintConv => {
2002             0 => 'Auto',
2003             2 => 'Rear Sync',
2004             3 => 'Wireless',
2005             4 => 'Fill Flash',
2006             },
2007             },
2008             0x10 => { #20
2009             Name => 'FlashExposureCompSet',
2010             Description => 'Flash Exposure Comp. Setting',
2011             # (may differ from FlashExposureComp for flash bracketing shots)
2012             ValueConv => '$val / 100 - 3',
2013             ValueConvInv => 'int(($val + 3) * 100 + 0.5)',
2014             },
2015             0x12 => { #15/20
2016             Name => 'MeteringMode',
2017             PrintConv => {
2018             0 => 'Multi-segment',
2019             1 => 'Center-weighted average',
2020             2 => 'Spot',
2021             },
2022             },
2023             0x13 => { #15/20
2024             Name => 'ISOSetting',
2025             PrintConv => {
2026             0 => 'Auto',
2027             48 => 100,
2028             56 => 200,
2029             64 => 400,
2030             72 => 800,
2031             80 => 1600,
2032             174 => '80 (Zone Matching Low)',
2033             184 => '200 (Zone Matching High)',
2034             },
2035             },
2036             0x14 => { #15/20
2037             Name => 'ZoneMatchingMode',
2038             PrintConv => {
2039             0 => 'Off',
2040             1 => 'Standard',
2041             2 => 'Advanced',
2042             },
2043             },
2044             0x15 => { #15/20
2045             Name => 'DynamicRangeOptimizer',
2046             # this and the Sony tag 0xb025 DynamicRangeOptimizer give the actual mode
2047             # applied to the image. The Minolta CameraSettingsA100 0x0027 tag gives
2048             # the setting. There is a longish list of scenarios in which, regardless
2049             # of the latter, DRO is not applied (ref 20)
2050             Notes => 'as applied to image',
2051             PrintConv => {
2052             0 => 'Off',
2053             1 => 'Standard',
2054             2 => 'Advanced',
2055             },
2056             },
2057             0x16 => { #15
2058             Name => 'ColorMode',
2059             PrintConv => {
2060             0 => 'Standard',
2061             1 => 'Vivid',
2062             2 => 'Portrait',
2063             3 => 'Landscape',
2064             4 => 'Sunset',
2065             5 => 'Night Scene',
2066             7 => 'B&W',
2067             8 => 'Adobe RGB',
2068             },
2069             },
2070             0x17 => { # 15/20
2071             Name => 'ColorSpace',
2072             PrintConv => {
2073             0 => 'sRGB',
2074             2 => 'B&W', #PH (A100)
2075             5 => 'Adobe RGB',
2076             },
2077             },
2078             0x18 => { #15
2079             Name => 'Sharpness',
2080             ValueConv => '$val - 10',
2081             ValueConvInv => '$val + 10',
2082             %Image::ExifTool::Exif::printParameter,
2083             },
2084             0x19 => { #15
2085             Name => 'Contrast',
2086             ValueConv => '$val - 10',
2087             ValueConvInv => '$val + 10',
2088             %Image::ExifTool::Exif::printParameter,
2089             },
2090             0x1a => { #15
2091             Name => 'Saturation',
2092             ValueConv => '$val - 10',
2093             ValueConvInv => '$val + 10',
2094             %Image::ExifTool::Exif::printParameter,
2095             },
2096             0x1c => { #20
2097             Name => 'FlashMetering',
2098             PrintConv => {
2099             0 => 'ADI (Advanced Distance Integration)',
2100             1 => 'Pre-flash TTL',
2101             },
2102             },
2103             0x1d => { #20
2104             Name => 'PrioritySetupShutterRelease',
2105             PrintConv => {
2106             0 => 'AF',
2107             1 => 'Release',
2108             },
2109             },
2110             0x1e => { #PH
2111             Name => 'DriveMode',
2112             PrintConv => {
2113             0 => 'Single Frame',
2114             1 => 'Continuous',
2115             2 => 'Self-timer',
2116             3 => 'Continuous Bracketing',
2117             4 => 'Single-Frame Bracketing',
2118             5 => 'White Balance Bracketing',
2119             },
2120             },
2121             0x1f => { #20
2122             Name => 'SelfTimerTime',
2123             PrintConv => {
2124             0 => '10 s',
2125             4 => '2 s',
2126             },
2127             },
2128             0x20 => { #20
2129             Name => 'ContinuousBracketing',
2130             PrintHex => 1,
2131             PrintConv => {
2132             0x303 => 'Low',
2133             0x703 => 'High',
2134             },
2135             },
2136             0x21 => { #20
2137             Name => 'SingleFrameBracketing',
2138             PrintHex => 1,
2139             PrintConv => {
2140             0x302 => 'Low',
2141             0x702 => 'High',
2142             },
2143             },
2144             0x22 => { #20
2145             Name => 'WhiteBalanceBracketing',
2146             PrintHex => 1,
2147             PrintConv => {
2148             0x08 => 'Low',
2149             0x09 => 'High',
2150             },
2151             },
2152             0x023 => { #20
2153             Name => 'WhiteBalanceSetting',
2154             PrintHex => 1,
2155             # (not sure what bit 0x8000 indicates)
2156             PrintConv => {
2157             0 => 'Auto',
2158             1 => 'Preset',
2159             2 => 'Custom',
2160             3 => 'Color Temperature/Color Filter',
2161             0x8001 => 'Preset',
2162             0x8002 => 'Custom',
2163             0x8003 => 'Color Temperature/Color Filter',
2164             },
2165             },
2166             0x24 => { #20
2167             Name => 'PresetWhiteBalance',
2168             PrintConv => {
2169             1 => 'Daylight',
2170             2 => 'Cloudy',
2171             3 => 'Shade',
2172             4 => 'Tungsten',
2173             5 => 'Fluorescent',
2174             6 => 'Flash',
2175             },
2176             },
2177             0x25 => { #20
2178             Name => 'ColorTemperatureSetting',
2179             PrintConv => {
2180             0 => 'Temperature',
2181             2 => 'Color Filter',
2182             },
2183             },
2184             0x26 => { #20
2185             Name => 'CustomWBSetting',
2186             PrintConv => {
2187             0 => 'Setup',
2188             1 => 'Recall',
2189             },
2190             },
2191             0x27 => { #20
2192             Name => 'DynamicRangeOptimizerSetting',
2193             Notes => 'as set in camera',
2194             PrintConv => {
2195             0 => 'Off',
2196             1 => 'Standard',
2197             2 => 'Advanced',
2198             },
2199             },
2200             0x32 => 'FreeMemoryCardImages', #20
2201             0x34 => 'CustomWBRedLevel', #20
2202             0x35 => 'CustomWBGreenLevel', #20
2203             0x36 => 'CustomWBBlueLevel', #20
2204             0x37 => { #20
2205             Name => 'CustomWBError',
2206             PrintConv => {
2207             0 => 'OK',
2208             1 => 'Error',
2209             },
2210             },
2211             0x38 => { #20
2212             Name => 'WhiteBalanceFineTune',
2213             Format => 'int16s',
2214             },
2215             0x39 => { #20
2216             Name => 'ColorTemperature',
2217             ValueConv => '$val * 100',
2218             ValueConvInv => '$val / 100',
2219             },
2220             0x3a => { #20
2221             Name => 'ColorCompensationFilter',
2222             Format => 'int16s',
2223             Notes => 'ranges from -2 for green to +2 for magenta',
2224             },
2225             0x3b => { #20
2226             Name => 'SonyImageSize',
2227             PrintConv => {
2228             0 => 'Standard',
2229             1 => 'Medium',
2230             2 => 'Small',
2231             },
2232             },
2233             0x3c => { #20
2234             Name => 'SonyQuality',
2235             PrintConv => {
2236             0 => 'RAW',
2237             32 => 'Fine',
2238             34 => 'RAW + JPEG',
2239             48 => 'Standard',
2240             },
2241             },
2242             0x3d => { #20
2243             Name => 'InstantPlaybackTime',
2244             PrintConv => '"$val s"',
2245             PrintConvInv => '$val=~s/\s*s//; $val',
2246             },
2247             0x3e => { #20
2248             Name => 'InstantPlaybackSetup',
2249             PrintConv => {
2250             0 => 'Image and Information',
2251             1 => 'Image Only',
2252             # 2 appears to be unused
2253             3 => 'Image and Histogram',
2254             },
2255             },
2256             0x3f => { #PH
2257             Name => 'NoiseReduction',
2258             PrintConv => \%offOn,
2259             },
2260             0x40 => { #20
2261             Name => 'EyeStartAF',
2262             PrintConv => \%onOff,
2263             },
2264             0x41 => { #20
2265             Name => 'RedEyeReduction',
2266             PrintConv => \%offOn,
2267             },
2268             0x42 => { #20
2269             Name => 'FlashDefault',
2270             PrintConv => {
2271             0 => 'Auto',
2272             1 => 'Fill Flash',
2273             },
2274             },
2275             0x43 => { #20
2276             Name => 'AutoBracketOrder',
2277             PrintConv => {
2278             0 => '0 - +',
2279             1 => '- 0 +',
2280             },
2281             },
2282             0x44 => { #20
2283             Name => 'FocusHoldButton',
2284             PrintConv => {
2285             0 => 'Focus Hold',
2286             1 => 'DOF Preview',
2287             },
2288             },
2289             0x45 => { #20
2290             Name => 'AELButton',
2291             PrintConv => {
2292             0 => 'Hold',
2293             1 => 'Toggle',
2294             2 => 'Spot Hold',
2295             3 => 'Spot Toggle',
2296             },
2297             },
2298             0x46 => { #20
2299             Name => 'ControlDialSet',
2300             PrintConv => {
2301             0 => 'Shutter Speed',
2302             1 => 'Aperture',
2303             },
2304             },
2305             0x47 => { #20
2306             Name => 'ExposureCompensationMode',
2307             PrintConv => {
2308             0 => 'Ambient and Flash',
2309             1 => 'Ambient Only',
2310             },
2311             },
2312             0x48 => { #20
2313             Name => 'AFAssist',
2314             PrintConv => \%onOff,
2315             },
2316             0x49 => { #20
2317             Name => 'CardShutterLock',
2318             PrintConv => \%onOff,
2319             },
2320             0x4a => { #20
2321             Name => 'LensShutterLock',
2322             PrintConv => \%onOff,
2323             },
2324             0x4b => { #20
2325             Name => 'AFAreaIllumination',
2326             PrintConv => {
2327             0 => '0.3 s',
2328             1 => '0.6 s',
2329             2 => 'Off',
2330             },
2331             },
2332             0x4c => { #20
2333             Name => 'MonitorDisplayOff',
2334             PrintConv => {
2335             0 => 'Automatic',
2336             1 => 'Manual',
2337             },
2338             },
2339             0x4d => { #20
2340             Name => 'RecordDisplay',
2341             PrintConv => {
2342             0 => 'Auto Rotate',
2343             1 => 'Horizontal',
2344             },
2345             },
2346             0x4e => { #20
2347             Name => 'PlayDisplay',
2348             PrintConv => {
2349             0 => 'Auto Rotate',
2350             1 => 'Manual Rotate',
2351             },
2352             },
2353             0x50 => { #20
2354             Name => 'ExposureIndicator',
2355             SeparateTable => 'ExposureIndicator',
2356             PrintConv => \%exposureIndicator,
2357             },
2358             0x51 => { #20
2359             Name => 'AELExposureIndicator',
2360             Notes => 'also indicates exposure for next shot when bracketing',
2361             SeparateTable => 'ExposureIndicator',
2362             PrintConv => \%exposureIndicator,
2363             },
2364             0x52 => { #20
2365             Name => 'ExposureBracketingIndicatorLast',
2366             Notes => 'indicator for last shot when bracketing',
2367             SeparateTable => 'ExposureIndicator',
2368             PrintConv => \%exposureIndicator,
2369             },
2370             0x53 => { #20
2371             Name => 'MeteringOffScaleIndicator',
2372             Notes => 'two flashing triangles when under or over metering scale',
2373             PrintConv => {
2374             0 => 'Within Range',
2375             1 => 'Under/Over Range',
2376             255 => 'Out of Range',
2377             },
2378             },
2379             0x54 => { #20
2380             Name => 'FlashExposureIndicator',
2381             SeparateTable => 'ExposureIndicator',
2382             PrintConv => \%exposureIndicator,
2383             },
2384             0x55 => { #20
2385             Name => 'FlashExposureIndicatorNext',
2386             Notes => 'indicator for next shot when bracketing',
2387             SeparateTable => 'ExposureIndicator',
2388             PrintConv => \%exposureIndicator,
2389             },
2390             0x56 => { #20
2391             Name => 'FlashExposureIndicatorLast',
2392             Notes => 'indicator for last shot when bracketing',
2393             SeparateTable => 'ExposureIndicator',
2394             PrintConv => \%exposureIndicator,
2395             },
2396             0x58 => { #20
2397             Name => 'FocusModeSwitch',
2398             PrintConv => {
2399             0 => 'AF',
2400             1 => 'MF',
2401             },
2402             },
2403             0x59 => { #20
2404             Name => 'FlashType',
2405             PrintConv => {
2406             0 => 'Off',
2407             1 => 'Built-in', # (also when built-in flash is a trigger in wireless mode)
2408             2 => 'External',
2409             },
2410             },
2411             0x5a => { #15
2412             Name => 'Rotation',
2413             PrintConv => {
2414             0 => 'Horizontal (Normal)',
2415             1 => 'Rotate 270 CW',
2416             2 => 'Rotate 90 CW',
2417             },
2418             },
2419             0x5b => { #20
2420             Name => 'AELock',
2421             PrintConv => \%offOn,
2422             },
2423             0x57 => { #15
2424             Name => 'ImageStabilization',
2425             PrintConv => \%offOn,
2426             },
2427             0x5e => { #15
2428             Name => 'ColorTemperature',
2429             ValueConv => '$val * 100',
2430             ValueConvInv => '$val / 100',
2431             },
2432             0x5f => { #20
2433             Name => 'ColorCompensationFilter',
2434             Format => 'int16s',
2435             Notes => 'ranges from -2 for green to +2 for magenta',
2436             },
2437             0x60 => { #20
2438             Name => 'BatteryState',
2439             PrintConv => {
2440             3 => 'Very Low',
2441             4 => 'Low',
2442             5 => 'Half Full',
2443             6 => 'Sufficient Power Remaining',
2444             },
2445             },
2446             );
2447              
2448             # white balance information stored by the Sony DSLR-A100 (ref 20)
2449             %Image::ExifTool::Minolta::WBInfoA100 = (
2450             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2451             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
2452             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
2453             NOTES => 'White balance information for the Sony DSLR-A100.',
2454             WRITABLE => 1,
2455             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2456             FIRST_ENTRY => 0,
2457             PRIORITY => 0,
2458             0x0e => {
2459             Name => 'DriveMode',
2460             PrintConv => {
2461             0 => 'Self-timer 10 sec',
2462             1 => 'Continuous',
2463             2 => 'Single-frame Exposure Bracketing',
2464             3 => 'Continuous Exposure Bracketing',
2465             4 => 'Self-Timer 2 sec',
2466             5 => 'Single Frame',
2467             8 => 'White Balance Bracketing Low',
2468             9 => 'White Balance Bracketing High',
2469             },
2470             },
2471             0x10 => {
2472             Name => 'Rotation',
2473             PrintConv => {
2474             0 => 'Horizontal (normal)',
2475             1 => 'Rotate 270 CW',
2476             2 => 'Rotate 90 CW',
2477             },
2478             },
2479             0x14 => {
2480             Name => 'ImageStabilizationSetting',
2481             PrintConv => { 0 => 'Off', 1 => 'On' },
2482             },
2483             0x15 => {
2484             Name => 'DynamicRangeOptimizerMode',
2485             PrintConv => {
2486             0 => 'Off',
2487             1 => 'Standard',
2488             2 => 'Advanced',
2489             },
2490             },
2491             0x2a => {
2492             Name => 'ExposureCompensationMode',
2493             PrintConv => {
2494             0 => 'Ambient and Flash',
2495             1 => 'Ambient Only',
2496             },
2497             },
2498             0x2b => 'WBBracketShotNumber',
2499             0x2c => {
2500             Name => 'WhiteBalanceBracketing',
2501             PrintConv => {
2502             0 => 'Off',
2503             1 => 'Low',
2504             2 => 'High',
2505             },
2506             },
2507             0x2d => 'ExposureBracketShotNumber',
2508             0x31 => {
2509             Name => 'FlashFunction',
2510             Format => 'int16u',
2511             PrintHex => 1,
2512             PrintConv => {
2513             0x0000 => 'No flash',
2514             0x0300 => 'Built-in flash',
2515             # (the following refers to an external flash)
2516             0x1205 => 'Manual',
2517             0x120e => 'Strobe',
2518             #0x122e => ?
2519             0x128e => 'Fill flash, Pre-flash TTL',
2520             0x12ae => 'Bounce flash',
2521             0x140e => 'Rear sync, ADI',
2522             0x148e => 'Fill flash, ADI',
2523             0x1580 => 'Wireless',
2524             # 0x17ae => ?
2525             0x178e => 'HSS',
2526             },
2527             },
2528             0x34 => {
2529             Name => 'ExposureMode',
2530             Format => 'int16u',
2531             PrintHex => 1,
2532             PrintConvColumns => 2,
2533             PrintConv => {
2534             0x0000 => 'Program',
2535             0x0001 => 'Aperture Priority',
2536             0x0002 => 'Shutter Priority',
2537             0x0003 => 'Manual',
2538             0x0004 => 'Auto',
2539             0x0005 => 'Program Shift A',
2540             0x0006 => 'Program Shift S',
2541             0x1013 => 'Portrait',
2542             0x1023 => 'Sports',
2543             0x1033 => 'Sunset',
2544             0x1043 => 'Night View/Portrait',
2545             0x1053 => 'Landscape',
2546             0x1083 => 'Macro',
2547             },
2548             },
2549             0x36 => {
2550             Name => 'ColorMode',
2551             Format => 'int16u',
2552             PrintConv => {
2553             0x00 => 'Standard',
2554             0x01 => 'Vivid',
2555             0x02 => 'Portrait',
2556             0x03 => 'Landscape',
2557             0x04 => 'Sunset',
2558             0x05 => 'Night View',
2559             0x07 => 'B&W',
2560             0x08 => 'Adobe RGB',
2561             },
2562             },
2563             0x38 => {
2564             Name => 'AverageLV',
2565             Format => 'int16u',
2566             Notes => 'arithmetic mean of the readings from the 40 honeycomb segments',
2567             ValueConv => '($val-106)/8',
2568             ValueConvInv => '$val * 8 + 106',
2569             },
2570             # 0x3a - int16u: Approx FocusDistance in metres (0x0f50=inf)
2571             0x3c => {
2572             Name => 'FrameNumber',
2573             # Numbers > 1 appear in continuous and continuous bracketing drive modes,
2574             # as well as WB bracketing.
2575             },
2576             0x96 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
2577             0xae => { Name => 'WB_GBRGLevels', Format => 'int16u[4]' },
2578             0xc0 => {
2579             Name => 'WB_RedLevelsTungsten',
2580             Notes => '7 values for adjustments of -3 through +3',
2581             Format => 'int16u[7]',
2582             },
2583             0xce => { Name => 'WB_BlueLevelsTungsten', Format => 'int16u[7]' },
2584             0xdc => { Name => 'WB_RedLevelsDaylight', Format => 'int16u[7]' },
2585             0xea => { Name => 'WB_BlueLevelsDaylight', Format => 'int16u[7]' },
2586             0xf8 => { Name => 'WB_RedLevelsCloudy', Format => 'int16u[7]' },
2587             0x106 => { Name => 'WB_BlueLevelsCloudy', Format => 'int16u[7]' },
2588             0x114 => { Name => 'WB_RedLevelsFlash', Format => 'int16u[7]' },
2589             0x122 => { Name => 'WB_BlueLevelsFlash', Format => 'int16u[7]' },
2590             0x14c => {
2591             Name => 'WB_RedLevelsFluorescent',
2592             Format => 'int16u[7]',
2593             Notes => q{
2594             white balance red presets for fluorescent -2 through +4: -2=Fluorescent,
2595             -1=WhiteFluorescent, 0=CoolWhiteFluorescent, +1=DayWhiteFluorescent and
2596             +3=DaylightFluorescent
2597             },
2598             },
2599             0x15a => { Name => 'WB_BlueLevelsFluorescent', Format => 'int16u[7]' },
2600             0x168 => { Name => 'WB_RedLevelsShade', Format => 'int16u[7]' },
2601             0x176 => { Name => 'WB_BlueLevelsShade', Format => 'int16u[7]' },
2602             0x188 => { Name => 'WB_RedLevel6500K', Format => 'int16u' },
2603             0x18a => { Name => 'WB_BlueLevel6500K', Format => 'int16u' },
2604             0x18c => { Name => 'WB_RedLevelCustom', Format => 'int16u' },
2605             0x18e => { Name => 'WB_BlueLevelCustom', Format => 'int16u' },
2606             0x198 => { Name => 'WB_RedLevel3500K', Format => 'int16u' },
2607             0x19a => { Name => 'WB_BlueLevel3500K', Format => 'int16u' },
2608             0x1be => {
2609             Name => 'WB_RedLevelsKelvin',
2610             Format => 'int16u[75]',
2611             Notes => 'values for 2500-9900 K, in increments of 100 K',
2612             },
2613             0x254 => { Name => 'WB_BlueLevelsKelvin', Format => 'int16u[75]' },
2614             0x304 => { Name => 'WB_RBLevelsFlash', Format => 'int16u[2]' },
2615             0x308 => { Name => 'WB_RBLevelsCoolWhiteF', Format => 'int16u[2]' },
2616             0x3e8 => { Name => 'WB_RBLevelsTungsten', Format => 'int16u[2]' },
2617             0x3ec => { Name => 'WB_RBLevelsDaylight', Format => 'int16u[2]' },
2618             0x3f0 => { Name => 'WB_RBLevelsCloudy', Format => 'int16u[2]' },
2619             0x3f4 => { Name => 'WB_RBLevelsFlash', Format => 'int16u[2]' },
2620             0x3fc => { Name => 'WB_RedLevelsFluorescent', Format => 'int16u[7]' },
2621             0x40a => { Name => 'WB_BlueLevelsFluorescent', Format => 'int16u[7]' },
2622             0x418 => { Name => 'WB_RBLevelsShade', Format => 'int16u[2]' },
2623             0x420 => { Name => 'WB_RBLevels6500K', Format => 'int16u[2]' },
2624             0x424 => { Name => 'WB_RBLevelsCustom', Format => 'int16u[2]' },
2625             0x430 => { Name => 'WB_RBLevels3500K', Format => 'int16u[2]' },
2626             0x528 => { Name => 'WB_RBLevelsDaylight', Format => 'int16u[2]' },
2627             0x546 => { Name => 'WB_RGBLevels', Format => 'int16u[3]' },
2628             0x628 => {
2629             Name => 'AEMeteringSegments',
2630             Format => 'int8u[40]',
2631             Notes => q{
2632             metering values from the 40 honeycomb segments, converted to LV. The first
2633             value is for the outer cell, then the values are given row by row, from top
2634             to bottom, with each row scanned left-to-right. The 21st value is the
2635             middle cell, which gives the spot metering
2636             },
2637             ValueConv => sub { join ' ', map( { ($_ - 106) / 8 } split(' ',$_[0]) ) },
2638             ValueConvInv => sub { join ' ', map( { int($_ * 8 + 106.5) } split(' ',$_[0]) ) },
2639             },
2640             0x690 => {
2641             Name => 'MeasuredLV',
2642             Notes => 'measured light value based on MeteringMode',
2643             ValueConv => '($val-106)/8',
2644             ValueConvInv => '$val * 8 + 106',
2645             },
2646             0x691 => {
2647             Name => 'BrightnessValue',
2648             ValueConv => '($val-106)/8',
2649             ValueConvInv => '$val * 8 + 106',
2650             },
2651             # 0x87f - int8u: 33mm Equivalent magnification (FocusDistance = (1.5 * $val + 1) * FocalLength) (255=inf)
2652             0x104c => { # (9600 bytes: 4 sets of 40x30 int16u values in the range 0-8191)
2653             Name => 'TiffMeteringImage',
2654             Format => 'undef[9600]',
2655             Notes => q{
2656             13-bit RBGG (?) 40x30 pixels, presumably metering info, converted to a 16-bit
2657             TIFF image;
2658             },
2659             ValueConv => sub {
2660             my ($val, $et) = @_;
2661             return undef unless length $val >= 9600;
2662             return \ "Binary data 7404 bytes" unless $et->Options('Binary');
2663             my @dat = unpack('n*', $val); # for Big-endian
2664             # TIFF header for a 16-bit RGB 10dpi 40x30 image
2665             $val = Image::ExifTool::MakeTiffHeader(40,30,3,16,10);
2666             # re-order data to RGB pixels
2667             my ($i, @val);
2668             for ($i=0; $i<40*30; ++$i) {
2669             # data is 13-bit (max 8191), shift left to fill 16 bits
2670             # (typically, this gives a very dark image since the data should
2671             # really be anti-logged to convert from EV to perceived brightness)
2672             # push @val, $dat[$i]<<3, $dat[$i+2400]<<3, $dat[$i+1200]<<3;
2673             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));
2674             }
2675             $val .= pack('v*', @val); # add TIFF strip data
2676             return \$val;
2677             },
2678             },
2679             0x49b8 => {
2680             Name => 'ExposureTime',
2681             ValueConv => '$val ? 2 ** (6 - $val/8) : 0',
2682             ValueConvInv => '$val ? int((6 - log($val) / log(2)) * 8 + 0.5) : 0',
2683             PrintConv => '$val ? Image::ExifTool::Exif::PrintExposureTime($val) : "Bulb"',
2684             PrintConvInv => 'lc($val) eq "bulb" ? 0 : Image::ExifTool::Exif::ConvertFraction($val)',
2685             },
2686             0x49ba => {
2687             Name => 'ISO',
2688             ValueConv => '2 ** (($val-48)/8) * 100',
2689             ValueConvInv => '48 + 8*log($val/100)/log(2)',
2690             PrintConv => 'int($val + 0.5)',
2691             PrintConvInv => '$val',
2692             },
2693             0x49bb => { # (https://exiftool.org/forum/index.php/topic,3688.0.html)
2694             # if this value is the 35mm equivalent magnification, then the formula could
2695             # be (1.5 * 2**($val/16-5)+1) * FocalLength, but this tends to underestimate
2696             # distance by about 18% (ref 20) (255=inf)
2697             Name => 'FocusDistance',
2698             ValueConv => '2**(($val-126)/16)',
2699             ValueConvInv => 'log($val)/log(2)*16+126',
2700             PrintConv => '$val > 266 ? "inf" : sprintf("%.2f m", $val)',
2701             PrintConvInv => '$val=~s/ ?m//; $val=~/inf/i ? 267 : $val',
2702             },
2703             0x49bd => {
2704             Name => 'LensType',
2705             Format => 'int16uRev',
2706             SeparateTable => 1,
2707             ValueConvInv => 'int($val)', # (must truncate decimal part)
2708             PrintConv => \%minoltaLensTypes,
2709             PrintInt => 1,
2710             },
2711             0x49c0 => {
2712             Name => 'ExposureCompensation', # (in exposure bracketing, this is the actual value used)
2713             Format => 'int8s',
2714             ValueConv => '$val / 8',
2715             ValueConvInv => '$val * 8',
2716             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2717             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2718             },
2719             0x49c1 => {
2720             Name => 'FlashExposureComp',
2721             Description => 'Flash Exposure Compensation',
2722             Format => 'int8s',
2723             ValueConv => '$val / 8',
2724             ValueConvInv => '$val * 8',
2725             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2726             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2727             },
2728             0x49c2 => {
2729             Name => 'ImageStabilization',
2730             PrintConv => \%offOn,
2731             },
2732             0x49c3 => {
2733             Name => 'BrightnessValue',
2734             ValueConv => '($val-106)/8',
2735             ValueConvInv => '$val * 8 + 106',
2736             },
2737             0x49c5 => {
2738             Name => 'MaxAperture',
2739             ValueConv => '2 ** (($val-8)/16)',
2740             ValueConvInv => '8 + 16*log($val)/log(2)',
2741             PrintConv => 'sprintf("%.1f",$val)',
2742             PrintConvInv => '$val',
2743             },
2744             # 0x49c6 - gives focal length using same formula as 0x49bb
2745             0x49c7 => {
2746             Name => 'FNumber',
2747             ValueConv => '2 ** (($val-8)/16)',
2748             ValueConvInv => '8 + 16*log($val)/log(2)',
2749             PrintConv => 'sprintf("%.1f",$val)',
2750             PrintConvInv => '$val',
2751             },
2752             0x49dc => {
2753             Name => 'InternalSerialNumber',
2754             Format => 'string[12]',
2755             },
2756             );
2757              
2758             # tags in Konica Minolta MOV videos (ref PH)
2759             # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
2760             %Image::ExifTool::Minolta::MOV1 = (
2761             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2762             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2763             FIRST_ENTRY => 0,
2764             NOTES => q{
2765             This information is found in MOV videos from some Konica Minolta models such
2766             as the DiMage Z10 and X50.
2767             },
2768             0 => {
2769             Name => 'Make',
2770             Format => 'string[32]',
2771             },
2772             0x20 => {
2773             Name => 'ModelType',
2774             Format => 'string[8]',
2775             },
2776             # (01 00 at offset 0x28)
2777             0x2e => {
2778             Name => 'ExposureTime',
2779             Format => 'int32u',
2780             ValueConv => '$val ? 10 / $val : 0',
2781             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2782             },
2783             0x32 => {
2784             Name => 'FNumber',
2785             Format => 'rational64u',
2786             PrintConv => 'sprintf("%.1f",$val)',
2787             },
2788             0x3a => {
2789             Name => 'ExposureCompensation',
2790             Format => 'rational64s',
2791             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
2792             },
2793             # 0x4c => 'WhiteBalance', ?
2794             0x50 => {
2795             Name => 'FocalLength',
2796             Format => 'rational64u',
2797             PrintConv => 'sprintf("%.1f mm",$val)',
2798             },
2799             );
2800              
2801             # tags in Minolta MOV videos (ref PH)
2802             # (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
2803             %Image::ExifTool::Minolta::MOV2 = (
2804             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2805             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2806             FIRST_ENTRY => 0,
2807             NOTES => q{
2808             This information is found in MOV videos from some Minolta models such as the
2809             DiMAGE X and Xt.
2810             },
2811             0 => {
2812             Name => 'Make',
2813             Format => 'string[32]',
2814             },
2815             0x18 => {
2816             Name => 'ModelType',
2817             Format => 'string[8]',
2818             },
2819             # (01 00 at offset 0x20)
2820             0x26 => {
2821             Name => 'ExposureTime',
2822             Format => 'int32u',
2823             ValueConv => '$val ? 10 / $val : 0',
2824             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2825             },
2826             0x2a => {
2827             Name => 'FNumber',
2828             Format => 'rational64u',
2829             PrintConv => 'sprintf("%.1f",$val)',
2830             },
2831             0x32 => {
2832             Name => 'ExposureCompensation',
2833             Format => 'rational64s',
2834             PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
2835             },
2836             # 0x44 => 'WhiteBalance', ?
2837             0x48 => {
2838             Name => 'FocalLength',
2839             Format => 'rational64u',
2840             PrintConv => 'sprintf("%.1f mm",$val)',
2841             },
2842             );
2843              
2844             # more tags in Minolta MOV videos (ref PH)
2845             %Image::ExifTool::Minolta::MMA = (
2846             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2847             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2848             NOTES => q{
2849             This information is found in MOV videos from Minolta models such as the
2850             DiMAGE A2, S414 and 7Hi.
2851             },
2852             0 => {
2853             Name => 'Make',
2854             Format => 'string[20]',
2855             },
2856             20 => {
2857             Name => 'SoftwareVersion',
2858             Format => 'string[16]',
2859             },
2860             );
2861              
2862             # basic Minolta white balance lookup
2863             my %minoltaWhiteBalance = (
2864             0 => 'Auto',
2865             1 => 'Daylight',
2866             2 => 'Cloudy',
2867             3 => 'Tungsten',
2868             5 => 'Custom',
2869             7 => 'Fluorescent',
2870             8 => 'Fluorescent 2',
2871             11 => 'Custom 2',
2872             12 => 'Custom 3',
2873             # the following come from tests with the A2 (ref 2)
2874             0x0800000 => 'Auto',
2875             0x1800000 => 'Daylight',
2876             0x2800000 => 'Cloudy',
2877             0x3800000 => 'Tungsten',
2878             0x4800000 => 'Flash',
2879             0x5800000 => 'Fluorescent',
2880             0x6800000 => 'Shade',
2881             0x7800000 => 'Custom1',
2882             0x8800000 => 'Custom2',
2883             0x9800000 => 'Custom3',
2884             );
2885              
2886             #------------------------------------------------------------------------------
2887             # PrintConv for Minolta white balance
2888             sub ConvertWhiteBalance($)
2889             {
2890 3     3 0 9 my $val = shift;
2891 3         10 my $printConv = $minoltaWhiteBalance{$val};
2892 3 50       13 unless (defined $printConv) {
2893 0 0       0 if ($val & 0xffff0000) {
2894             # the A2 values can be shifted by +- 3 settings, where
2895             # each setting adds or subtracts 0x0010000 (ref 2)
2896 0         0 my $type = ($val & 0xff000000) + 0x800000;
2897 0 0       0 if ($minoltaWhiteBalance{$type}) {
2898 0         0 $printConv = $minoltaWhiteBalance{$type} .
2899             sprintf("%+.8g", ($val - $type) / 0x10000);
2900             } else {
2901 0         0 $printConv = sprintf("Unknown (0x%x)", $val);
2902             }
2903             } else {
2904 0         0 $printConv = sprintf("Unknown ($val)");
2905             }
2906             }
2907 3         20 return $printConv;
2908             }
2909              
2910             1; # end
2911              
2912             __END__