source: main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Olympus.pm@ 34921

Last change on this file since 34921 was 34921, checked in by anupama, 3 years ago

Committing the improvements to EmbeddedMetaPlugin's processing of Keywords vs other metadata fields. Keywords were literally stored as arrays of words rather than phrases in PDFs (at least in Diego's sample PDF), whereas other meta fields like Subjects and Creators stored them as arrays of phrases. To get both to work, Kathy updated EXIF to a newer version, to retrieve the actual EXIF values stored in the PDF. And Kathy and Dr Bainbridge came up with a new option that I added called apply_join_before_split_to_metafields that's a regex which can list the metadata fields to apply the join_before_split to and whcih previously always got applied to all metadata fields. Now it's applied to any *Keywords metafields by default, as that's the metafield we have experience of that behaves differently to the others, as it stores by word instead of phrases. Tested on Diego's sample PDF. Diego has double-checked it to works on his sample PDF too, setting the split char to ; and turning on the join_before_split and leaving apply_join_before_split_to_metafields at its default of .*Keywords. File changes are strings.properties for the tooltip, the plugin introducing the option and working with it and Kathy's EXIF updates affecting cpan/File and cpan/Image.

File size: 139.5 KB
Line 
1#------------------------------------------------------------------------------
2# File: Olympus.pm
3#
4# Description: Olympus/Epson EXIF maker notes tags
5#
6# Revisions: 12/09/2003 - P. Harvey Created
7# 11/11/2004 - P. Harvey Added Epson support
8#
9# References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
10# 2) http://www.cybercom.net/~dcoffin/dcraw/
11# 3) http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html
12# 4) Markku Hanninen private communication (tests with E-1)
13# 5) Remi Guyomarch from http://forums.dpreview.com/forums/read.asp?forum=1022&message=12790396
14# 6) Frank Ledwon private communication (tests with E/C-series cameras)
15# 7) Michael Meissner private communication
16# 8) Shingo Noguchi, PhotoXP (http://www.daifukuya.com/photoxp/)
17# 9) Mark Dapoz private communication
18# 10) Lilo Huang private communication (E-330)
19# 11) http://olypedia.de/Olympus_Makernotes (May 30, 2013)
20# 12) Ioannis Panagiotopoulos private communication (E-510)
21# 13) Chris Shaw private communication (E-3)
22# 14) Viktor Lushnikov private communication (E-400)
23# 15) Yrjo Rauste private communication (E-30)
24# 16) Godfrey DiGiorgi private communication (E-P1) + http://forums.dpreview.com/forums/read.asp?message=33187567
25# 17) Martin Hibers private communication
26# 18) Tomasz Kawecki private communication
27# 19) Brad Grier private communication
28# 22) Herbert Kauer private communication
29# 23) Daniel Pollock private communication (PEN-F)
30# 24) Sebastian private communication (E-M1 Mark III)
31# IB) Iliah Borg private communication (LibRaw)
32# NJ) Niels Kristian Bech Jensen private communication
33#------------------------------------------------------------------------------
34
35package Image::ExifTool::Olympus;
36
37use strict;
38use vars qw($VERSION);
39use Image::ExifTool qw(:DataAccess :Utils);
40use Image::ExifTool::Exif;
41use Image::ExifTool::APP12;
42
43$VERSION = '2.70';
44
45sub PrintLensInfo($$$);
46
47my %offOn = ( 0 => 'Off', 1 => 'On' );
48
49# lookup for Olympus LensType values
50# (as of ExifTool 9.15, this was the complete list of chipped lenses at www.four-thirds.org)
51my %olympusLensTypes = (
52 Notes => q{
53 The numerical values below are given in hexadecimal. (Prior to ExifTool
54 9.15 these were in decimal.)
55 },
56 '0 00 00' => 'None',
57 # Olympus lenses (also Kenko Tokina)
58 '0 01 00' => 'Olympus Zuiko Digital ED 50mm F2.0 Macro',
59 '0 01 01' => 'Olympus Zuiko Digital 40-150mm F3.5-4.5', #8
60 '0 01 10' => 'Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6', #PH (E-P1 pre-production)
61 '0 02 00' => 'Olympus Zuiko Digital ED 150mm F2.0',
62 '0 02 10' => 'Olympus M.Zuiko Digital 17mm F2.8 Pancake', #PH (E-P1 pre-production)
63 '0 03 00' => 'Olympus Zuiko Digital ED 300mm F2.8',
64 '0 03 10' => 'Olympus M.Zuiko Digital ED 14-150mm F4.0-5.6 [II]', #11 (The second version of this lens seems to have the same lens ID number as the first version #NJ)
65 '0 04 10' => 'Olympus M.Zuiko Digital ED 9-18mm F4.0-5.6', #11
66 '0 05 00' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5',
67 '0 05 01' => 'Olympus Zuiko Digital Pro ED 90-250mm F2.8', #9
68 '0 05 10' => 'Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6 L', #11 (E-PL1)
69 '0 06 00' => 'Olympus Zuiko Digital ED 50-200mm F2.8-3.5',
70 '0 06 01' => 'Olympus Zuiko Digital ED 8mm F3.5 Fisheye', #9
71 '0 06 10' => 'Olympus M.Zuiko Digital ED 40-150mm F4.0-5.6', #PH
72 '0 07 00' => 'Olympus Zuiko Digital 11-22mm F2.8-3.5',
73 '0 07 01' => 'Olympus Zuiko Digital 18-180mm F3.5-6.3', #6
74 '0 07 10' => 'Olympus M.Zuiko Digital ED 12mm F2.0', #PH
75 '0 08 01' => 'Olympus Zuiko Digital 70-300mm F4.0-5.6', #7 (seen as release 1 - PH)
76 '0 08 10' => 'Olympus M.Zuiko Digital ED 75-300mm F4.8-6.7', #PH
77 '0 09 10' => 'Olympus M.Zuiko Digital 14-42mm F3.5-5.6 II', #PH (E-PL2)
78 '0 10 01' => 'Kenko Tokina Reflex 300mm F6.3 MF Macro', #NJ
79 '0 10 10' => 'Olympus M.Zuiko Digital ED 12-50mm F3.5-6.3 EZ', #PH
80 '0 11 10' => 'Olympus M.Zuiko Digital 45mm F1.8', #17
81 '0 12 10' => 'Olympus M.Zuiko Digital ED 60mm F2.8 Macro', #NJ
82 '0 13 10' => 'Olympus M.Zuiko Digital 14-42mm F3.5-5.6 II R', #PH/NJ
83 '0 14 10' => 'Olympus M.Zuiko Digital ED 40-150mm F4.0-5.6 R', #19
84 # '0 14 10.1' => 'Olympus M.Zuiko Digital ED 14-150mm F4.0-5.6 II', #11 (questionable & unconfirmed -- all samples I can find are '0 3 10' - PH)
85 '0 15 00' => 'Olympus Zuiko Digital ED 7-14mm F4.0',
86 '0 15 10' => 'Olympus M.Zuiko Digital ED 75mm F1.8', #PH
87 '0 16 10' => 'Olympus M.Zuiko Digital 17mm F1.8', #NJ
88 '0 17 00' => 'Olympus Zuiko Digital Pro ED 35-100mm F2.0', #7
89 '0 18 00' => 'Olympus Zuiko Digital 14-45mm F3.5-5.6',
90 '0 18 10' => 'Olympus M.Zuiko Digital ED 75-300mm F4.8-6.7 II', #NJ
91 '0 19 10' => 'Olympus M.Zuiko Digital ED 12-40mm F2.8 Pro', #PH
92 '0 20 00' => 'Olympus Zuiko Digital 35mm F3.5 Macro', #9
93 '0 20 10' => 'Olympus M.Zuiko Digital ED 40-150mm F2.8 Pro', #NJ
94 '0 21 10' => 'Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6 EZ', #NJ
95 '0 22 00' => 'Olympus Zuiko Digital 17.5-45mm F3.5-5.6', #9
96 '0 22 10' => 'Olympus M.Zuiko Digital 25mm F1.8', #NJ
97 '0 23 00' => 'Olympus Zuiko Digital ED 14-42mm F3.5-5.6', #PH
98 '0 23 10' => 'Olympus M.Zuiko Digital ED 7-14mm F2.8 Pro', #NJ
99 '0 24 00' => 'Olympus Zuiko Digital ED 40-150mm F4.0-5.6', #PH
100 '0 24 10' => 'Olympus M.Zuiko Digital ED 300mm F4.0 IS Pro', #NJ
101 '0 25 10' => 'Olympus M.Zuiko Digital ED 8mm F1.8 Fisheye Pro', #NJ
102 '0 26 10' => 'Olympus M.Zuiko Digital ED 12-100mm F4.0 IS Pro', #IB/NJ
103 '0 27 10' => 'Olympus M.Zuiko Digital ED 30mm F3.5 Macro', #IB/NJ
104 '0 28 10' => 'Olympus M.Zuiko Digital ED 25mm F1.2 Pro', #IB/NJ
105 '0 29 10' => 'Olympus M.Zuiko Digital ED 17mm F1.2 Pro', #IB
106 '0 30 00' => 'Olympus Zuiko Digital ED 50-200mm F2.8-3.5 SWD', #7
107 '0 30 10' => 'Olympus M.Zuiko Digital ED 45mm F1.2 Pro', #IB
108 '0 31 00' => 'Olympus Zuiko Digital ED 12-60mm F2.8-4.0 SWD', #7
109 '0 32 00' => 'Olympus Zuiko Digital ED 14-35mm F2.0 SWD', #PH
110 '0 32 10' => 'Olympus M.Zuiko Digital ED 12-200mm F3.5-6.3', #IB
111 '0 33 00' => 'Olympus Zuiko Digital 25mm F2.8', #PH
112 '0 33 10' => 'Olympus M.Zuiko Digital 150-400mm F4.5 TC1.25x IS Pro', #IB
113 '0 34 00' => 'Olympus Zuiko Digital ED 9-18mm F4.0-5.6', #7
114 '0 34 10' => 'Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro', #IB
115 '0 35 00' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5 II', #PH
116 # Sigma lenses
117 '1 01 00' => 'Sigma 18-50mm F3.5-5.6 DC', #8
118 '1 01 10' => 'Sigma 30mm F2.8 EX DN', #NJ
119 '1 02 00' => 'Sigma 55-200mm F4.0-5.6 DC',
120 '1 02 10' => 'Sigma 19mm F2.8 EX DN', #NJ
121 '1 03 00' => 'Sigma 18-125mm F3.5-5.6 DC',
122 '1 03 10' => 'Sigma 30mm F2.8 DN | A', #NJ
123 '1 04 00' => 'Sigma 18-125mm F3.5-5.6 DC', #7
124 '1 04 10' => 'Sigma 19mm F2.8 DN | A', #NJ
125 '1 05 00' => 'Sigma 30mm F1.4 EX DC HSM', #10
126 '1 05 10' => 'Sigma 60mm F2.8 DN | A', #NJ
127 '1 06 00' => 'Sigma APO 50-500mm F4.0-6.3 EX DG HSM', #6
128 '1 06 10' => 'Sigma 30mm F1.4 DC DN | C', #NJ
129 '1 07 00' => 'Sigma Macro 105mm F2.8 EX DG', #PH
130 '1 07 10' => 'Sigma 16mm F1.4 DC DN | C (017)', #IB
131 '1 08 00' => 'Sigma APO Macro 150mm F2.8 EX DG HSM', #PH
132 '1 09 00' => 'Sigma 18-50mm F2.8 EX DC Macro', #NJ
133 '1 10 00' => 'Sigma 24mm F1.8 EX DG Aspherical Macro', #PH
134 '1 11 00' => 'Sigma APO 135-400mm F4.5-5.6 DG', #11
135 '1 12 00' => 'Sigma APO 300-800mm F5.6 EX DG HSM', #11
136 '1 13 00' => 'Sigma 30mm F1.4 EX DC HSM', #11
137 '1 14 00' => 'Sigma APO 50-500mm F4.0-6.3 EX DG HSM', #11
138 '1 15 00' => 'Sigma 10-20mm F4.0-5.6 EX DC HSM', #11
139 '1 16 00' => 'Sigma APO 70-200mm F2.8 II EX DG Macro HSM', #11
140 '1 17 00' => 'Sigma 50mm F1.4 EX DG HSM', #11
141 '1 18 60' => 'Test',
142 # Panasonic/Leica lenses
143 '2 01 00' => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.', #11
144 '2 01 10' => 'Lumix G Vario 14-45mm F3.5-5.6 Asph. Mega OIS', #16
145 '2 02 00' => 'Leica D Summilux 25mm F1.4 Asph.', #11
146 '2 02 10' => 'Lumix G Vario 45-200mm F4.0-5.6 Mega OIS', #16
147 '2 03 00' => 'Leica D Vario Elmar 14-50mm F3.8-5.6 Asph. Mega OIS', #11
148 '2 03 01' => 'Leica D Vario Elmar 14-50mm F3.8-5.6 Asph.', #14 (L10 kit)
149 '2 03 10' => 'Lumix G Vario HD 14-140mm F4.0-5.8 Asph. Mega OIS', #16
150 '2 04 00' => 'Leica D Vario Elmar 14-150mm F3.5-5.6', #13
151 '2 04 10' => 'Lumix G Vario 7-14mm F4.0 Asph.', #PH (E-P1 pre-production)
152 '2 05 10' => 'Lumix G 20mm F1.7 Asph.', #16
153 '2 06 10' => 'Leica DG Macro-Elmarit 45mm F2.8 Asph. Mega OIS', #PH
154 '2 07 10' => 'Lumix G Vario 14-42mm F3.5-5.6 Asph. Mega OIS', #NJ
155 '2 08 10' => 'Lumix G Fisheye 8mm F3.5', #PH
156 '2 09 10' => 'Lumix G Vario 100-300mm F4.0-5.6 Mega OIS', #11
157 '2 10 10' => 'Lumix G 14mm F2.5 Asph.', #17
158 '2 11 10' => 'Lumix G 12.5mm F12 3D', #NJ (H-FT012)
159 '2 12 10' => 'Leica DG Summilux 25mm F1.4 Asph.', #NJ
160 '2 13 10' => 'Lumix G X Vario PZ 45-175mm F4.0-5.6 Asph. Power OIS', #NJ
161 '2 14 10' => 'Lumix G X Vario PZ 14-42mm F3.5-5.6 Asph. Power OIS', #NJ
162 '2 15 10' => 'Lumix G X Vario 12-35mm F2.8 Asph. Power OIS', #PH
163 '2 16 10' => 'Lumix G Vario 45-150mm F4.0-5.6 Asph. Mega OIS', #NJ
164 '2 17 10' => 'Lumix G X Vario 35-100mm F2.8 Power OIS', #PH
165 '2 18 10' => 'Lumix G Vario 14-42mm F3.5-5.6 II Asph. Mega OIS', #NJ
166 '2 19 10' => 'Lumix G Vario 14-140mm F3.5-5.6 Asph. Power OIS', #NJ
167 '2 20 10' => 'Lumix G Vario 12-32mm F3.5-5.6 Asph. Mega OIS', #NJ
168 '2 21 10' => 'Leica DG Nocticron 42.5mm F1.2 Asph. Power OIS', #NJ
169 '2 22 10' => 'Leica DG Summilux 15mm F1.7 Asph.', #NJ
170 '2 23 10' => 'Lumix G Vario 35-100mm F4.0-5.6 Asph. Mega OIS', #NJ
171 '2 24 10' => 'Lumix G Macro 30mm F2.8 Asph. Mega OIS', #NJ
172 '2 25 10' => 'Lumix G 42.5mm F1.7 Asph. Power OIS', #NJ
173 '2 26 10' => 'Lumix G 25mm F1.7 Asph.', #NJ
174 '2 27 10' => 'Leica DG Vario-Elmar 100-400mm F4.0-6.3 Asph. Power OIS', #NJ
175 '2 28 10' => 'Lumix G Vario 12-60mm F3.5-5.6 Asph. Power OIS', #NJ
176 '2 29 10' => 'Leica DG Summilux 12mm F1.4 Asph.', #IB
177 '2 30 10' => 'Leica DG Vario-Elmarit 12-60mm F2.8-4 Asph. Power OIS', #IB
178 '2 31 10' => 'Lumix G Vario 45-200mm F4.0-5.6 II', #forum3833
179 '2 32 10' => 'Lumix G Vario 100-300mm F4.0-5.6 II', #PH
180 '2 33 10' => 'Lumix G X Vario 12-35mm F2.8 II Asph. Power OIS', #IB
181 '2 34 10' => 'Lumix G Vario 35-100mm F2.8 II', #forum3833
182 '2 35 10' => 'Leica DG Vario-Elmarit 8-18mm F2.8-4 Asph.', #IB
183 '2 36 10' => 'Leica DG Elmarit 200mm F2.8 Power OIS', #IB
184 '2 37 10' => 'Leica DG Vario-Elmarit 50-200mm F2.8-4 Asph. Power OIS', #IB
185 '2 38 10' => 'Leica DG Vario-Summilux 10-25mm F1.7 Asph.', #IB
186 '3 01 00' => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.', #11
187 '3 02 00' => 'Leica D Summilux 25mm F1.4 Asph.', #11
188 # Tamron lenses
189 '5 01 10' => 'Tamron 14-150mm F3.5-5.8 Di III', #NJ (model C001)
190 # '65535 07 40' - Seen for LUMIX S 16-35/F4 on Panasonic DC-S1H (ref PH)
191 # Other makes
192 '24 01 10' => 'Venus Optics Laowa 50mm F2.8 2x Macro', #DonKomarechka
193);
194
195# lookup for Olympus camera types (ref PH)
196my %olympusCameraTypes = (
197 Notes => q{
198 These values are currently decoded only for Olympus models. Models with
199 Olympus-style maker notes from other brands such as Acer, BenQ, Hitachi, HP,
200 Premier, Konica-Minolta, Maginon, Ricoh, Rollei, SeaLife, Sony, Supra,
201 Vivitar are not listed.
202 },
203 D4028 => 'X-2,C-50Z',
204 D4029 => 'E-20,E-20N,E-20P',
205 D4034 => 'C720UZ',
206 D4040 => 'E-1',
207 D4041 => 'E-300',
208 D4083 => 'C2Z,D520Z,C220Z',
209 D4106 => 'u20D,S400D,u400D',
210 D4120 => 'X-1',
211 D4122 => 'u10D,S300D,u300D',
212 D4125 => 'AZ-1',
213 D4141 => 'C150,D390',
214 D4193 => 'C-5000Z',
215 D4194 => 'X-3,C-60Z',
216 D4199 => 'u30D,S410D,u410D',
217 D4205 => 'X450,D535Z,C370Z',
218 D4210 => 'C160,D395',
219 D4211 => 'C725UZ',
220 D4213 => 'FerrariMODEL2003',
221 D4216 => 'u15D',
222 D4217 => 'u25D',
223 D4220 => 'u-miniD,Stylus V',
224 D4221 => 'u40D,S500,uD500',
225 D4231 => 'FerrariMODEL2004',
226 D4240 => 'X500,D590Z,C470Z',
227 D4244 => 'uD800,S800',
228 D4256 => 'u720SW,S720SW',
229 D4261 => 'X600,D630,FE5500',
230 D4262 => 'uD600,S600',
231 D4301 => 'u810/S810', # (yes, "/". Olympus is not consistent in the notation)
232 D4302 => 'u710,S710',
233 D4303 => 'u700,S700',
234 D4304 => 'FE100,X710',
235 D4305 => 'FE110,X705',
236 D4310 => 'FE-130,X-720',
237 D4311 => 'FE-140,X-725',
238 D4312 => 'FE150,X730',
239 D4313 => 'FE160,X735',
240 D4314 => 'u740,S740',
241 D4315 => 'u750,S750',
242 D4316 => 'u730/S730',
243 D4317 => 'FE115,X715',
244 D4321 => 'SP550UZ',
245 D4322 => 'SP510UZ',
246 D4324 => 'FE170,X760',
247 D4326 => 'FE200',
248 D4327 => 'FE190/X750', # (also SX876)
249 D4328 => 'u760,S760',
250 D4330 => 'FE180/X745', # (also SX875)
251 D4331 => 'u1000/S1000',
252 D4332 => 'u770SW,S770SW',
253 D4333 => 'FE240/X795',
254 D4334 => 'FE210,X775',
255 D4336 => 'FE230/X790',
256 D4337 => 'FE220,X785',
257 D4338 => 'u725SW,S725SW',
258 D4339 => 'FE250/X800',
259 D4341 => 'u780,S780',
260 D4343 => 'u790SW,S790SW',
261 D4344 => 'u1020,S1020',
262 D4346 => 'FE15,X10',
263 D4348 => 'FE280,X820,C520',
264 D4349 => 'FE300,X830',
265 D4350 => 'u820,S820',
266 D4351 => 'u1200,S1200',
267 D4352 => 'FE270,X815,C510',
268 D4353 => 'u795SW,S795SW',
269 D4354 => 'u1030SW,S1030SW',
270 D4355 => 'SP560UZ',
271 D4356 => 'u1010,S1010',
272 D4357 => 'u830,S830',
273 D4359 => 'u840,S840',
274 D4360 => 'FE350WIDE,X865',
275 D4361 => 'u850SW,S850SW',
276 D4362 => 'FE340,X855,C560',
277 D4363 => 'FE320,X835,C540',
278 D4364 => 'SP570UZ',
279 D4366 => 'FE330,X845,C550',
280 D4368 => 'FE310,X840,C530',
281 D4370 => 'u1050SW,S1050SW',
282 D4371 => 'u1060,S1060',
283 D4372 => 'FE370,X880,C575',
284 D4374 => 'SP565UZ',
285 D4377 => 'u1040,S1040',
286 D4378 => 'FE360,X875,C570',
287 D4379 => 'FE20,X15,C25',
288 D4380 => 'uT6000,ST6000',
289 D4381 => 'uT8000,ST8000',
290 D4382 => 'u9000,S9000',
291 D4384 => 'SP590UZ',
292 D4385 => 'FE3010,X895',
293 D4386 => 'FE3000,X890',
294 D4387 => 'FE35,X30',
295 D4388 => 'u550WP,S550WP',
296 D4390 => 'FE5000,X905',
297 D4391 => 'u5000',
298 D4392 => 'u7000,S7000',
299 D4396 => 'FE5010,X915',
300 D4397 => 'FE25,X20',
301 D4398 => 'FE45,X40',
302 D4401 => 'XZ-1',
303 D4402 => 'uT6010,ST6010',
304 D4406 => 'u7010,S7010 / u7020,S7020',
305 D4407 => 'FE4010,X930',
306 D4408 => 'X560WP',
307 D4409 => 'FE26,X21',
308 D4410 => 'FE4000,X920,X925',
309 D4411 => 'FE46,X41,X42',
310 D4412 => 'FE5020,X935',
311 D4413 => 'uTough-3000',
312 D4414 => 'StylusTough-6020',
313 D4415 => 'StylusTough-8010',
314 D4417 => 'u5010,S5010',
315 D4418 => 'u7040,S7040',
316 D4419 => 'u9010,S9010',
317 D4423 => 'FE4040',
318 D4424 => 'FE47,X43',
319 D4426 => 'FE4030,X950',
320 D4428 => 'FE5030,X965,X960',
321 D4430 => 'u7030,S7030',
322 D4432 => 'SP600UZ',
323 D4434 => 'SP800UZ',
324 D4439 => 'FE4020,X940',
325 D4442 => 'FE5035',
326 D4448 => 'FE4050,X970',
327 D4450 => 'FE5050,X985',
328 D4454 => 'u-7050',
329 D4464 => 'T10,X27',
330 D4470 => 'FE5040,X980',
331 D4472 => 'TG-310',
332 D4474 => 'TG-610',
333 D4476 => 'TG-810',
334 D4478 => 'VG145,VG140,D715',
335 D4479 => 'VG130,D710',
336 D4480 => 'VG120,D705',
337 D4482 => 'VR310,D720',
338 D4484 => 'VR320,D725',
339 D4486 => 'VR330,D730',
340 D4488 => 'VG110,D700',
341 D4490 => 'SP-610UZ',
342 D4492 => 'SZ-10',
343 D4494 => 'SZ-20',
344 D4496 => 'SZ-30MR',
345 D4498 => 'SP-810UZ',
346 D4500 => 'SZ-11',
347 D4504 => 'TG-615',
348 D4508 => 'TG-620',
349 D4510 => 'TG-820',
350 D4512 => 'TG-1',
351 D4516 => 'SH-21',
352 D4519 => 'SZ-14',
353 D4520 => 'SZ-31MR',
354 D4521 => 'SH-25MR',
355 D4523 => 'SP-720UZ',
356 D4529 => 'VG170',
357 D4531 => 'XZ-2',
358 D4535 => 'SP-620UZ',
359 D4536 => 'TG-320',
360 D4537 => 'VR340,D750',
361 D4538 => 'VG160,X990,D745',
362 D4541 => 'SZ-12',
363 D4545 => 'VH410',
364 D4546 => 'XZ-10', #IB
365 D4547 => 'TG-2',
366 D4548 => 'TG-830',
367 D4549 => 'TG-630',
368 D4550 => 'SH-50',
369 D4553 => 'SZ-16,DZ-105',
370 D4562 => 'SP-820UZ',
371 D4566 => 'SZ-15',
372 D4572 => 'STYLUS1',
373 D4574 => 'TG-3',
374 D4575 => 'TG-850',
375 D4579 => 'SP-100EE',
376 D4580 => 'SH-60',
377 D4581 => 'SH-1',
378 D4582 => 'TG-835',
379 D4585 => 'SH-2 / SH-3',
380 D4586 => 'TG-4',
381 D4587 => 'TG-860',
382 D4591 => 'TG-870',
383 D4593 => 'TG-5', #IB
384 D4603 => 'TG-6', #IB
385 D4809 => 'C2500L',
386 D4842 => 'E-10',
387 D4856 => 'C-1',
388 D4857 => 'C-1Z,D-150Z',
389 DCHC => 'D500L',
390 DCHT => 'D600L / D620L',
391 K0055 => 'AIR-A01',
392 S0003 => 'E-330',
393 S0004 => 'E-500',
394 S0009 => 'E-400',
395 S0010 => 'E-510',
396 S0011 => 'E-3',
397 S0013 => 'E-410',
398 S0016 => 'E-420',
399 S0017 => 'E-30',
400 S0018 => 'E-520',
401 S0019 => 'E-P1',
402 S0023 => 'E-620',
403 S0026 => 'E-P2',
404 S0027 => 'E-PL1',
405 S0029 => 'E-450',
406 S0030 => 'E-600',
407 S0032 => 'E-P3',
408 S0033 => 'E-5',
409 S0034 => 'E-PL2',
410 S0036 => 'E-M5',
411 S0038 => 'E-PL3',
412 S0039 => 'E-PM1',
413 S0040 => 'E-PL1s',
414 S0042 => 'E-PL5',
415 S0043 => 'E-PM2',
416 S0044 => 'E-P5',
417 S0045 => 'E-PL6',
418 S0046 => 'E-PL7', #IB
419 S0047 => 'E-M1',
420 S0051 => 'E-M10',
421 S0052 => 'E-M5MarkII', #IB
422 S0059 => 'E-M10MarkII',
423 S0061 => 'PEN-F', #forum7005
424 S0065 => 'E-PL8',
425 S0067 => 'E-M1MarkII',
426 S0068 => 'E-M10MarkIII',
427 S0076 => 'E-PL9', #IB
428 S0080 => 'E-M1X', #IB
429 S0085 => 'E-PL10', #IB
430 S0089 => 'E-M5MarkIII',
431 S0092 => 'E-M1MarkIII', #IB
432 SR45 => 'D220',
433 SR55 => 'D320L',
434 SR83 => 'D340L',
435 SR85 => 'C830L,D340R',
436 SR852 => 'C860L,D360L',
437 SR872 => 'C900Z,D400Z',
438 SR874 => 'C960Z,D460Z',
439 SR951 => 'C2000Z',
440 SR952 => 'C21',
441 SR953 => 'C21T.commu',
442 SR954 => 'C2020Z',
443 SR955 => 'C990Z,D490Z',
444 SR956 => 'C211Z',
445 SR959 => 'C990ZS,D490Z',
446 SR95A => 'C2100UZ',
447 SR971 => 'C100,D370',
448 SR973 => 'C2,D230',
449 SX151 => 'E100RS',
450 SX351 => 'C3000Z / C3030Z',
451 SX354 => 'C3040Z',
452 SX355 => 'C2040Z',
453 SX357 => 'C700UZ',
454 SX358 => 'C200Z,D510Z',
455 SX374 => 'C3100Z,C3020Z',
456 SX552 => 'C4040Z',
457 SX553 => 'C40Z,D40Z',
458 SX556 => 'C730UZ',
459 SX558 => 'C5050Z',
460 SX571 => 'C120,D380',
461 SX574 => 'C300Z,D550Z',
462 SX575 => 'C4100Z,C4000Z',
463 SX751 => 'X200,D560Z,C350Z',
464 SX752 => 'X300,D565Z,C450Z',
465 SX753 => 'C750UZ',
466 SX754 => 'C740UZ',
467 SX755 => 'C755UZ',
468 SX756 => 'C5060WZ',
469 SX757 => 'C8080WZ',
470 SX758 => 'X350,D575Z,C360Z',
471 SX759 => 'X400,D580Z,C460Z',
472 SX75A => 'AZ-2ZOOM',
473 SX75B => 'D595Z,C500Z',
474 SX75C => 'X550,D545Z,C480Z',
475 SX75D => 'IR-300',
476 SX75F => 'C55Z,C5500Z',
477 SX75G => 'C170,D425',
478 SX75J => 'C180,D435',
479 SX771 => 'C760UZ',
480 SX772 => 'C770UZ',
481 SX773 => 'C745UZ',
482 SX774 => 'X250,D560Z,C350Z',
483 SX775 => 'X100,D540Z,C310Z',
484 SX776 => 'C460ZdelSol',
485 SX777 => 'C765UZ',
486 SX77A => 'D555Z,C315Z',
487 SX851 => 'C7070WZ',
488 SX852 => 'C70Z,C7000Z',
489 SX853 => 'SP500UZ',
490 SX854 => 'SP310',
491 SX855 => 'SP350',
492 SX873 => 'SP320',
493 SX875 => 'FE180/X745', # (also D4330)
494 SX876 => 'FE190/X750', # (also D4327)
495# other brands
496# 4MP9Q3 => 'Camera 4MP-9Q3'
497# 4MP9T2 => 'BenQ DC C420 / Camera 4MP-9T2'
498# 5MP9Q3 => 'Camera 5MP-9Q3',
499# 5MP9X9 => 'Camera 5MP-9X9',
500# '5MP-9T'=> 'Camera 5MP-9T3',
501# '5MP-9Y'=> 'Camera 5MP-9Y2',
502# '6MP-9U'=> 'Camera 6MP-9U9',
503# 7MP9Q3 => 'Camera 7MP-9Q3',
504# '8MP-9U'=> 'Camera 8MP-9U4',
505# CE5330 => 'Acer CE-5330',
506# 'CP-853'=> 'Acer CP-8531',
507# CS5531 => 'Acer CS5531',
508# DC500 => 'SeaLife DC500',
509# DC7370 => 'Camera 7MP-9GA',
510# DC7371 => 'Camera 7MP-9GM',
511# DC7371 => 'Hitachi HDC-751E',
512# DC7375 => 'Hitachi HDC-763E / Rollei RCP-7330X / Ricoh Caplio RR770 / Vivitar ViviCam 7330',
513# 'DC E63'=> 'BenQ DC E63+',
514# 'DC P86'=> 'BenQ DC P860',
515# DS5340 => 'Maginon Performic S5 / Premier 5MP-9M7',
516# DS5341 => 'BenQ E53+ / Supra TCM X50 / Maginon X50 / Premier 5MP-9P8',
517# DS5346 => 'Premier 5MP-9Q2',
518# E500 => 'Konica Minolta DiMAGE E500',
519# MAGINO => 'Maginon X60',
520# Mz60 => 'HP Photosmart Mz60',
521# Q3DIGI => 'Camera 5MP-9Q3',
522# SLIMLI => 'Supra Slimline X6',
523# V8300s => 'Vivitar V8300s',
524);
525
526# ArtFilter, ArtFilterEffect and MagicFilter values (ref PH)
527my %filters = (
528 0 => 'Off',
529 1 => 'Soft Focus', # (XZ-1)
530 2 => 'Pop Art', # (SZ-10 magic filter 1,SZ-31MR,E-M5,E-PL3)
531 3 => 'Pale & Light Color',
532 4 => 'Light Tone',
533 5 => 'Pin Hole', # (SZ-10 magic filter 2,SZ-31MR,E-PL3)
534 6 => 'Grainy Film',
535 9 => 'Diorama',
536 10 => 'Cross Process',
537 12 => 'Fish Eye', # (SZ-10 magic filter 3)
538 13 => 'Drawing', # (SZ-10 magic filter 4)
539 14 => 'Gentle Sepia', # (E-5)
540 15 => 'Pale & Light Color II', #forum6269 ('Tender Light' ref 11)
541 16 => 'Pop Art II', #11 (E-PL3 "(dark)" - PH)
542 17 => 'Pin Hole II', #11 (E-PL3 "(color 2)" - PH)
543 18 => 'Pin Hole III', #11 (E-M5, E-PL3 "(color 3)" - PH)
544 19 => 'Grainy Film II', #11
545 20 => 'Dramatic Tone', # (XZ-1,SZ-31MR)
546 21 => 'Punk', # (SZ-10 magic filter 6)
547 22 => 'Soft Focus 2', # (SZ-10 magic filter 5)
548 23 => 'Sparkle', # (SZ-10 magic filter 7)
549 24 => 'Watercolor', # (SZ-10 magic filter 8)
550 25 => 'Key Line', # (E-M5)
551 26 => 'Key Line II', #forum6269
552 27 => 'Miniature', # (SZ-31MR)
553 28 => 'Reflection', # (TG-820,SZ-31MR)
554 29 => 'Fragmented', # (TG-820,SZ-31MR)
555 31 => 'Cross Process II', #forum6269
556 32 => 'Dramatic Tone II', #forum6269 (Dramatic Tone B&W for E-M5)
557 33 => 'Watercolor I', # ('Watercolor I' for EM-1 ref forum6269, 'Watercolor II' for E-PM2 ref PH)
558 34 => 'Watercolor II', #forum6269
559 35 => 'Diorama II', #forum6269
560 36 => 'Vintage', #forum6269
561 37 => 'Vintage II', #forum6269
562 38 => 'Vintage III', #forum6269
563 39 => 'Partial Color', #forum6269
564 40 => 'Partial Color II', #forum6269
565 41 => 'Partial Color III', #forum6269
566);
567
568my %toneLevelType = (
569 0 => '0',
570 -31999 => 'Highlights',
571 -31998 => 'Shadows',
572 -31997 => 'Midtones',
573);
574
575# tag information for WAV "Index" tags
576my %indexInfo = (
577 Format => 'int32u',
578 RawConv => '$val == 0xffffffff ? undef : $val',
579 ValueConv => '$val / 1000',
580 PrintConv => 'ConvertDuration($val)',
581);
582
583# Olympus tags
584%Image::ExifTool::Olympus::Main = (
585 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
586 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
587 WRITABLE => 1,
588 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
589#
590# Tags 0x0000 through 0x0103 are the same as Konica/Minolta cameras (ref 3)
591# (removed 0x0101-0x0103 because they weren't supported by my samples - PH)
592#
593 0x0000 => {
594 Name => 'MakerNoteVersion',
595 Writable => 'undef',
596 },
597 0x0001 => {
598 Name => 'MinoltaCameraSettingsOld',
599 SubDirectory => {
600 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
601 ByteOrder => 'BigEndian',
602 },
603 },
604 0x0003 => {
605 Name => 'MinoltaCameraSettings',
606 SubDirectory => {
607 TagTable => 'Image::ExifTool::Minolta::CameraSettings',
608 ByteOrder => 'BigEndian',
609 },
610 },
611 0x0040 => {
612 Name => 'CompressedImageSize',
613 Writable => 'int32u',
614 },
615 0x0081 => {
616 Name => 'PreviewImageData',
617 Binary => 1,
618 Writable => 0,
619 },
620 0x0088 => {
621 Name => 'PreviewImageStart',
622 Flags => 'IsOffset',
623 OffsetPair => 0x0089, # point to associated byte count
624 DataTag => 'PreviewImage',
625 Writable => 0,
626 Protected => 2,
627 },
628 0x0089 => {
629 Name => 'PreviewImageLength',
630 OffsetPair => 0x0088, # point to associated offset
631 DataTag => 'PreviewImage',
632 Writable => 0,
633 Protected => 2,
634 },
635 0x0100 => {
636 Name => 'ThumbnailImage',
637 Groups => { 2 => 'Preview' },
638 Writable => 'undef',
639 WriteCheck => '$self->CheckImage(\$val)',
640 Binary => 1,
641 },
642 0x0104 => { Name => 'BodyFirmwareVersion', Writable => 'string' }, #11
643#
644# end Konica/Minolta tags
645#
646 0x0200 => {
647 Name => 'SpecialMode',
648 Notes => q{
649 3 numbers: 1. Shooting mode: 0=Normal, 2=Fast, 3=Panorama;
650 2. Sequence Number; 3. Panorama Direction: 1=Left-right,
651 2=Right-left, 3=Bottom-Top, 4=Top-Bottom
652 },
653 Writable => 'int32u',
654 Count => 3,
655 PrintConv => sub { #3
656 my $val = shift;
657 my @v = split ' ', $val;
658 return $val unless @v >= 3;
659 my @v0 = ('Normal','Unknown (1)','Fast','Panorama');
660 my @v2 = ('(none)','Left to Right','Right to Left','Bottom to Top','Top to Bottom');
661 $val = $v0[$v[0]] || "Unknown ($v[0])";
662 $val .= ", Sequence: $v[1]";
663 $val .= ', Panorama: ' . ($v2[$v[2]] || "Unknown ($v[2])");
664 return $val;
665 },
666 },
667 0x0201 => {
668 Name => 'Quality',
669 Writable => 'int16u',
670 Notes => q{
671 Quality values are decoded based on the CameraType tag. All types
672 represent SQ, HQ and SHQ as sequential integers, but in general
673 SX-type cameras start with a value of 0 for SQ while others start
674 with 1
675 },
676 # These values are different for different camera types
677 # (can't have Condition based on CameraType because it isn't known
678 # when this tag is extracted)
679 PrintConv => sub {
680 my ($val, $self) = @_;
681 my %t1 = ( # all SX camera types except SX151
682 0 => 'SQ (Low)',
683 1 => 'HQ (Normal)',
684 2 => 'SHQ (Fine)',
685 6 => 'RAW', #PH - C5050WZ
686 );
687 my %t2 = ( # all other types (except D4322, ref 22)
688 1 => 'SQ (Low)',
689 2 => 'HQ (Normal)',
690 3 => 'SHQ (Fine)',
691 4 => 'RAW',
692 5 => 'Medium-Fine', #PH
693 6 => 'Small-Fine', #PH
694 33 => 'Uncompressed', #PH - C2100Z
695 );
696 my $conv = $self->{CameraType} =~ /^(SX(?!151\b)|D4322)/ ? \%t1 : \%t2;
697 return $$conv{$val} ? $$conv{$val} : "Unknown ($val)";
698 },
699 # (no PrintConvInv because we don't know CameraType at write time)
700 },
701 0x0202 => {
702 Name => 'Macro',
703 Writable => 'int16u',
704 PrintConv => {
705 0 => 'Off',
706 1 => 'On',
707 2 => 'Super Macro', #6
708 },
709 },
710 0x0203 => { #6
711 Name => 'BWMode',
712 Description => 'Black And White Mode',
713 Writable => 'int16u',
714 PrintConv => {
715 0 => 'Off',
716 1 => 'On',
717 6 => '(none)', #22
718 },
719 },
720 0x0204 => {
721 Name => 'DigitalZoom',
722 Writable => 'rational64u',
723 PrintConv => '$val=~/\./ or $val.=".0"; $val',
724 PrintConvInv => '$val',
725 },
726 0x0205 => { #6
727 Name => 'FocalPlaneDiagonal',
728 Writable => 'rational64u',
729 PrintConv => '"$val mm"',
730 PrintConvInv => '$val=~s/\s*mm$//;$val',
731 },
732 0x0206 => { Name => 'LensDistortionParams', Writable => 'int16s', Count => 6 }, #6
733 0x0207 => { #PH (was incorrectly FirmwareVersion, ref 1/3)
734 Name => 'CameraType',
735 Condition => '$$valPt ne "NORMAL"', # FE240, SP510, u730 and u1000 write this
736 Writable => 'string',
737 DataMember => 'CameraType',
738 RawConv => '$self->{CameraType} = $val',
739 SeparateTable => 'CameraType',
740 ValueConv => '$val =~ s/\s+$//; $val', # ("SX151 " has trailing space)
741 ValueConvInv => '$val',
742 PrintConv => \%olympusCameraTypes,
743 Priority => 0,
744 # 'NORMAL' for some models: u730,SP510UZ,u1000,FE240
745 },
746 0x0208 => {
747 Name => 'TextInfo',
748 SubDirectory => {
749 TagTable => 'Image::ExifTool::Olympus::TextInfo',
750 },
751 },
752 0x0209 => {
753 Name => 'CameraID',
754 Format => 'string', # this really should have been a string
755 },
756 0x020b => { Name => 'EpsonImageWidth', Writable => 'int32u' }, #PH
757 0x020c => { Name => 'EpsonImageHeight', Writable => 'int32u' }, #PH
758 0x020d => { Name => 'EpsonSoftware', Writable => 'string' }, #PH
759 0x0280 => { #PH
760 %Image::ExifTool::previewImageTagInfo,
761 Groups => { 2 => 'Preview' },
762 Notes => 'found in ERF and JPG images from some Epson models',
763 Format => 'undef',
764 Writable => 'int8u',
765 },
766 0x0300 => { Name => 'PreCaptureFrames', Writable => 'int16u' }, #6
767 0x0301 => { Name => 'WhiteBoard', Writable => 'int16u' }, #11
768 0x0302 => { #6
769 Name => 'OneTouchWB',
770 Writable => 'int16u',
771 PrintConv => {
772 0 => 'Off',
773 1 => 'On',
774 2 => 'On (Preset)',
775 },
776 },
777 0x0303 => { Name => 'WhiteBalanceBracket', Writable => 'int16u' }, #11
778 0x0304 => { Name => 'WhiteBalanceBias', Writable => 'int16u' }, #11
779 # 0x0305 => 'PrintMatching', ? #11
780 0x0400 => { #IB
781 Name => 'SensorArea',
782 Condition => '$$self{TIFF_TYPE} eq "ERF"',
783 Writable => 'undef',
784 Format => 'int16u',
785 Count => 4,
786 Notes => 'found in Epson ERF images',
787 },
788 0x0401 => { #IB
789 Name => 'BlackLevel',
790 Condition => '$$self{TIFF_TYPE} eq "ERF"',
791 Writable => 'int32u',
792 Count => 4,
793 Notes => 'found in Epson ERF images',
794 },
795 # 0x0402 - BitCodedAutoFocus (ref 11)
796 0x0403 => { #11
797 Name => 'SceneMode',
798 Writable => 'int16u',
799 PrintConvColumns => 2,
800 PrintConv => {
801 0 => 'Normal',
802 1 => 'Standard',
803 2 => 'Auto',
804 3 => 'Intelligent Auto', #PH (guess, u7040)
805 4 => 'Portrait',
806 5 => 'Landscape+Portrait',
807 6 => 'Landscape',
808 7 => 'Night Scene',
809 8 => 'Night+Portrait',
810 9 => 'Sport',
811 10 => 'Self Portrait',
812 11 => 'Indoor',
813 12 => 'Beach & Snow',
814 13 => 'Beach',
815 14 => 'Snow',
816 15 => 'Self Portrait+Self Timer',
817 16 => 'Sunset',
818 17 => 'Cuisine',
819 18 => 'Documents',
820 19 => 'Candle',
821 20 => 'Fireworks',
822 21 => 'Available Light',
823 22 => 'Vivid',
824 23 => 'Underwater Wide1',
825 24 => 'Underwater Macro',
826 25 => 'Museum',
827 26 => 'Behind Glass',
828 27 => 'Auction',
829 28 => 'Shoot & Select1',
830 29 => 'Shoot & Select2',
831 30 => 'Underwater Wide2',
832 31 => 'Digital Image Stabilization',
833 32 => 'Face Portrait',
834 33 => 'Pet',
835 34 => 'Smile Shot',
836 35 => 'Quick Shutter',
837 43 => 'Hand-held Starlight', #PH (SH-21)
838 100 => 'Panorama', #PH (SH-21)
839 101 => 'Magic Filter', #PH
840 103 => 'HDR', #PH (XZ-2)
841 },
842 },
843 0x0404 => { Name => 'SerialNumber', Writable => 'string' }, #PH (D595Z, C7070WZ)
844 0x0405 => { Name => 'Firmware', Writable => 'string' }, #11
845 0x0e00 => { # (AFFieldCoord for models XZ-2 and XZ-10, ref 11)
846 Name => 'PrintIM',
847 Description => 'Print Image Matching',
848 Writable => 0,
849 SubDirectory => {
850 TagTable => 'Image::ExifTool::PrintIM::Main',
851 },
852 },
853 # 0x0e80 - undef[256] - offset 0x30: uint16[2] WB_RGBLevels = val[0]*561,65536,val[1]*431 (ref IB)
854 0x0f00 => {
855 Name => 'DataDump',
856 Writable => 0,
857 Binary => 1,
858 },
859 0x0f01 => { #6
860 Name => 'DataDump2',
861 Writable => 0,
862 Binary => 1,
863 },
864 0x0f04 => {
865 Name => 'ZoomedPreviewStart',
866 # NOTE: this tag is currently not updated properly when the image is rewritten!
867 OffsetPair => 0xf05,
868 DataTag => 'ZoomedPreviewImage',
869 Writable => 'int32u',
870 Protected => 2,
871 },
872 0x0f05 => {
873 Name => 'ZoomedPreviewLength',
874 OffsetPair => 0xf04,
875 DataTag => 'ZoomedPreviewImage',
876 Writable => 'int32u',
877 Protected => 2,
878 },
879 0x0f06 => {
880 Name => 'ZoomedPreviewSize',
881 Writable => 'int16u',
882 Count => 2,
883 },
884 0x1000 => { #6
885 Name => 'ShutterSpeedValue',
886 Writable => 'rational64s',
887 Priority => 0,
888 ValueConv => 'abs($val)<100 ? 2**(-$val) : 0',
889 ValueConvInv => '$val>0 ? -log($val)/log(2) : -100',
890 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
891 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
892 },
893 0x1001 => { #6
894 Name => 'ISOValue',
895 Writable => 'rational64s',
896 Priority => 0,
897 ValueConv => '100 * 2 ** ($val - 5)',
898 ValueConvInv => '$val>0 ? log($val/100)/log(2)+5 : 0',
899 PrintConv => 'int($val * 100 + 0.5) / 100',
900 PrintConvInv => '$val',
901 },
902 0x1002 => { #6
903 Name => 'ApertureValue',
904 Writable => 'rational64s',
905 Priority => 0,
906 ValueConv => '2 ** ($val / 2)',
907 ValueConvInv => '$val>0 ? 2*log($val)/log(2) : 0',
908 PrintConv => 'sprintf("%.1f",$val)',
909 PrintConvInv => '$val',
910 },
911 0x1003 => { #6
912 Name => 'BrightnessValue',
913 Writable => 'rational64s',
914 Priority => 0,
915 },
916 0x1004 => { #3
917 Name => 'FlashMode',
918 Writable => 'int16u',
919 PrintConv => {
920 2 => 'On', #PH
921 3 => 'Off', #PH
922 },
923 },
924 0x1005 => { #6
925 Name => 'FlashDevice',
926 Writable => 'int16u',
927 PrintConv => {
928 0 => 'None',
929 1 => 'Internal',
930 4 => 'External',
931 5 => 'Internal + External',
932 },
933 },
934 0x1006 => { #6
935 Name =>'ExposureCompensation',
936 Writable => 'rational64s',
937 },
938 0x1007 => { Name => 'SensorTemperature',Writable => 'int16s' }, #6 (E-10, E-20 and C2500L - numbers usually around 30-40)
939 0x1008 => { Name => 'LensTemperature', Writable => 'int16s' }, #6
940 0x1009 => { Name => 'LightCondition', Writable => 'int16u' }, #11
941 0x100a => { #11
942 Name => 'FocusRange',
943 Writable => 'int16u',
944 PrintConv => {
945 0 => 'Normal',
946 1 => 'Macro',
947 },
948 },
949 0x100b => { #6
950 Name => 'FocusMode',
951 Writable => 'int16u',
952 PrintConv => {
953 0 => 'Auto',
954 1 => 'Manual',
955 },
956 },
957 0x100c => { #6
958 Name => 'ManualFocusDistance',
959 Writable => 'rational64u',
960 PrintConv => '"$val mm"', #11
961 PrintConvInv => '$val=~s/\s*mm$//; $val',
962 },
963 0x100d => { Name => 'ZoomStepCount', Writable => 'int16u' }, #6
964 0x100e => { Name => 'FocusStepCount', Writable => 'int16u' }, #6
965 0x100f => { #6
966 Name => 'Sharpness',
967 Writable => 'int16u',
968 Priority => 0,
969 PrintConv => {
970 0 => 'Normal',
971 1 => 'Hard',
972 2 => 'Soft',
973 },
974 },
975 0x1010 => { Name => 'FlashChargeLevel', Writable => 'int16u' }, #6
976 0x1011 => { #3
977 Name => 'ColorMatrix',
978 Writable => 'int16u',
979 Format => 'int16s',
980 Count => 9,
981 },
982 0x1012 => { Name => 'BlackLevel', Writable => 'int16u', Count => 4 }, #3
983 0x1013 => { #11
984 Name => 'ColorTemperatureBG',
985 Writable => 'int16u',
986 Unknown => 1, # (doesn't look like a temperature)
987 },
988 0x1014 => { #11
989 Name => 'ColorTemperatureRG',
990 Writable => 'int16u',
991 Unknown => 1, # (doesn't look like a temperature)
992 },
993 0x1015 => { #6
994 Name => 'WBMode',
995 Writable => 'int16u',
996 Count => 2,
997 PrintConvColumns => 2,
998 PrintConv => {
999 '1' => 'Auto',
1000 '1 0' => 'Auto',
1001 '1 2' => 'Auto (2)',
1002 '1 4' => 'Auto (4)',
1003 '2 2' => '3000 Kelvin',
1004 '2 3' => '3700 Kelvin',
1005 '2 4' => '4000 Kelvin',
1006 '2 5' => '4500 Kelvin',
1007 '2 6' => '5500 Kelvin',
1008 '2 7' => '6500 Kelvin',
1009 '2 8' => '7500 Kelvin',
1010 '3 0' => 'One-touch',
1011 },
1012 },
1013 0x1017 => { #2
1014 Name => 'RedBalance',
1015 Writable => 'int16u',
1016 Count => 2,
1017 ValueConv => '$val=~s/ .*//; $val / 256',
1018 ValueConvInv => '$val*=256;"$val 64"',
1019 },
1020 0x1018 => { #2
1021 Name => 'BlueBalance',
1022 Writable => 'int16u',
1023 Count => 2,
1024 ValueConv => '$val=~s/ .*//; $val / 256',
1025 ValueConvInv => '$val*=256;"$val 64"',
1026 },
1027 0x1019 => { Name => 'ColorMatrixNumber', Writable => 'int16u' }, #11
1028 # 0x101a is same as CameraID ("OLYMPUS DIGITAL CAMERA") for C2500L - PH
1029 0x101a => { Name => 'SerialNumber', Writable => 'string' }, #3
1030 0x101b => { #11
1031 Name => 'ExternalFlashAE1_0',
1032 Writable => 'int32u',
1033 Unknown => 1, # (what are these?)
1034 },
1035 0x101c => { Name => 'ExternalFlashAE2_0', Writable => 'int32u', Unknown => 1 }, #11
1036 0x101d => { Name => 'InternalFlashAE1_0', Writable => 'int32u', Unknown => 1 }, #11
1037 0x101e => { Name => 'InternalFlashAE2_0', Writable => 'int32u', Unknown => 1 }, #11
1038 0x101f => { Name => 'ExternalFlashAE1', Writable => 'int32u', Unknown => 1 }, #11
1039 0x1020 => { Name => 'ExternalFlashAE2', Writable => 'int32u', Unknown => 1 }, #11
1040 0x1021 => { Name => 'InternalFlashAE1', Writable => 'int32u', Unknown => 1 }, #11
1041 0x1022 => { Name => 'InternalFlashAE2', Writable => 'int32u', Unknown => 1 }, #11
1042 0x1023 => { Name => 'FlashExposureComp', Writable => 'rational64s' }, #6
1043 0x1024 => { Name => 'InternalFlashTable', Writable => 'int16u' }, #11
1044 0x1025 => { Name => 'ExternalFlashGValue', Writable => 'rational64s' }, #11
1045 0x1026 => { #6
1046 Name => 'ExternalFlashBounce',
1047 Writable => 'int16u',
1048 PrintConv => {
1049 0 => 'No',
1050 1 => 'Yes',
1051 },
1052 },
1053 0x1027 => { Name => 'ExternalFlashZoom', Writable => 'int16u' }, #6
1054 0x1028 => { Name => 'ExternalFlashMode', Writable => 'int16u' }, #6
1055 0x1029 => { #3
1056 Name => 'Contrast',
1057 Writable => 'int16u',
1058 PrintConv => { #PH (works with E1)
1059 0 => 'High',
1060 1 => 'Normal',
1061 2 => 'Low',
1062 },
1063 },
1064 0x102a => { Name => 'SharpnessFactor', Writable => 'int16u' }, #3
1065 0x102b => { Name => 'ColorControl', Writable => 'int16u', Count => 6 }, #3
1066 0x102c => { Name => 'ValidBits', Writable => 'int16u', Count => 2 }, #3
1067 0x102d => { Name => 'CoringFilter', Writable => 'int16u' }, #3
1068 0x102e => { Name => 'OlympusImageWidth', Writable => 'int32u' }, #PH
1069 0x102f => { Name => 'OlympusImageHeight', Writable => 'int32u' }, #PH
1070 0x1030 => { Name => 'SceneDetect', Writable => 'int16u' }, #11
1071 0x1031 => { #11
1072 Name => 'SceneArea',
1073 Writable => 'int32u',
1074 Count => 8,
1075 Unknown => 1, # (numbers don't make much sense?)
1076 },
1077 # 0x1032 HAFFINAL? #11
1078 0x1033 => { #11
1079 Name => 'SceneDetectData',
1080 Writable => 'int32u',
1081 Count => 720,
1082 Binary => 1,
1083 Unknown => 1, # (but what does it mean?)
1084 },
1085 0x1034 => { Name => 'CompressionRatio', Writable => 'rational64u' }, #3
1086 0x1035 => { #6
1087 Name => 'PreviewImageValid',
1088 Writable => 'int32u',
1089 DelValue => 0,
1090 PrintConv => { 0 => 'No', 1 => 'Yes' },
1091 },
1092 0x1036 => { #6
1093 Name => 'PreviewImageStart',
1094 Flags => 'IsOffset',
1095 OffsetPair => 0x1037, # point to associated byte count
1096 DataTag => 'PreviewImage',
1097 Writable => 'int32u',
1098 WriteGroup => 'MakerNotes',
1099 Protected => 2,
1100 },
1101 0x1037 => { #6
1102 # (may contain data from multiple previews - PH, FE320)
1103 Name => 'PreviewImageLength',
1104 OffsetPair => 0x1036, # point to associated offset
1105 DataTag => 'PreviewImage',
1106 Writable => 'int32u',
1107 WriteGroup => 'MakerNotes',
1108 Protected => 2,
1109 },
1110 0x1038 => { Name => 'AFResult', Writable => 'int16u' }, #11
1111 0x1039 => { #6
1112 Name => 'CCDScanMode',
1113 Writable => 'int16u',
1114 PrintConv => {
1115 0 => 'Interlaced',
1116 1 => 'Progressive',
1117 },
1118 },
1119 0x103a => { #6
1120 Name => 'NoiseReduction',
1121 Writable => 'int16u',
1122 PrintConv => \%offOn,
1123 },
1124 0x103b => { Name => 'FocusStepInfinity', Writable => 'int16u' }, #6
1125 0x103c => { Name => 'FocusStepNear', Writable => 'int16u' }, #6
1126 0x103d => { Name => 'LightValueCenter', Writable => 'rational64s' }, #11
1127 0x103e => { Name => 'LightValuePeriphery', Writable => 'rational64s' }, #11
1128 0x103f => { #11
1129 Name => 'FieldCount',
1130 Writable => 'int16u',
1131 Unknown => 1, # (but what does it mean?)
1132 },
1133#
1134# Olympus really screwed up the format of the following subdirectories (for the
1135# E-1 and E-300 anyway). Not only is the subdirectory value data not included in
1136# the size, but also the count is 2 bytes short for the subdirectory itself
1137# (presumably the Olympus programmers forgot about the 2-byte entry count at the
1138# start of the subdirectory). This mess is straightened out and these subdirs
1139# are written properly when ExifTool rewrites the file. Note that this problem
1140# has been fixed by Olympus in the new-style IFD maker notes since a standard
1141# SubIFD offset value is used. As written by the camera, the old style
1142# directories have format 'undef' or 'string', and the new style has format
1143# 'ifd'. However, some older versions of exiftool may have rewritten the new
1144# style as 'int32u', so handle both cases. - PH
1145#
1146 0x2010 => [ #PH
1147 {
1148 Name => 'Equipment',
1149 Condition => '$format ne "ifd" and $format ne "int32u"',
1150 NestedHtmlDump => 2, # (so HtmlDump doesn't show these as double-referenced)
1151 SubDirectory => {
1152 TagTable => 'Image::ExifTool::Olympus::Equipment',
1153 ByteOrder => 'Unknown',
1154 },
1155 },
1156 {
1157 Name => 'EquipmentIFD',
1158 Groups => { 1 => 'MakerNotes' }, # SubIFD needs group 1 set
1159 Flags => 'SubIFD',
1160 FixFormat => 'ifd',
1161 SubDirectory => {
1162 TagTable => 'Image::ExifTool::Olympus::Equipment',
1163 Start => '$val',
1164 },
1165 },
1166 ],
1167 0x2020 => [ #PH
1168 {
1169 Name => 'CameraSettings',
1170 Condition => '$format ne "ifd" and $format ne "int32u"',
1171 NestedHtmlDump => 2,
1172 SubDirectory => {
1173 TagTable => 'Image::ExifTool::Olympus::CameraSettings',
1174 ByteOrder => 'Unknown',
1175 },
1176 },
1177 {
1178 Name => 'CameraSettingsIFD',
1179 Groups => { 1 => 'MakerNotes' },
1180 Flags => 'SubIFD',
1181 FixFormat => 'ifd',
1182 SubDirectory => {
1183 TagTable => 'Image::ExifTool::Olympus::CameraSettings',
1184 Start => '$val',
1185 },
1186 },
1187 ],
1188 0x2030 => [ #PH
1189 {
1190 Name => 'RawDevelopment',
1191 Condition => '$format ne "ifd" and $format ne "int32u"',
1192 NestedHtmlDump => 2,
1193 SubDirectory => {
1194 TagTable => 'Image::ExifTool::Olympus::RawDevelopment',
1195 ByteOrder => 'Unknown',
1196 },
1197 },
1198 {
1199 Name => 'RawDevelopmentIFD',
1200 Groups => { 1 => 'MakerNotes' },
1201 Flags => 'SubIFD',
1202 FixFormat => 'ifd',
1203 SubDirectory => {
1204 TagTable => 'Image::ExifTool::Olympus::RawDevelopment',
1205 Start => '$val',
1206 },
1207 },
1208 ],
1209 0x2031 => [ #11
1210 {
1211 Name => 'RawDev2',
1212 Condition => '$format ne "ifd" and $format ne "int32u"',
1213 NestedHtmlDump => 2,
1214 SubDirectory => {
1215 TagTable => 'Image::ExifTool::Olympus::RawDevelopment2',
1216 ByteOrder => 'Unknown',
1217 },
1218 },
1219 {
1220 Name => 'RawDev2IFD',
1221 Groups => { 1 => 'MakerNotes' },
1222 Flags => 'SubIFD',
1223 FixFormat => 'ifd',
1224 SubDirectory => {
1225 TagTable => 'Image::ExifTool::Olympus::RawDevelopment2',
1226 Start => '$val',
1227 },
1228 },
1229 ],
1230 0x2040 => [ #PH
1231 {
1232 Name => 'ImageProcessing',
1233 Condition => '$format ne "ifd" and $format ne "int32u"',
1234 NestedHtmlDump => 2,
1235 SubDirectory => {
1236 TagTable => 'Image::ExifTool::Olympus::ImageProcessing',
1237 ByteOrder => 'Unknown',
1238 },
1239 },
1240 {
1241 Name => 'ImageProcessingIFD',
1242 Groups => { 1 => 'MakerNotes' },
1243 Flags => 'SubIFD',
1244 FixFormat => 'ifd',
1245 SubDirectory => {
1246 TagTable => 'Image::ExifTool::Olympus::ImageProcessing',
1247 Start => '$val',
1248 },
1249 },
1250 ],
1251 0x2050 => [ #PH
1252 {
1253 Name => 'FocusInfo',
1254 Condition => '$format ne "ifd" and $format ne "int32u" and not $$self{OlympusCAMER}',
1255 NestedHtmlDump => 2,
1256 SubDirectory => {
1257 TagTable => 'Image::ExifTool::Olympus::FocusInfo',
1258 ByteOrder => 'Unknown',
1259 },
1260 },
1261 {
1262 Name => 'FocusInfoIFD',
1263 Condition => 'not $$self{OlympusCAMER}',
1264 Groups => { 1 => 'MakerNotes' },
1265 Flags => 'SubIFD',
1266 FixFormat => 'ifd',
1267 SubDirectory => {
1268 TagTable => 'Image::ExifTool::Olympus::FocusInfo',
1269 Start => '$val',
1270 },
1271 },
1272 {
1273 # ASCII-based camera parameters if makernotes starts with "CAMER\0"
1274 # (or for Sony models starting with "SONY PI\0" or "PREMI\0")
1275 Name => 'CameraParameters',
1276 Writable => 'undef',
1277 Binary => 1,
1278 },
1279 ],
1280 0x2100 => [
1281 { #11
1282 Name => 'Olympus2100',
1283 Condition => '$format ne "ifd" and $format ne "int32u"',
1284 NestedHtmlDump => 2,
1285 SubDirectory => {
1286 TagTable => 'Image::ExifTool::Olympus::FETags',
1287 ByteOrder => 'Unknown',
1288 },
1289 },
1290 { #PH
1291 Name => 'Olympus2100IFD',
1292 Groups => { 1 => 'MakerNotes' },
1293 Flags => 'SubIFD',
1294 FixFormat => 'ifd',
1295 SubDirectory => {
1296 TagTable => 'Image::ExifTool::Olympus::FETags',
1297 ByteOrder => 'Unknown',
1298 Start => '$val',
1299 },
1300 },
1301 ],
1302 0x2200 => [
1303 { #11
1304 Name => 'Olympus2200',
1305 Condition => '$format ne "ifd" and $format ne "int32u"',
1306 NestedHtmlDump => 2,
1307 SubDirectory => {
1308 TagTable => 'Image::ExifTool::Olympus::FETags',
1309 ByteOrder => 'Unknown',
1310 },
1311 },
1312 { #PH
1313 Name => 'Olympus2200IFD',
1314 Groups => { 1 => 'MakerNotes' },
1315 Flags => 'SubIFD',
1316 FixFormat => 'ifd',
1317 SubDirectory => {
1318 TagTable => 'Image::ExifTool::Olympus::FETags',
1319 ByteOrder => 'Unknown',
1320 Start => '$val',
1321 },
1322 },
1323 ],
1324 0x2300 => [
1325 { #11
1326 Name => 'Olympus2300',
1327 Condition => '$format ne "ifd" and $format ne "int32u"',
1328 NestedHtmlDump => 2,
1329 SubDirectory => {
1330 TagTable => 'Image::ExifTool::Olympus::FETags',
1331 ByteOrder => 'Unknown',
1332 },
1333 },
1334 { #PH
1335 Name => 'Olympus2300IFD',
1336 Groups => { 1 => 'MakerNotes' },
1337 Flags => 'SubIFD',
1338 FixFormat => 'ifd',
1339 SubDirectory => {
1340 TagTable => 'Image::ExifTool::Olympus::FETags',
1341 ByteOrder => 'Unknown',
1342 Start => '$val',
1343 },
1344 },
1345 ],
1346 0x2400 => [
1347 { #11
1348 Name => 'Olympus2400',
1349 Condition => '$format ne "ifd" and $format ne "int32u"',
1350 NestedHtmlDump => 2,
1351 SubDirectory => {
1352 TagTable => 'Image::ExifTool::Olympus::FETags',
1353 ByteOrder => 'Unknown',
1354 },
1355 },
1356 { #PH
1357 Name => 'Olympus2400IFD',
1358 Groups => { 1 => 'MakerNotes' },
1359 Flags => 'SubIFD',
1360 FixFormat => 'ifd',
1361 SubDirectory => {
1362 TagTable => 'Image::ExifTool::Olympus::FETags',
1363 ByteOrder => 'Unknown',
1364 Start => '$val',
1365 },
1366 },
1367 ],
1368 0x2500 => [
1369 { #11
1370 Name => 'Olympus2500',
1371 Condition => '$format ne "ifd" and $format ne "int32u"',
1372 NestedHtmlDump => 2,
1373 SubDirectory => {
1374 TagTable => 'Image::ExifTool::Olympus::FETags',
1375 ByteOrder => 'Unknown',
1376 },
1377 },
1378 { #PH
1379 Name => 'Olympus2500IFD',
1380 Groups => { 1 => 'MakerNotes' },
1381 Flags => 'SubIFD',
1382 FixFormat => 'ifd',
1383 SubDirectory => {
1384 TagTable => 'Image::ExifTool::Olympus::FETags',
1385 ByteOrder => 'Unknown',
1386 Start => '$val',
1387 },
1388 },
1389 ],
1390 0x2600 => [
1391 { #11
1392 Name => 'Olympus2600',
1393 Condition => '$format ne "ifd" and $format ne "int32u"',
1394 NestedHtmlDump => 2,
1395 SubDirectory => {
1396 TagTable => 'Image::ExifTool::Olympus::FETags',
1397 ByteOrder => 'Unknown',
1398 },
1399 },
1400 { #PH
1401 Name => 'Olympus2600IFD',
1402 Groups => { 1 => 'MakerNotes' },
1403 Flags => 'SubIFD',
1404 FixFormat => 'ifd',
1405 SubDirectory => {
1406 TagTable => 'Image::ExifTool::Olympus::FETags',
1407 ByteOrder => 'Unknown',
1408 Start => '$val',
1409 },
1410 },
1411 ],
1412 0x2700 => [
1413 { #11
1414 Name => 'Olympus2700',
1415 Condition => '$format ne "ifd" and $format ne "int32u"',
1416 NestedHtmlDump => 2,
1417 SubDirectory => {
1418 TagTable => 'Image::ExifTool::Olympus::FETags',
1419 ByteOrder => 'Unknown',
1420 },
1421 },
1422 { #PH
1423 Name => 'Olympus2700IFD',
1424 Groups => { 1 => 'MakerNotes' },
1425 Flags => 'SubIFD',
1426 FixFormat => 'ifd',
1427 SubDirectory => {
1428 TagTable => 'Image::ExifTool::Olympus::FETags',
1429 ByteOrder => 'Unknown',
1430 Start => '$val',
1431 },
1432 },
1433 ],
1434 0x2800 => [
1435 { #11
1436 Name => 'Olympus2800',
1437 Condition => '$format ne "ifd" and $format ne "int32u"',
1438 NestedHtmlDump => 2,
1439 SubDirectory => {
1440 TagTable => 'Image::ExifTool::Olympus::FETags',
1441 ByteOrder => 'Unknown',
1442 },
1443 },
1444 { #PH
1445 Name => 'Olympus2800IFD',
1446 Groups => { 1 => 'MakerNotes' },
1447 Flags => 'SubIFD',
1448 FixFormat => 'ifd',
1449 SubDirectory => {
1450 TagTable => 'Image::ExifTool::Olympus::FETags',
1451 ByteOrder => 'Unknown',
1452 Start => '$val',
1453 },
1454 },
1455 ],
1456 0x2900 => [
1457 { #11
1458 Name => 'Olympus2900',
1459 Condition => '$format ne "ifd" and $format ne "int32u"',
1460 NestedHtmlDump => 2,
1461 SubDirectory => {
1462 TagTable => 'Image::ExifTool::Olympus::FETags',
1463 ByteOrder => 'Unknown',
1464 },
1465 },
1466 { #PH
1467 Name => 'Olympus2900IFD',
1468 Groups => { 1 => 'MakerNotes' },
1469 Flags => 'SubIFD',
1470 FixFormat => 'ifd',
1471 SubDirectory => {
1472 TagTable => 'Image::ExifTool::Olympus::FETags',
1473 ByteOrder => 'Unknown',
1474 Start => '$val',
1475 },
1476 },
1477 ],
1478 0x3000 => [
1479 { #6
1480 Name => 'RawInfo',
1481 Condition => '$format ne "ifd" and $format ne "int32u"',
1482 NestedHtmlDump => 2,
1483 SubDirectory => {
1484 TagTable => 'Image::ExifTool::Olympus::RawInfo',
1485 ByteOrder => 'Unknown',
1486 },
1487 },
1488 { #PH
1489 Name => 'RawInfoIFD',
1490 Groups => { 1 => 'MakerNotes' },
1491 Flags => 'SubIFD',
1492 FixFormat => 'ifd',
1493 SubDirectory => {
1494 TagTable => 'Image::ExifTool::Olympus::RawInfo',
1495 Start => '$val',
1496 },
1497 },
1498 ],
1499 0x4000 => [ #PH
1500 {
1501 Name => 'MainInfo',
1502 Condition => '$format ne "ifd" and $format ne "int32u"',
1503 NestedHtmlDump => 2,
1504 SubDirectory => {
1505 TagTable => 'Image::ExifTool::Olympus::Main',
1506 ByteOrder => 'Unknown',
1507 },
1508 },
1509 {
1510 Name => 'MainInfoIFD',
1511 Groups => { 1 => 'MakerNotes' },
1512 Flags => 'SubIFD',
1513 FixFormat => 'ifd',
1514 SubDirectory => {
1515 TagTable => 'Image::ExifTool::Olympus::Main',
1516 Start => '$val',
1517 },
1518 },
1519 ],
1520 0x5000 => [ #PH
1521 {
1522 Name => 'UnknownInfo',
1523 Condition => '$format ne "ifd" and $format ne "int32u"',
1524 NestedHtmlDump => 2,
1525 SubDirectory => {
1526 TagTable => 'Image::ExifTool::Olympus::UnknownInfo',
1527 ByteOrder => 'Unknown',
1528 },
1529 },
1530 {
1531 Name => 'UnknownInfoIFD',
1532 Groups => { 1 => 'MakerNotes' },
1533 Flags => 'SubIFD',
1534 FixFormat => 'ifd',
1535 SubDirectory => {
1536 TagTable => 'Image::ExifTool::Olympus::UnknownInfo',
1537 Start => '$val',
1538 },
1539 },
1540 ],
1541);
1542
1543# TextInfo tags
1544%Image::ExifTool::Olympus::TextInfo = (
1545 PROCESS_PROC => \&Image::ExifTool::APP12::ProcessAPP12,
1546 NOTES => q{
1547 This information is in text format (similar to APP12 information, but with
1548 spaces instead of linefeeds). Below are tags which have been observed, but
1549 any information found here will be extracted, even if the tag is not listed.
1550 },
1551 GROUPS => { 0 => 'MakerNotes', 1 => 'Olympus', 2 => 'Image' },
1552 Resolution => { },
1553 Type => {
1554 Name => 'CameraType',
1555 Groups => { 2 => 'Camera' },
1556 DataMember => 'CameraType',
1557 RawConv => '$self->{CameraType} = $val',
1558 SeparateTable => 'CameraType',
1559 PrintConv => \%olympusCameraTypes,
1560 },
1561);
1562
1563# Olympus Equipment IFD
1564%Image::ExifTool::Olympus::Equipment = (
1565 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1566 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1567 WRITABLE => 1,
1568 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1569 0x000 => { #PH
1570 Name => 'EquipmentVersion',
1571 Writable => 'undef',
1572 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
1573 Count => 4,
1574 },
1575 0x100 => { #6
1576 Name => 'CameraType2',
1577 Writable => 'string',
1578 Count => 6,
1579 SeparateTable => 'CameraType',
1580 PrintConv => \%olympusCameraTypes,
1581 },
1582 0x101 => { #PH
1583 Name => 'SerialNumber',
1584 Writable => 'string',
1585 Count => 32,
1586 PrintConv => '$val=~s/\s+$//;$val',
1587 PrintConvInv => 'pack("A31",$val)', # pad with spaces to 31 chars
1588 },
1589 0x102 => { #6
1590 Name => 'InternalSerialNumber',
1591 Notes => '16 digits: 0-3=model, 4=year, 5-6=month, 8-12=unit number',
1592 Writable => 'string',
1593 Count => 32,
1594 },
1595 0x103 => { #6
1596 Name => 'FocalPlaneDiagonal',
1597 Writable => 'rational64u',
1598 PrintConv => '"$val mm"',
1599 PrintConvInv => '$val=~s/\s*mm$//;$val',
1600 },
1601 0x104 => { #6
1602 Name => 'BodyFirmwareVersion',
1603 Writable => 'int32u',
1604 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1605 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1606 },
1607 0x201 => { #6
1608 Name => 'LensType',
1609 Writable => 'int8u',
1610 Count => 6,
1611 Notes => q{
1612 6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Sub-model, 5-6. Unknown. Only
1613 the Make, Model and Sub-model are used to identify the lens type
1614 },
1615 SeparateTable => 'LensType',
1616 # Have seen these values for the unknown numbers:
1617 # 2: 0
1618 # 5: 0, 2(Olympus lenses for which I have also seen 0 for this number)
1619 # 6: 0, 16(new Lumix lenses)
1620 ValueConv => 'my @a=split(" ",$val); sprintf("%x %.2x %.2x",@a[0,2,3])',
1621 # set unknown values to zero when writing
1622 ValueConvInv => 'my @a=split(" ",$val); hex($a[0])." 0 ".hex($a[1])." ".hex($a[2])." 0 0"',
1623 PrintConv => \%olympusLensTypes,
1624 },
1625 # apparently the first 3 digits of the lens s/n give the type (ref 4):
1626 # 010 = 50macro
1627 # 040 = EC-14
1628 # 050 = 14-54
1629 # 060 = 50-200
1630 # 080 = EX-25
1631 # 101 = FL-50
1632 # 272 = EC-20 #7
1633 0x202 => { #PH
1634 Name => 'LensSerialNumber',
1635 Writable => 'string',
1636 Count => 32,
1637 PrintConv => '$val=~s/\s+$//;$val',
1638 PrintConvInv => 'pack("A31",$val)', # pad with spaces to 31 chars
1639 },
1640 0x203 => { Name => 'LensModel', Writable => 'string' }, #17
1641 0x204 => { #6
1642 Name => 'LensFirmwareVersion',
1643 Writable => 'int32u',
1644 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1645 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1646 },
1647 0x205 => { #11
1648 Name => 'MaxApertureAtMinFocal',
1649 Writable => 'int16u',
1650 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1651 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1652 PrintConv => 'sprintf("%.1f",$val)',
1653 PrintConvInv => '$val',
1654 },
1655 0x206 => { #5
1656 Name => 'MaxApertureAtMaxFocal',
1657 Writable => 'int16u',
1658 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1659 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1660 PrintConv => 'sprintf("%.1f",$val)',
1661 PrintConvInv => '$val',
1662 },
1663 0x207 => { Name => 'MinFocalLength', Writable => 'int16u' }, #PH
1664 0x208 => { Name => 'MaxFocalLength', Writable => 'int16u' }, #PH
1665 0x20a => { #9
1666 Name => 'MaxAperture', # (at current focal length)
1667 Writable => 'int16u',
1668 ValueConv => '$val ? sqrt(2)**($val/256) : 0',
1669 ValueConvInv => '$val>0 ? int(512*log($val)/log(2)+0.5) : 0',
1670 PrintConv => 'sprintf("%.1f",$val)',
1671 PrintConvInv => '$val',
1672 },
1673 0x20b => { #11
1674 Name => 'LensProperties',
1675 Writable => 'int16u',
1676 PrintConv => 'sprintf("0x%x",$val)',
1677 PrintConvInv => '$val',
1678 },
1679 0x301 => { #6
1680 Name => 'Extender',
1681 Writable => 'int8u',
1682 Count => 6,
1683 Notes => q{
1684 6 numbers: 1. Make, 2. Unknown, 3. Model, 4. Sub-model, 5-6. Unknown. Only
1685 the Make and Model are used to identify the extender
1686 },
1687 ValueConv => 'my @a=split(" ",$val); sprintf("%x %.2x",@a[0,2])',
1688 ValueConvInv => 'my @a=split(" ",$val); hex($a[0])." 0 ".hex($a[1])." 0 0 0"',
1689 PrintConv => {
1690 '0 00' => 'None',
1691 '0 04' => 'Olympus Zuiko Digital EC-14 1.4x Teleconverter',
1692 '0 08' => 'Olympus EX-25 Extension Tube',
1693 '0 10' => 'Olympus Zuiko Digital EC-20 2.0x Teleconverter', #7
1694 },
1695 },
1696 0x302 => { Name => 'ExtenderSerialNumber', Writable => 'string', Count => 32 }, #4
1697 0x303 => { Name => 'ExtenderModel', Writable => 'string' }, #9
1698 0x304 => { #6
1699 Name => 'ExtenderFirmwareVersion',
1700 Writable => 'int32u',
1701 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1702 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1703 },
1704 0x403 => { #http://dev.exiv2.org/issues/870
1705 Name => 'ConversionLens',
1706 Writable => 'string',
1707 # (observed values: '','TCON','FCON','WCON')
1708 },
1709 0x1000 => { #6
1710 Name => 'FlashType',
1711 Writable => 'int16u',
1712 PrintConv => {
1713 0 => 'None',
1714 2 => 'Simple E-System',
1715 3 => 'E-System',
1716 4 => 'E-System (body powered)', #forum9740
1717 },
1718 },
1719 0x1001 => { #6
1720 Name => 'FlashModel',
1721 Writable => 'int16u',
1722 PrintConvColumns => 2,
1723 PrintConv => {
1724 0 => 'None',
1725 1 => 'FL-20', # (or subtronic digital or Inon UW flash, ref 11)
1726 2 => 'FL-50', # (or Metzblitz+SCA or Cullmann 34, ref 11)
1727 3 => 'RF-11',
1728 4 => 'TF-22',
1729 5 => 'FL-36',
1730 6 => 'FL-50R', #11 (or Metz mecablitz digital)
1731 7 => 'FL-36R', #11
1732 9 => 'FL-14', #11
1733 11 => 'FL-600R', #11
1734 13 => 'FL-LM3', #forum9740
1735 15 => 'FL-900R', #7
1736 },
1737 },
1738 0x1002 => { #6
1739 Name => 'FlashFirmwareVersion',
1740 Writable => 'int32u',
1741 PrintConv => '$val=sprintf("%x",$val);$val=~s/(.{3})$/\.$1/;$val',
1742 PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
1743 },
1744 0x1003 => { Name => 'FlashSerialNumber', Writable => 'string', Count => 32 }, #4
1745);
1746
1747# Olympus camera settings IFD
1748%Image::ExifTool::Olympus::CameraSettings = (
1749 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
1750 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
1751 WRITABLE => 1,
1752 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1753 0x000 => { #PH
1754 Name => 'CameraSettingsVersion',
1755 Writable => 'undef',
1756 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
1757 Count => 4,
1758 },
1759 0x100 => { #6
1760 Name => 'PreviewImageValid',
1761 Writable => 'int32u',
1762 PrintConv => { 0 => 'No', 1 => 'Yes' },
1763 },
1764 0x101 => { #PH
1765 Name => 'PreviewImageStart',
1766 Flags => 'IsOffset',
1767 OffsetPair => 0x102,
1768 DataTag => 'PreviewImage',
1769 Writable => 'int32u',
1770 WriteGroup => 'MakerNotes',
1771 Protected => 2,
1772 },
1773 0x102 => { #PH
1774 Name => 'PreviewImageLength',
1775 OffsetPair => 0x101,
1776 DataTag => 'PreviewImage',
1777 Writable => 'int32u',
1778 WriteGroup => 'MakerNotes',
1779 Protected => 2,
1780 },
1781 0x200 => { #4
1782 Name => 'ExposureMode',
1783 Writable => 'int16u',
1784 PrintConv => {
1785 1 => 'Manual',
1786 2 => 'Program', #6
1787 3 => 'Aperture-priority AE',
1788 4 => 'Shutter speed priority AE',
1789 5 => 'Program-shift', #6
1790 }
1791 },
1792 0x201 => { #6
1793 Name => 'AELock',
1794 Writable => 'int16u',
1795 PrintConv => \%offOn,
1796 },
1797 0x202 => { #PH/4
1798 Name => 'MeteringMode',
1799 Writable => 'int16u',
1800 PrintConv => {
1801 2 => 'Center-weighted average',
1802 3 => 'Spot',
1803 5 => 'ESP',
1804 261 => 'Pattern+AF', #6
1805 515 => 'Spot+Highlight control', #6
1806 1027 => 'Spot+Shadow control', #6
1807 },
1808 },
1809 0x203 => { Name => 'ExposureShift', Writable => 'rational64s' }, #11 (some models only)
1810 0x204 => { #11 (XZ-1)
1811 Name => 'NDFilter',
1812 PrintConv => \%offOn,
1813 },
1814 0x300 => { #6
1815 Name => 'MacroMode',
1816 Writable => 'int16u',
1817 PrintConv => {
1818 0 => 'Off',
1819 1 => 'On',
1820 2 => 'Super Macro', #11
1821 },
1822 },
1823 0x301 => { #6
1824 Name => 'FocusMode',
1825 Writable => 'int16u',
1826 Count => -1,
1827 Notes => '1 or 2 values',
1828 PrintConv => [{
1829 0 => 'Single AF',
1830 1 => 'Sequential shooting AF',
1831 2 => 'Continuous AF',
1832 3 => 'Multi AF',
1833 4 => 'Face detect', #11
1834 10 => 'MF',
1835 }, {
1836 0 => '(none)',
1837 BITMASK => { #11
1838 0 => 'S-AF',
1839 2 => 'C-AF',
1840 4 => 'MF',
1841 5 => 'Face detect',
1842 6 => 'Imager AF',
1843 7 => 'Live View Magnification Frame',
1844 8 => 'AF sensor',
1845 9 => 'Starry Sky AF', #24
1846 },
1847 }],
1848 },
1849 0x302 => { #6
1850 Name => 'FocusProcess',
1851 Writable => 'int16u',
1852 Count => -1,
1853 Notes => '1 or 2 values',
1854 PrintConv => [{
1855 0 => 'AF Not Used',
1856 1 => 'AF Used',
1857 }],
1858 # 2nd value written only by some models (u1050SW, u9000, uT6000, uT6010,
1859 # uT8000, E-30, E-420, E-450, E-520, E-620, E-P1 and E-P2): - PH
1860 # observed values when "AF Not Used": 0, 16
1861 # observed values when "AF Used": 64, 96(face detect on), 256
1862 },
1863 0x303 => { #6
1864 Name => 'AFSearch',
1865 Writable => 'int16u',
1866 PrintConv => {
1867 0 => 'Not Ready',
1868 1 => 'Ready',
1869 },
1870 },
1871 0x304 => { #PH/4
1872 Name => 'AFAreas',
1873 Notes => 'coordinates range from 0 to 255',
1874 Writable => 'int32u',
1875 Count => 64,
1876 PrintConv => 'Image::ExifTool::Olympus::PrintAFAreas($val)',
1877 },
1878 0x0305 => { #PH
1879 Name => 'AFPointSelected',
1880 Notes => 'coordinates expressed as a percent',
1881 Writable => 'rational64s',
1882 Count => 5,
1883 ValueConv => '$val =~ s/\S* //; $val', # ignore first undefined value
1884 ValueConvInv => '"undef $val"',
1885 PrintConv => q{
1886 return 'n/a' if $val =~ /undef/;
1887 sprintf("(%d%%,%d%%) (%d%%,%d%%)", map {$_ * 100} split(" ",$val));
1888 },
1889 PrintConvInv => q{
1890 return 'undef undef undef undef' if $val eq 'n/a';
1891 my @nums = $val =~ /\d+(?:\.\d+)?/g;
1892 return undef unless @nums == 4;
1893 join ' ', map {$_ / 100} @nums;
1894 },
1895 },
1896 0x306 => { #11
1897 Name => 'AFFineTune',
1898 Writable => 'int8u',
1899 PrintConv => { 0 => 'Off', 1 => 'On' },
1900 },
1901 0x307 => { #15
1902 Name => 'AFFineTuneAdj',
1903 Writable => 'int16s',
1904 Count => 3, # not sure what the 3 values mean
1905 },
1906 0x308 => { #forum11578
1907 Name => 'FocusBracketStepSize',
1908 Writable => 'int8u',
1909 },
1910 0x400 => { #6
1911 Name => 'FlashMode',
1912 Writable => 'int16u',
1913 PrintConv => {
1914 0 => 'Off',
1915 BITMASK => {
1916 0 => 'On',
1917 1 => 'Fill-in',
1918 2 => 'Red-eye',
1919 3 => 'Slow-sync',
1920 4 => 'Forced On',
1921 5 => '2nd Curtain',
1922 },
1923 },
1924 },
1925 0x401 => { Name => 'FlashExposureComp', Writable => 'rational64s' }, #6
1926 # 0x402 - FlashMode? bit0=TTL, bit1=auto, bit2=SuperFP (ref 11)
1927 0x403 => { #11
1928 Name => 'FlashRemoteControl',
1929 Writable => 'int16u',
1930 PrintHex => 1,
1931 PrintConvColumns => 2,
1932 PrintConv => {
1933 0 => 'Off',
1934 0x01 => 'Channel 1, Low',
1935 0x02 => 'Channel 2, Low',
1936 0x03 => 'Channel 3, Low',
1937 0x04 => 'Channel 4, Low',
1938 0x09 => 'Channel 1, Mid',
1939 0x0a => 'Channel 2, Mid',
1940 0x0b => 'Channel 3, Mid',
1941 0x0c => 'Channel 4, Mid',
1942 0x11 => 'Channel 1, High',
1943 0x12 => 'Channel 2, High',
1944 0x13 => 'Channel 3, High',
1945 0x14 => 'Channel 4, High',
1946 },
1947 },
1948 0x404 => { #11
1949 Name => 'FlashControlMode',
1950 Writable => 'int16u',
1951 Count => -1,
1952 Notes => '3 or 4 values',
1953 PrintConv => [{
1954 0 => 'Off',
1955 3 => 'TTL',
1956 4 => 'Auto',
1957 5 => 'Manual',
1958 }],
1959 },
1960 0x405 => { #11
1961 Name => 'FlashIntensity',
1962 Writable => 'rational64s',
1963 Count => -1,
1964 Notes => '3 or 4 values',
1965 PrintConv => {
1966 OTHER => sub { shift },
1967 'undef undef undef' => 'n/a',
1968 'undef undef undef undef' => 'n/a (x4)',
1969 },
1970 },
1971 0x406 => { #11
1972 Name => 'ManualFlashStrength',
1973 Writable => 'rational64s',
1974 Count => -1,
1975 Notes => '3 or 4 values',
1976 PrintConv => {
1977 OTHER => sub { shift },
1978 'undef undef undef' => 'n/a',
1979 'undef undef undef undef' => 'n/a (x4)',
1980 },
1981 },
1982 0x500 => { #6
1983 Name => 'WhiteBalance2',
1984 Writable => 'int16u',
1985 PrintConv => {
1986 0 => 'Auto',
1987 1 => 'Auto (Keep Warm Color Off)', #IB
1988 16 => '7500K (Fine Weather with Shade)',
1989 17 => '6000K (Cloudy)',
1990 18 => '5300K (Fine Weather)',
1991 20 => '3000K (Tungsten light)',
1992 21 => '3600K (Tungsten light-like)',
1993 22 => 'Auto Setup', #IB
1994 23 => '5500K (Flash)', #IB
1995 33 => '6600K (Daylight fluorescent)',
1996 34 => '4500K (Neutral white fluorescent)',
1997 35 => '4000K (Cool white fluorescent)',
1998 36 => 'White Fluorescent', #IB
1999 48 => '3600K (Tungsten light-like)',
2000 67 => 'Underwater', #IB
2001 256 => 'One Touch WB 1', #IB
2002 257 => 'One Touch WB 2', #IB
2003 258 => 'One Touch WB 3', #IB
2004 259 => 'One Touch WB 4', #IB
2005 512 => 'Custom WB 1', #IB
2006 513 => 'Custom WB 2', #IB
2007 514 => 'Custom WB 3', #IB
2008 515 => 'Custom WB 4', #IB
2009 },
2010 },
2011 0x501 => { #PH/4
2012 Name => 'WhiteBalanceTemperature',
2013 Writable => 'int16u',
2014 PrintConv => '$val ? $val : "Auto"',
2015 PrintConvInv => '$val=~/^\d+$/ ? $val : 0',
2016 },
2017 0x502 => { #PH/4
2018 Name => 'WhiteBalanceBracket',
2019 Writable => 'int16s',
2020 },
2021 0x503 => { #PH/4/6
2022 Name => 'CustomSaturation',
2023 Writable => 'int16s',
2024 Count => 3,
2025 Notes => '3 numbers: 1. CS Value, 2. Min, 3. Max',
2026 PrintConv => q{
2027 my ($a,$b,$c)=split ' ',$val;
2028 if ($self->{Model} =~ /^E-1\b/) {
2029 $a-=$b; $c-=$b;
2030 return "CS$a (min CS0, max CS$c)";
2031 } else {
2032 return "$a (min $b, max $c)";
2033 }
2034 },
2035 },
2036 0x504 => { #PH/4
2037 Name => 'ModifiedSaturation',
2038 Writable => 'int16u',
2039 PrintConv => {
2040 0 => 'Off',
2041 1 => 'CM1 (Red Enhance)',
2042 2 => 'CM2 (Green Enhance)',
2043 3 => 'CM3 (Blue Enhance)',
2044 4 => 'CM4 (Skin Tones)',
2045 },
2046 },
2047 0x505 => { #PH/4
2048 Name => 'ContrastSetting',
2049 Writable => 'int16s',
2050 Count => 3,
2051 Notes => 'value, min, max',
2052 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
2053 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
2054 },
2055 0x506 => { #PH/4
2056 Name => 'SharpnessSetting',
2057 Writable => 'int16s',
2058 Count => 3,
2059 Notes => 'value, min, max',
2060 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
2061 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
2062 },
2063 0x507 => { #PH/4
2064 Name => 'ColorSpace',
2065 Writable => 'int16u',
2066 PrintConv => { #6
2067 0 => 'sRGB',
2068 1 => 'Adobe RGB',
2069 2 => 'Pro Photo RGB',
2070 },
2071 },
2072 0x509 => { #6
2073 Name => 'SceneMode',
2074 Writable => 'int16u',
2075 PrintConvColumns => 2,
2076 PrintConv => {
2077 0 => 'Standard',
2078 6 => 'Auto', #6
2079 7 => 'Sport',
2080 8 => 'Portrait',
2081 9 => 'Landscape+Portrait',
2082 10 => 'Landscape',
2083 11 => 'Night Scene',
2084 12 => 'Self Portrait', #11
2085 13 => 'Panorama', #6
2086 14 => '2 in 1', #11
2087 15 => 'Movie', #11
2088 16 => 'Landscape+Portrait', #6
2089 17 => 'Night+Portrait',
2090 18 => 'Indoor', #11 (Party - PH)
2091 19 => 'Fireworks',
2092 20 => 'Sunset',
2093 21 => 'Beauty Skin', #PH
2094 22 => 'Macro',
2095 23 => 'Super Macro', #11
2096 24 => 'Food', #11
2097 25 => 'Documents',
2098 26 => 'Museum',
2099 27 => 'Shoot & Select', #11
2100 28 => 'Beach & Snow',
2101 29 => 'Self Protrait+Timer', #11
2102 30 => 'Candle',
2103 31 => 'Available Light', #11
2104 32 => 'Behind Glass', #11
2105 33 => 'My Mode', #11
2106 34 => 'Pet', #11
2107 35 => 'Underwater Wide1', #6
2108 36 => 'Underwater Macro', #6
2109 37 => 'Shoot & Select1', #11
2110 38 => 'Shoot & Select2', #11
2111 39 => 'High Key',
2112 40 => 'Digital Image Stabilization', #6
2113 41 => 'Auction', #11
2114 42 => 'Beach', #11
2115 43 => 'Snow', #11
2116 44 => 'Underwater Wide2', #6
2117 45 => 'Low Key', #6
2118 46 => 'Children', #6
2119 47 => 'Vivid', #11
2120 48 => 'Nature Macro', #6
2121 49 => 'Underwater Snapshot', #11
2122 50 => 'Shooting Guide', #11
2123 54 => 'Face Portrait', #11
2124 57 => 'Bulb', #11
2125 59 => 'Smile Shot', #11
2126 60 => 'Quick Shutter', #11
2127 63 => 'Slow Shutter', #11
2128 64 => 'Bird Watching', #11
2129 65 => 'Multiple Exposure', #11
2130 66 => 'e-Portrait', #11
2131 67 => 'Soft Background Shot', #11
2132 142 => 'Hand-held Starlight', #PH (SH-21)
2133 154 => 'HDR', #PH (XZ-2)
2134 197 => 'Panning', #forum11631 (EM5iii)
2135 203 => 'Light Trails', #forum11631 (EM5iii)
2136 204 => 'Backlight HDR', #forum11631 (EM5iii)
2137 205 => 'Silent', #forum11631 (EM5iii)
2138 206 => 'Multi Focus Shot', #forum11631 (EM5iii)
2139 },
2140 },
2141 0x50a => { #PH/4/6
2142 Name => 'NoiseReduction',
2143 Writable => 'int16u',
2144 PrintConv => {
2145 0 => '(none)',
2146 BITMASK => {
2147 0 => 'Noise Reduction',
2148 1 => 'Noise Filter',
2149 2 => 'Noise Filter (ISO Boost)',
2150 3 => 'Auto', #11
2151 },
2152 },
2153 },
2154 0x50b => { #6
2155 Name => 'DistortionCorrection',
2156 Writable => 'int16u',
2157 PrintConv => \%offOn,
2158 },
2159 0x50c => { #PH/4
2160 Name => 'ShadingCompensation',
2161 Writable => 'int16u',
2162 PrintConv => \%offOn,
2163 },
2164 0x50d => { Name => 'CompressionFactor', Writable => 'rational64u' }, #PH/4
2165 0x50f => { #6
2166 Name => 'Gradation',
2167 Writable => 'int16s',
2168 Notes => '3 or 4 values',
2169 Count => -1,
2170 Relist => [ [0..2], 3 ], # join values 0-2 for PrintConv
2171 PrintConv => [{
2172 '0 0 0' => 'n/a', #PH (?)
2173 '-1 -1 1' => 'Low Key',
2174 '0 -1 1' => 'Normal',
2175 '1 -1 1' => 'High Key',
2176 },{
2177 0 => 'User-Selected',
2178 1 => 'Auto-Override',
2179 }],
2180 },
2181 0x520 => { #6
2182 Name => 'PictureMode',
2183 Writable => 'int16u',
2184 Notes => '1 or 2 values',
2185 Count => -1,
2186 PrintConv => [{
2187 1 => 'Vivid',
2188 2 => 'Natural',
2189 3 => 'Muted',
2190 4 => 'Portrait',
2191 5 => 'i-Enhance', #11
2192 6 => 'e-Portrait', #23
2193 7 => 'Color Creator', #23
2194 9 => 'Color Profile 1', #23
2195 10 => 'Color Profile 2', #23
2196 11 => 'Color Profile 3', #23
2197 12 => 'Monochrome Profile 1', #23
2198 13 => 'Monochrome Profile 2', #23
2199 14 => 'Monochrome Profile 3', #23
2200 256 => 'Monotone',
2201 512 => 'Sepia',
2202 }],
2203 },
2204 0x521 => { #6
2205 Name => 'PictureModeSaturation',
2206 Writable => 'int16s',
2207 Count => 3,
2208 Notes => 'value, min, max',
2209 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
2210 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
2211 },
2212 0x522 => { #6
2213 Name => 'PictureModeHue',
2214 Writable => 'int16s',
2215 Unknown => 1, # (needs verification)
2216 },
2217 0x523 => { #6
2218 Name => 'PictureModeContrast',
2219 Writable => 'int16s',
2220 Count => 3,
2221 Notes => 'value, min, max',
2222 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
2223 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
2224 },
2225 0x524 => { #6
2226 Name => 'PictureModeSharpness',
2227 # verified as the Sharpness setting in the Picture Mode menu for the E-410
2228 Writable => 'int16s',
2229 Count => 3,
2230 Notes => 'value, min, max',
2231 PrintConv => 'my @v=split " ",$val; "$v[0] (min $v[1], max $v[2])"',
2232 PrintConvInv => '$val=~tr/-0-9 //dc;$val',
2233 },
2234 0x525 => { #6
2235 Name => 'PictureModeBWFilter',
2236 Writable => 'int16s',
2237 PrintConvColumns => 2,
2238 PrintConv => {
2239 0 => 'n/a',
2240 1 => 'Neutral',
2241 2 => 'Yellow',
2242 3 => 'Orange',
2243 4 => 'Red',
2244 5 => 'Green',
2245 },
2246 },
2247 0x526 => { #6
2248 Name => 'PictureModeTone',
2249 Writable => 'int16s',
2250 PrintConvColumns => 2,
2251 PrintConv => {
2252 0 => 'n/a',
2253 1 => 'Neutral',
2254 2 => 'Sepia',
2255 3 => 'Blue',
2256 4 => 'Purple',
2257 5 => 'Green',
2258 },
2259 },
2260 0x527 => { #12
2261 Name => 'NoiseFilter',
2262 Writable => 'int16s',
2263 Count => 3,
2264 PrintConv => {
2265 '0 0 0' => 'n/a', #PH (?)
2266 '-2 -2 1' => 'Off',
2267 '-1 -2 1' => 'Low',
2268 '0 -2 1' => 'Standard',
2269 '1 -2 1' => 'High',
2270 },
2271 },
2272 0x529 => { #PH
2273 Name => 'ArtFilter',
2274 Writable => 'int16u',
2275 Count => 4,
2276 PrintConvColumns => 2,
2277 PrintConv => [ \%filters ],
2278 },
2279 0x52c => { #PH
2280 Name => 'MagicFilter',
2281 Writable => 'int16u',
2282 Count => 4, # (2nd number is 0, 1280 or 1792, 3rd/4th are 0)
2283 # (1792 observed for E-5 Gentle Sepia and XZ-1 Dramatic Tone)
2284 PrintConvColumns => 2,
2285 PrintConv => [ \%filters ],
2286 },
2287 0x52d => { #11
2288 Name => 'PictureModeEffect',
2289 Writable => 'int16s',
2290 Count => 3,
2291 PrintConv => {
2292 '0 0 0' => 'n/a', #PH (?)
2293 '-1 -1 1' => 'Low',
2294 '0 -1 1' => 'Standard',
2295 '1 -1 1' => 'High',
2296 },
2297 },
2298 0x52e => { #11/PH
2299 Name => 'ToneLevel',
2300 PrintConv => [
2301 \%toneLevelType,
2302 undef, # (highlights value)
2303 undef, # (highlights min)
2304 undef, # (highlights max)
2305 \%toneLevelType,
2306 undef, # (shadows value)
2307 undef, # (shadows min)
2308 undef, # (shadows max)
2309 \%toneLevelType,
2310 undef, # (midtones value)
2311 undef, # (midtones min)
2312 undef, # (midtones max)
2313 \%toneLevelType,
2314 undef,
2315 undef,
2316 undef,
2317 \%toneLevelType,
2318 undef,
2319 undef,
2320 undef,
2321 \%toneLevelType,
2322 undef,
2323 undef,
2324 undef,
2325 \%toneLevelType,
2326 undef,
2327 undef,
2328 undef,
2329 ]
2330 },
2331 0x52f => { #PH
2332 Name => 'ArtFilterEffect',
2333 Writable => 'int16u',
2334 Count => 20,
2335 PrintHex => 1,
2336 PrintConvColumns => 2,
2337 PrintConv => [
2338 \%filters,
2339 undef,
2340 undef,
2341 '"Partial Color $val"', #23
2342 { # there are 5 available art filter effects for the E-PL3...
2343 0x0000 => 'No Effect',
2344 0x8010 => 'Star Light',
2345 0x8020 => 'Pin Hole',
2346 0x8030 => 'Frame',
2347 0x8040 => 'Soft Focus',
2348 0x8050 => 'White Edge',
2349 0x8060 => 'B&W', # (NC - E-PL2 with "Grainy Film" filter)
2350 0x8080 => 'Blur Top and Bottom', #23
2351 0x8081 => 'Blur Left and Right', #23
2352 # (E-PL2 also has "Pict. Tone" effect)
2353 },
2354 undef,
2355 { #23
2356 0 => 'No Color Filter',
2357 1 => 'Yellow Color Filter',
2358 2 => 'Orange Color Filter',
2359 3 => 'Red Color Filter',
2360 4 => 'Green Color Filter',
2361 },
2362 ],
2363 },
2364 0x532 => { #23
2365 Name => 'ColorCreatorEffect',
2366 Writable => 'int16s',
2367 Count => 6,
2368 PrintConv => [
2369 '"Color $val"',
2370 undef, # (Color min)
2371 undef, # (Color max)
2372 '"Strength $val"',
2373 undef, # (Strength min)
2374 undef, # (Strength max)
2375 ],
2376 },
2377 0x537 => { #23
2378 Name => 'MonochromeProfileSettings',
2379 Writable => 'int16s',
2380 Count => 6,
2381 PrintConv => [
2382 {
2383 0 => 'No Filter',
2384 1 => 'Yellow Filter',
2385 2 => 'Orange Filter',
2386 3 => 'Red Filter',
2387 4 => 'Magenta Filter',
2388 5 => 'Blue Filter',
2389 6 => 'Cyan Filter',
2390 7 => 'Green Filter',
2391 8 => 'Yellow-green Filter',
2392 },
2393 undef, # (Filter number min)
2394 undef, # (Filter number max)
2395 '"Strength $val"',
2396 undef, # (Strength min)
2397 undef, # (Strength max)
2398 ],
2399 },
2400 0x538 => { #23
2401 Name => 'FilmGrainEffect',
2402 Writable => 'int16s',
2403 PrintConv => {
2404 0 => 'Off',
2405 1 => 'Low',
2406 2 => 'Medium',
2407 3 => 'High',
2408 },
2409 },
2410 0x539 => { #23
2411 Name => 'ColorProfileSettings',
2412 Writable => 'int16s',
2413 Count => 14,
2414 PrintConv => [
2415 '"Min $val"',
2416 '"Max $val"',
2417 '"Yellow $val"',
2418 '"Orange $val"',
2419 '"Orange-red $val"',
2420 '"Red $val"',
2421 '"Magenta $val"',
2422 '"Violet $val"',
2423 '"Blue $val"',
2424 '"Blue-cyan $val"',
2425 '"Cyan $val"',
2426 '"Green-cyan $val"',
2427 '"Green $val"',
2428 '"Yellow-green $val"',
2429 ],
2430 },
2431 0x53a => { #23
2432 Name => 'MonochromeVignetting',
2433 Writable => 'int16s',
2434 Notes => '-5 to +5: positive is white vignetting, negative is black vignetting',
2435 },
2436 0x53b => { #23
2437 Name => 'MonochromeColor',
2438 Writable => 'int16s',
2439 PrintConv => {
2440 0 => '(none)',
2441 1 => 'Normal',
2442 2 => 'Sepia',
2443 3 => 'Blue',
2444 4 => 'Purple',
2445 5 => 'Green',
2446 },
2447 },
2448 0x600 => { #PH/4/22
2449 Name => 'DriveMode',
2450 Writable => 'int16u',
2451 Count => -1,
2452 Notes => '2, 3 or 5 numbers: 1. Mode, 2. Shot number, 3. Mode bits, 5. Shutter mode',
2453 PrintConv => q{
2454 my ($a,$b,$c,$d,$e) = split ' ',$val;
2455 if ($e) {
2456 $e = '; ' . ({ 2 => 'Anti-shock 0', 4 => 'Electronic shutter' }->{$e} || "Unknown ($e)");
2457 } else {
2458 $e = '';
2459 }
2460 return "Single Shot$e" unless $a;
2461 if ($a == 5 and defined $c) {
2462 $a = DecodeBits($c, { #6
2463 0 => 'AE',
2464 1 => 'WB',
2465 2 => 'FL',
2466 3 => 'MF',
2467 4 => 'ISO', #forum8906
2468 5 => 'AE Auto', #forum8906
2469 6 => 'Focus', #PH
2470 }) . ' Bracketing';
2471 $a =~ s/, /+/g;
2472 } else {
2473 my %a = (
2474 1 => 'Continuous Shooting',
2475 2 => 'Exposure Bracketing',
2476 3 => 'White Balance Bracketing',
2477 4 => 'Exposure+WB Bracketing', #6
2478 );
2479 $a = $a{$a} || "Unknown ($a)";
2480 }
2481 return "$a, Shot $b$e";
2482 },
2483 },
2484 0x601 => { #6
2485 Name => 'PanoramaMode',
2486 Writable => 'int16u',
2487 Notes => '2 numbers: 1. Mode, 2. Shot number',
2488 PrintConv => q{
2489 my ($a,$b) = split ' ',$val;
2490 return 'Off' unless $a;
2491 my %a = (
2492 1 => 'Left to Right',
2493 2 => 'Right to Left',
2494 3 => 'Bottom to Top',
2495 4 => 'Top to Bottom',
2496 );
2497 return(($a{$a} || "Unknown ($a)") . ', Shot ' . $b);
2498 },
2499 },
2500 0x603 => { #PH/4
2501 Name => 'ImageQuality2',
2502 Writable => 'int16u',
2503 PrintConv => {
2504 1 => 'SQ',
2505 2 => 'HQ',
2506 3 => 'SHQ',
2507 4 => 'RAW',
2508 5 => 'SQ (5)', # (E-500)
2509 },
2510 },
2511 0x604 => { #PH
2512 Name => 'ImageStabilization',
2513 Writable => 'int32u',
2514 DataMember => 'ImageStabilization',
2515 RawConv => '$$self{ImageStabilization} = $val',
2516 PrintConv => {
2517 0 => 'Off',
2518 1 => 'On, Mode 1',
2519 2 => 'On, Mode 2',
2520 3 => 'On, Mode 3',
2521 4 => 'On, Mode 4', # (NC, E-P5)
2522 },
2523 },
2524 0x804 => { #PH (E-M1 with firmware update)
2525 Name => 'StackedImage',
2526 Writable => 'int32u',
2527 Count => 2,
2528 PrintConv => {
2529 '0 0' => 'No',
2530 '1 *' => 'Live Composite (* images)', #24
2531 '4 *' => 'Live Time/Bulb (* images)', #24
2532 '3 2' => 'ND2 (1EV)', #IB
2533 '3 4' => 'ND4 (2EV)', #IB
2534 '3 8' => 'ND8 (3EV)', #IB
2535 '3 16' => 'ND16 (4EV)', #IB
2536 '3 32' => 'ND32 (5EV)', #IB
2537 '5 4' => 'HDR1', #forum8906
2538 '6 4' => 'HDR2', #forum8906
2539 '8 8' => 'Tripod high resolution', #IB
2540 '9 *' => 'Focus-stacked (* images)', #IB (* = 2-15)
2541 '11 16' => 'Hand-held high resolution', #IB (perhaps '11 15' would be possible, ref 24)
2542 OTHER => sub {
2543 my ($val, $inv, $conv) = @_;
2544 if ($inv) {
2545 $val = lc $val;
2546 return undef unless $val =~ s/(\d+) images/\* images/;
2547 my $num = $1;
2548 foreach (keys %$conv) {
2549 next unless $val eq lc $$conv{$_};
2550 ($val = $_) =~ s/\*/$num/ or return undef;
2551 return $val;
2552 }
2553 } else {
2554 return "Unknown ($_[0])" unless $val =~ s/ (\d+)/ \*/ and $$conv{$val};
2555 my $num = $1;
2556 ($val = $$conv{$val}) =~ s/\*/$num/;
2557 return $val;
2558 }
2559 },
2560 },
2561 },
2562 0x900 => { #11
2563 Name => 'ManometerPressure',
2564 Writable => 'int16u',
2565 ValueConv => '$val / 10',
2566 ValueConvInv => '$val * 10',
2567 PrintConv => '"$val kPa"',
2568 PrintConvInv => '$val=~s/ ?kPa//i; $val',
2569 },
2570 0x901 => { #PH (u770SW)
2571 # 2 numbers: 1st looks like meters above sea level, 2nd is usually 3x the 1st (feet?)
2572 Name => 'ManometerReading',
2573 Writable => 'int32s',
2574 Count => 2,
2575 ValueConv => 'my @a=split(" ",$val); $_ /= 10 foreach @a; "@a"',
2576 ValueConvInv => 'my @a=split(" ",$val); $_ *= 10 foreach @a; "@a"',
2577 PrintConv => '$val=~s/(\S+) (\S+)/$1 m, $2 ft/; $val',
2578 PrintConvInv => '$val=~s/ ?(m|ft)//gi; $val',
2579 },
2580 0x902 => { #11
2581 Name => 'ExtendedWBDetect',
2582 Writable => 'int16u',
2583 PrintConv => \%offOn,
2584 },
2585 0x903 => { #11
2586 Name => 'RollAngle',
2587 Notes => 'converted to degrees of clockwise camera rotation',
2588 Writable => 'int16s',
2589 Count => 2, # (second value is 0 if level gauge is off)
2590 # negate to express as clockwise rotation
2591 ValueConv => '$val=~s/ 1$// ? -$val/10 : "n/a"',
2592 ValueConvInv => 'IsFloat($val) ? sprintf("%.0f 1",-$val*10) : "0 0"',
2593 },
2594 0x904 => { #11
2595 Name => 'PitchAngle',
2596 Notes => 'converted to degrees of upward camera tilt',
2597 Writable => 'int16s',
2598 Count => 2, # (second value is 0 if level gauge is off)
2599 ValueConv => '$val =~ s/ 1$// ? $val / 10 : "n/a"',
2600 ValueConvInv => 'IsFloat($val) ? sprintf("%.0f 1",$val*10) : "0 0"',
2601 },
2602 0x908 => { #PH (NC, E-M1)
2603 Name => 'DateTimeUTC',
2604 Writable => 'string',
2605 Groups => { 2 => 'Time' },
2606 Shift => 'Time',
2607 PrintConv => '$self->ConvertDateTime($val)',
2608 PrintConvInv => '$self->InverseDateTime($val,undef,1)',
2609 },
2610);
2611
2612# Olympus RAW processing IFD (ref 6)
2613%Image::ExifTool::Olympus::RawDevelopment = (
2614 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
2615 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
2616 WRITABLE => 1,
2617 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2618 0x000 => { #PH
2619 Name => 'RawDevVersion',
2620 Writable => 'undef',
2621 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
2622 Count => 4,
2623 },
2624 0x100 => { Name => 'RawDevExposureBiasValue', Writable => 'rational64s' },
2625 0x101 => { Name => 'RawDevWhiteBalanceValue', Writable => 'int16u' },
2626 0x102 => { Name => 'RawDevWBFineAdjustment', Writable => 'int16s' },
2627 0x103 => { Name => 'RawDevGrayPoint', Writable => 'int16u', Count => 3 },
2628 0x104 => { Name => 'RawDevSaturationEmphasis', Writable => 'int16s', Count => 3 },
2629 0x105 => { Name => 'RawDevMemoryColorEmphasis', Writable => 'int16u' },
2630 0x106 => { Name => 'RawDevContrastValue', Writable => 'int16s', Count => 3 },
2631 0x107 => { Name => 'RawDevSharpnessValue', Writable => 'int16s', Count => 3 },
2632 0x108 => {
2633 Name => 'RawDevColorSpace',
2634 Writable => 'int16u',
2635 PrintConv => { #11
2636 0 => 'sRGB',
2637 1 => 'Adobe RGB',
2638 2 => 'Pro Photo RGB',
2639 },
2640 },
2641 0x109 => {
2642 Name => 'RawDevEngine',
2643 Writable => 'int16u',
2644 PrintConv => { #11
2645 0 => 'High Speed',
2646 1 => 'High Function',
2647 2 => 'Advanced High Speed',
2648 3 => 'Advanced High Function',
2649 },
2650 },
2651 0x10a => {
2652 Name => 'RawDevNoiseReduction',
2653 Writable => 'int16u',
2654 PrintConv => { #11
2655 0 => '(none)',
2656 BITMASK => {
2657 0 => 'Noise Reduction',
2658 1 => 'Noise Filter',
2659 2 => 'Noise Filter (ISO Boost)',
2660 },
2661 },
2662 },
2663 0x10b => {
2664 Name => 'RawDevEditStatus',
2665 Writable => 'int16u',
2666 PrintConv => { #11
2667 0 => 'Original',
2668 1 => 'Edited (Landscape)',
2669 6 => 'Edited (Portrait)',
2670 8 => 'Edited (Portrait)',
2671 },
2672 },
2673 0x10c => {
2674 Name => 'RawDevSettings',
2675 Writable => 'int16u',
2676 PrintConv => { #11
2677 0 => '(none)',
2678 BITMASK => {
2679 0 => 'WB Color Temp',
2680 1 => 'WB Gray Point',
2681 2 => 'Saturation',
2682 3 => 'Contrast',
2683 4 => 'Sharpness',
2684 5 => 'Color Space',
2685 6 => 'High Function',
2686 7 => 'Noise Reduction',
2687 },
2688 },
2689 },
2690);
2691
2692# Olympus RAW processing B IFD (ref 11)
2693%Image::ExifTool::Olympus::RawDevelopment2 = (
2694 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
2695 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
2696 WRITABLE => 1,
2697 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2698 0x000 => {
2699 Name => 'RawDevVersion',
2700 Writable => 'undef',
2701 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
2702 Count => 4,
2703 },
2704 0x100 => { Name => 'RawDevExposureBiasValue', Writable => 'rational64s' },
2705 0x101 => {
2706 Name => 'RawDevWhiteBalance',
2707 Writable => 'int16u',
2708 PrintConv => {
2709 1 => 'Color Temperature',
2710 2 => 'Gray Point',
2711 },
2712 },
2713 0x102 => { Name => 'RawDevWhiteBalanceValue', Writable => 'int16u' },
2714 0x103 => { Name => 'RawDevWBFineAdjustment', Writable => 'int16s' },
2715 0x104 => { Name => 'RawDevGrayPoint', Writable => 'int16u', Count => 3 },
2716 0x105 => { Name => 'RawDevContrastValue', Writable => 'int16s', Count => 3 },
2717 0x106 => { Name => 'RawDevSharpnessValue', Writable => 'int16s', Count => 3 },
2718 0x107 => { Name => 'RawDevSaturationEmphasis', Writable => 'int16s', Count => 3 },
2719 0x108 => { Name => 'RawDevMemoryColorEmphasis', Writable => 'int16u' },
2720 0x109 => {
2721 Name => 'RawDevColorSpace',
2722 Writable => 'int16u',
2723 PrintConv => {
2724 0 => 'sRGB',
2725 1 => 'Adobe RGB',
2726 2 => 'Pro Photo RGB',
2727 },
2728 },
2729 0x10a => {
2730 Name => 'RawDevNoiseReduction',
2731 Writable => 'int16u',
2732 PrintConv => {
2733 0 => '(none)',
2734 BITMASK => {
2735 0 => 'Noise Reduction',
2736 1 => 'Noise Filter',
2737 2 => 'Noise Filter (ISO Boost)',
2738 },
2739 },
2740 },
2741 0x10b => {
2742 Name => 'RawDevEngine',
2743 Writable => 'int16u',
2744 PrintConv => {
2745 0 => 'High Speed',
2746 1 => 'High Function',
2747 },
2748 },
2749 0x10c => {
2750 Name => 'RawDevPictureMode',
2751 Writable => 'int16u',
2752 PrintConv => {
2753 1 => 'Vivid',
2754 2 => 'Natural',
2755 3 => 'Muted',
2756 256 => 'Monotone',
2757 512 => 'Sepia',
2758 },
2759 },
2760 0x10d => { Name => 'RawDevPMSaturation', Writable => 'int16s', Count => 3 },
2761 0x10e => { Name => 'RawDevPMContrast', Writable => 'int16s', Count => 3 },
2762 0x10f => { Name => 'RawDevPMSharpness', Writable => 'int16s', Count => 3 },
2763 0x110 => {
2764 Name => 'RawDevPM_BWFilter',
2765 Writable => 'int16u',
2766 PrintConv => {
2767 1 => 'Neutral',
2768 2 => 'Yellow',
2769 3 => 'Orange',
2770 4 => 'Red',
2771 5 => 'Green',
2772 },
2773 },
2774 0x111 => {
2775 Name => 'RawDevPMPictureTone',
2776 Writable => 'int16u',
2777 PrintConv => {
2778 1 => 'Neutral',
2779 2 => 'Sepia',
2780 3 => 'Blue',
2781 4 => 'Purple',
2782 5 => 'Green',
2783 },
2784 },
2785 0x112 => { Name => 'RawDevGradation', Writable => 'int16s', Count => 3 },
2786 0x113 => { Name => 'RawDevSaturation3', Writable => 'int16s', Count => 3 }, #(NC Count)
2787 0x119 => { Name => 'RawDevAutoGradation', Writable => 'int16u', PrintConv => \%offOn },
2788 0x120 => { Name => 'RawDevPMNoiseFilter', Writable => 'int16u' }, #(NC format)
2789 0x121 => { #PH (E-P5)
2790 Name => 'RawDevArtFilter',
2791 Writable => 'int16u',
2792 Count => 4,
2793 PrintConvColumns => 2,
2794 PrintConv => [ \%filters ],
2795 },
2796);
2797
2798# Olympus Image processing IFD
2799%Image::ExifTool::Olympus::ImageProcessing = (
2800 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
2801 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
2802 WRITABLE => 1,
2803 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2804 0x000 => { #PH
2805 Name => 'ImageProcessingVersion',
2806 Writable => 'undef',
2807 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
2808 Count => 4,
2809 },
2810 0x100 => { Name => 'WB_RBLevels', Writable => 'int16u', Count => 2 }, #6
2811 # 0x101 - in-camera AutoWB unless it is all 0's or all 256's (ref IB)
2812 0x102 => { Name => 'WB_RBLevels3000K', Writable => 'int16u', Count => 2 }, #11
2813 0x103 => { Name => 'WB_RBLevels3300K', Writable => 'int16u', Count => 2 }, #11
2814 0x104 => { Name => 'WB_RBLevels3600K', Writable => 'int16u', Count => 2 }, #11
2815 0x105 => { Name => 'WB_RBLevels3900K', Writable => 'int16u', Count => 2 }, #11
2816 0x106 => { Name => 'WB_RBLevels4000K', Writable => 'int16u', Count => 2 }, #11
2817 0x107 => { Name => 'WB_RBLevels4300K', Writable => 'int16u', Count => 2 }, #11
2818 0x108 => { Name => 'WB_RBLevels4500K', Writable => 'int16u', Count => 2 }, #11
2819 0x109 => { Name => 'WB_RBLevels4800K', Writable => 'int16u', Count => 2 }, #11
2820 0x10a => { Name => 'WB_RBLevels5300K', Writable => 'int16u', Count => 2 }, #11
2821 0x10b => { Name => 'WB_RBLevels6000K', Writable => 'int16u', Count => 2 }, #11
2822 0x10c => { Name => 'WB_RBLevels6600K', Writable => 'int16u', Count => 2 }, #11
2823 0x10d => { Name => 'WB_RBLevels7500K', Writable => 'int16u', Count => 2 }, #11
2824 0x10e => { Name => 'WB_RBLevelsCWB1', Writable => 'int16u', Count => 2 }, #11
2825 0x10f => { Name => 'WB_RBLevelsCWB2', Writable => 'int16u', Count => 2 }, #11
2826 0x110 => { Name => 'WB_RBLevelsCWB3', Writable => 'int16u', Count => 2 }, #11
2827 0x111 => { Name => 'WB_RBLevelsCWB4', Writable => 'int16u', Count => 2 }, #11
2828 0x113 => { Name => 'WB_GLevel3000K', Writable => 'int16u' }, #11
2829 0x114 => { Name => 'WB_GLevel3300K', Writable => 'int16u' }, #11
2830 0x115 => { Name => 'WB_GLevel3600K', Writable => 'int16u' }, #11
2831 0x116 => { Name => 'WB_GLevel3900K', Writable => 'int16u' }, #11
2832 0x117 => { Name => 'WB_GLevel4000K', Writable => 'int16u' }, #11
2833 0x118 => { Name => 'WB_GLevel4300K', Writable => 'int16u' }, #11
2834 0x119 => { Name => 'WB_GLevel4500K', Writable => 'int16u' }, #11
2835 0x11a => { Name => 'WB_GLevel4800K', Writable => 'int16u' }, #11
2836 0x11b => { Name => 'WB_GLevel5300K', Writable => 'int16u' }, #11
2837 0x11c => { Name => 'WB_GLevel6000K', Writable => 'int16u' }, #11
2838 0x11d => { Name => 'WB_GLevel6600K', Writable => 'int16u' }, #11
2839 0x11e => { Name => 'WB_GLevel7500K', Writable => 'int16u' }, #11
2840 0x11f => { Name => 'WB_GLevel', Writable => 'int16u' }, #11
2841 # 0x121 = WB preset for flash (about 6000K) (ref IB)
2842 # 0x125 = WB preset for underwater (ref IB)
2843 0x200 => { #6
2844 Name => 'ColorMatrix',
2845 Writable => 'int16u',
2846 Format => 'int16s',
2847 Count => 9,
2848 },
2849 # color matrices (ref 11):
2850 # 0x0201-0x020d are sRGB color matrices
2851 # 0x020e-0x021a are Adobe RGB color matrices
2852 # 0x021b-0x0227 are ProPhoto RGB color matrices
2853 # 0x0228 and 0x0229 are ColorMatrix for E-330
2854 # 0x0250-0x0252 are sRGB color matrices
2855 # 0x0253-0x0255 are Adobe RGB color matrices
2856 # 0x0256-0x0258 are ProPhoto RGB color matrices
2857 0x300 => { Name => 'Enhancer', Writable => 'int16u' }, #11
2858 0x301 => { Name => 'EnhancerValues', Writable => 'int16u', Count => 7 }, #11
2859 0x310 => { Name => 'CoringFilter', Writable => 'int16u' }, #11
2860 0x311 => { Name => 'CoringValues', Writable => 'int16u', Count => 7 }, #11
2861 0x600 => { Name => 'BlackLevel2', Writable => 'int16u', Count => 4 }, #11
2862 0x610 => { Name => 'GainBase', Writable => 'int16u' }, #11
2863 0x611 => { Name => 'ValidBits', Writable => 'int16u', Count => 2 }, #4/6
2864 0x612 => { Name => 'CropLeft', Writable => 'int16u', Count => 2 }, #11
2865 0x613 => { Name => 'CropTop', Writable => 'int16u', Count => 2 }, #11
2866 0x614 => { Name => 'CropWidth', Writable => 'int32u' }, #PH/11
2867 0x615 => { Name => 'CropHeight', Writable => 'int32u' }, #PH/11
2868 0x635 => { #PH (data starts with "CMIO\x01\0")
2869 Name => 'UnknownBlock1',
2870 Writable => 'undef',
2871 Notes => 'large unknown data block in ORF images but not JPG images',
2872 # 'Drop' because too large for APP1 in JPEG images
2873 Flags => [ 'Unknown', 'Binary', 'Drop' ],
2874 },
2875 0x636 => { #PH (data starts with "CMIO\x01\0")
2876 Name => 'UnknownBlock2',
2877 Writable => 'undef',
2878 Notes => 'large unknown data block in ORF images but not JPG images',
2879 # 'Drop' because too large for APP1 in JPEG images
2880 Flags => [ 'Unknown', 'Binary', 'Drop' ],
2881 },
2882 # 0x800 LensDistortionParams, float[9] (ref 11)
2883 # 0x801 LensShadingParams, int16u[16] (ref 11)
2884 0x0805 => { #IB
2885 Name => 'SensorCalibration',
2886 Notes => '2 numbers: 1. Recommended maximum, 2. Calibration midpoint',
2887 Writable => 'int16s',
2888 Count => 2,
2889 },
2890 # 0x1010-0x1012 are the processing options used in camera or in
2891 # Olympus software, which 0x050a-0x050c are in-camera only (ref 6)
2892 0x1010 => { #PH/4
2893 Name => 'NoiseReduction2',
2894 Writable => 'int16u',
2895 PrintConv => {
2896 0 => '(none)',
2897 BITMASK => {
2898 0 => 'Noise Reduction',
2899 1 => 'Noise Filter',
2900 2 => 'Noise Filter (ISO Boost)',
2901 },
2902 },
2903 },
2904 0x1011 => { #6
2905 Name => 'DistortionCorrection2',
2906 Writable => 'int16u',
2907 PrintConv => \%offOn,
2908 },
2909 0x1012 => { #PH/4
2910 Name => 'ShadingCompensation2',
2911 Writable => 'int16u',
2912 PrintConv => \%offOn,
2913 },
2914 0x101c => { #11
2915 Name => 'MultipleExposureMode',
2916 Writable => 'int16u',
2917 Count => 2,
2918 PrintConv => [{
2919 0 => 'Off',
2920 1 => 'Live Composite', #github issue#61
2921 2 => 'On (2 frames)',
2922 3 => 'On (3 frames)',
2923 }],
2924 },
2925 0x1103 => { #PH
2926 Name => 'UnknownBlock3',
2927 Writable => 'undef',
2928 Notes => 'large unknown data block in ORF images but not JPG images',
2929 # 'Drop' because too large for APP1 in JPEG images
2930 Flags => [ 'Unknown', 'Binary', 'Drop' ],
2931 },
2932 0x1104 => { #PH (overlaps data for 0x1103 in E-M5 ORF images)
2933 Name => 'UnknownBlock4',
2934 Writable => 'undef',
2935 Notes => 'large unknown data block in ORF images but not JPG images',
2936 # 'Drop' because too large for APP1 in JPEG images
2937 Flags => [ 'Unknown', 'Binary', 'Drop' ],
2938 },
2939 0x1112 => { #11
2940 Name => 'AspectRatio',
2941 Writable => 'int8u',
2942 Count => 2,
2943 PrintConv => {
2944 # '0 0' - have seen this with a 16:9 XZ-1 image - PH
2945 '1 1' => '4:3',
2946 '1 4' => '1:1', #PH (E-P5 Storyboard effect, does this indicate 4:3 converted to 6:6?)
2947 '2 1' => '3:2 (RAW)', #forum6285
2948 '2 2' => '3:2',
2949 '3 1' => '16:9 (RAW)', #forum6285
2950 '3 3' => '16:9',
2951 '4 1' => '1:1 (RAW)', #forum6285
2952 '4 4' => '6:6',
2953 '5 5' => '5:4',
2954 '6 6' => '7:6',
2955 '7 7' => '6:5',
2956 '8 8' => '7:5',
2957 '9 1' => '3:4 (RAW)', #forum6285
2958 '9 9' => '3:4',
2959 },
2960 },
2961 0x1113 => { Name => 'AspectFrame', Writable => 'int16u', Count => 4 }, #11
2962 0x1200 => { #11/PH
2963 Name => 'FacesDetected',
2964 Writable => 'int32u',
2965 Count => -1,
2966 Notes => '2 or 3 values',
2967 },
2968 0x1201 => { #11/PH
2969 Name => 'FaceDetectArea',
2970 Writable => 'int16s',
2971 Count => -1, # (varies with model)
2972 Binary => 1, # (too long)
2973 Notes => q{
2974 for models with 2 values in FacesDetected this gives X/Y coordinates in the
2975 FaceDetectFrame for all 4 corners of the face rectangle. For models with 3
2976 values in FacesDetected this gives X/Y coordinates, size and rotation angle
2977 of the face detect square
2978 },
2979 },
2980 0x1202 => { Name => 'MaxFaces', Writable => 'int32u', Count => 3 }, #PH
2981 0x1203 => { #PH
2982 Name => 'FaceDetectFrameSize',
2983 Writable => 'int16u',
2984 Count => 6,
2985 Notes => 'width/height of the full face detect frame',
2986 },
2987 0x1207 => { #PH
2988 Name => 'FaceDetectFrameCrop',
2989 Writable => 'int16s',
2990 Count => 12,
2991 Notes => 'X/Y offset and width/height of the cropped face detect frame',
2992 },
2993 0x1306 => { #PH (NC, E-M1)
2994 Name => 'CameraTemperature',
2995 Writable => 'int16u',
2996 Format => 'int16s', #(NC)
2997 ValueConv => '$val ? $val : undef', # zero for some models (how to differentiate from 0 C?)
2998 Notes => 'this seems to be in degrees C only for some models',
2999 },
3000 0x1900 => { #23
3001 Name => 'KeystoneCompensation',
3002 Writable => 'int8u',
3003 Count => 2,
3004 PrintConv => {
3005 '0 0' => 'Off',
3006 '0 1' => 'On',
3007 },
3008 },
3009 0x1901 => { #23
3010 Name => 'KeystoneDirection',
3011 Writable => 'int8u',
3012 Count => 2,
3013 PrintConv => {
3014 0 => 'Vertical',
3015 1 => 'Horizontal',
3016 },
3017 },
3018 # 0x1905 - focal length (PH, E-M1)
3019 0x1906 => { #23
3020 Name => 'KeystoneValue',
3021 Writable => 'int16s',
3022 Count => 3,
3023 # (use in conjunction with KeystoneDirection, -ve is Top or Right, +ve is Bottom or Left)
3024 Notes => '3 numbers: 1. Keystone Value, 2. Min, 3. Max',
3025 },
3026);
3027
3028# Olympus Focus Info IFD
3029%Image::ExifTool::Olympus::FocusInfo = (
3030 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
3031 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
3032 WRITABLE => 1,
3033 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3034 0x000 => { #PH
3035 Name => 'FocusInfoVersion',
3036 Writable => 'undef',
3037 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
3038 Count => 4,
3039 },
3040 0x209 => { #PH/4
3041 Name => 'AutoFocus',
3042 Writable => 'int16u',
3043 PrintConv => \%offOn,
3044 Unknown => 1, #6
3045 },
3046 0x210 => { Name => 'SceneDetect', Writable => 'int16u' }, #11
3047 0x211 => { #11
3048 Name => 'SceneArea',
3049 Writable => 'int32u',
3050 Count => 8,
3051 Unknown => 1, # (numbers don't make much sense?)
3052 },
3053 0x212 => { #11
3054 Name => 'SceneDetectData',
3055 Writable => 'int32u',
3056 Count => 720,
3057 Binary => 1,
3058 Unknown => 1, # (but what does it mean?)
3059 },
3060 # 0x214 - int16u: normally 0, but 1 for E-M1 focus-bracketing, and have seen 1 and 256 at other times
3061 0x300 => { Name => 'ZoomStepCount', Writable => 'int16u' }, #6
3062 0x301 => { Name => 'FocusStepCount', Writable => 'int16u' }, #11
3063 0x303 => { Name => 'FocusStepInfinity', Writable => 'int16u' }, #11
3064 0x304 => { Name => 'FocusStepNear', Writable => 'int16u' }, #11
3065 0x305 => { #4
3066 Name => 'FocusDistance',
3067 Writable => 'rational64u',
3068 # this rational value looks like it is in mm when the denominator is
3069 # 1 (E-1), and cm when denominator is 10 (E-300), so if we ignore the
3070 # denominator we are consistently in mm - PH
3071 Format => 'int32u',
3072 Count => 2,
3073 ValueConv => q{
3074 my ($a,$b) = split ' ',$val;
3075 return 0 if $a == 0xffffffff;
3076 return $a / 1000;
3077 },
3078 ValueConvInv => q{
3079 return '4294967295 1' unless $val;
3080 $val = int($val * 1000 + 0.5);
3081 return "$val 1";
3082 },
3083 PrintConv => '$val ? "$val m" : "inf"',
3084 PrintConvInv => '$val eq "inf" ? 0 : $val=~s/\s*m$//, $val',
3085 },
3086 0x308 => [ # NEED A BETTER WAY TO DETERMINE WHICH MODELS USE WHICH ENCODING!
3087 {
3088 Name => 'AFPoint',
3089 Condition => '$$self{Model} =~ /E-(3|5|30)\b/',
3090 Writable => 'int16u',
3091 PrintHex => 1,
3092 # decoded by ref 6
3093 Notes => q{
3094 for the E-3, E-5 and E-30 the value is separated into 2 parts: low 5 bits
3095 give AF point, upper bits give AF target selection mode
3096 },
3097 ValueConv => '($val & 0x1f) . " " . ($val & 0xffe0)',
3098 ValueConvInv => 'my @v=split(" ",$val); @v == 2 ? $v[0] + $v[1] : $val',
3099 PrintConvColumns => 2,
3100 PrintConv => [
3101 {
3102 0x00 => '(none)',
3103 0x01 => 'Top-left (horizontal)',
3104 0x02 => 'Top-center (horizontal)',
3105 0x03 => 'Top-right (horizontal)',
3106 0x04 => 'Left (horizontal)',
3107 0x05 => 'Mid-left (horizontal)',
3108 0x06 => 'Center (horizontal)',
3109 0x07 => 'Mid-right (horizontal)',
3110 0x08 => 'Right (horizontal)',
3111 0x09 => 'Bottom-left (horizontal)',
3112 0x0a => 'Bottom-center (horizontal)',
3113 0x0b => 'Bottom-right (horizontal)',
3114 0x0c => 'Top-left (vertical)',
3115 0x0d => 'Top-center (vertical)',
3116 0x0e => 'Top-right (vertical)',
3117 0x0f => 'Left (vertical)',
3118 0x10 => 'Mid-left (vertical)',
3119 0x11 => 'Center (vertical)',
3120 0x12 => 'Mid-right (vertical)',
3121 0x13 => 'Right (vertical)',
3122 0x14 => 'Bottom-left (vertical)',
3123 0x15 => 'Bottom-center (vertical)',
3124 0x16 => 'Bottom-right (vertical)',
3125 0x1f => 'n/a', #PH (NC, E-3)
3126 },
3127 {
3128 0x00 => 'Single Target',
3129 0x40 => 'All Target',
3130 0x80 => 'Dynamic Single Target',
3131 0xe0 => 'n/a', #PH (NC, E-3)
3132 }
3133 ],
3134 },{ #PH (models with 7-point AF)
3135 Name => 'AFPoint',
3136 Condition => '$$self{Model} =~ /E-(520|600|620)\b/',
3137 Notes => 'models with 7-point AF',
3138 Writable => 'int16u',
3139 PrintHex => 1,
3140 ValueConv => '($val & 0x1f) . " " . ($val & 0xffe0)',
3141 ValueConvInv => 'my @v=split(" ",$val); @v == 2 ? $v[0] + $v[1] : $val',
3142 PrintConv => [
3143 {
3144 0x00 => '(none)',
3145 0x01 => 'Center',
3146 # need to fill this in...
3147 },
3148 {
3149 0x00 => 'Single Target',
3150 0x40 => 'All Target', # (guess)
3151 },
3152 ]
3153 },{ #11
3154 Name => 'AFPoint',
3155 Writable => 'int16u',
3156 Notes => 'other models',
3157 RawConv => '($val or $$self{Model} ne "E-P1") ? $val : undef',
3158 PrintConv => {
3159 # (E-P1 always writes 0, maybe other models do too - PH)
3160 0 => 'Left (or n/a)',
3161 1 => 'Center (horizontal)', #6 (E-510)
3162 2 => 'Right',
3163 3 => 'Center (vertical)', #6 (E-510)
3164 255 => 'None',
3165 },
3166 }
3167 ],
3168 # 0x31a Continuous AF parameters?
3169 0x328 => { #PH
3170 Name => 'AFInfo',
3171 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::AFInfo' },
3172 },
3173 # 0x1200-0x1209 Flash information:
3174 0x1201 => { #6
3175 Name => 'ExternalFlash',
3176 Writable => 'int16u',
3177 Count => 2,
3178 PrintConv => {
3179 '0 0' => 'Off',
3180 '1 0' => 'On',
3181 },
3182 },
3183 0x1203 => { #11
3184 Name => 'ExternalFlashGuideNumber',
3185 Writable => 'rational64s',
3186 Unknown => 1, # (needs verification)
3187 },
3188 0x1204 => { #11(reversed)/7
3189 Name => 'ExternalFlashBounce',
3190 Writable => 'int16u',
3191 PrintConv => {
3192 0 => 'Bounce or Off',
3193 1 => 'Direct',
3194 },
3195 },
3196 0x1205 => { Name => 'ExternalFlashZoom', Writable => 'rational64u' }, #11 (ref converts to mm using table)
3197 0x1208 => { #6
3198 Name => 'InternalFlash',
3199 Writable => 'int16u',
3200 Count => -1,
3201 PrintConv => {
3202 '0' => 'Off',
3203 '1' => 'On',
3204 '0 0' => 'Off',
3205 '1 0' => 'On',
3206 },
3207 },
3208 0x1209 => { #6
3209 Name => 'ManualFlash',
3210 Writable => 'int16u',
3211 Count => 2,
3212 Notes => '2 numbers: 1. 0=Off, 1=On, 2. Flash strength',
3213 PrintConv => q{
3214 my ($a,$b) = split ' ',$val;
3215 return 'Off' unless $a;
3216 $b = ($b == 1) ? 'Full' : "1/$b";
3217 return "On ($b strength)";
3218 },
3219 },
3220 0x120a => { #PH
3221 Name => 'MacroLED',
3222 Writable => 'int16u',
3223 PrintConv => \%offOn,
3224 },
3225 0x1500 => [{ #6
3226 Name => 'SensorTemperature',
3227 # (Stylus 1 stores values like "34 0 0")
3228 Condition => '$$self{Model} =~ /E-(1|M5)\b/ || $count != 1',
3229 Writable => 'int16s',
3230 PrintConv => '$val=~s/ 0 0$//; "$val C"',
3231 PrintConvInv => '$val=~s/ ?C$//; $val',
3232 },{
3233 Name => 'SensorTemperature',
3234 Writable => 'int16s',
3235 RawConv => '($val and $val ne "-32768") ? $val : undef', # ignore 0 and -32768
3236 # ValueConv => '-2*(($val/135)**2)+55', #11
3237 ValueConv => '84 - 3 * $val / 26', #https://exiftool.org/forum/index.php/topic,5423.0.html
3238 ValueConvInv => 'int((84 - $val) * 26 / 3 + 0.5)',
3239 PrintConv => 'sprintf("%.1f C",$val)',
3240 PrintConvInv => '$val=~s/ ?C$//; $val',
3241 # data from test shots by Eric Sibert:
3242 # E-510 E-620
3243 # Raw Ambient Raw Ambient
3244 # --- ------- --- -------
3245 # 534 22.7 518 22.7
3246 # 550 20.6 531 19.3
3247 # 552 20.8 533 17.9
3248 # 558 19.3 582 17.2
3249 # 564 19.1 621 12.3
3250 # 567 17.8 634 9.7
3251 # 576 18.6 650 8.0
3252 # 582 17.2 660 7.7
3253 # 599 13.8 703 3.3
3254 # 631 10.7 880 -20.6
3255 # 642 12.4 880 -20.6
3256 # 652 9.6 892 -24.4
3257 # 692 5.2 892 -22.7
3258 # 714 3.3
3259 # 895 -19.8
3260 # 895 -19.2
3261 # 900 -21.7
3262 }],
3263 0x1600 => { # ref http://fourthirdsphoto.com/vbb/showpost.php?p=107607&postcount=15
3264 Name => 'ImageStabilization',
3265 # (the other value is more reliable, so ignore this totally if the other exists)
3266 Condition => 'not defined $$self{ImageStabilization}',
3267 Writable => 'undef',
3268 # if the first 4 bytes are non-zero, then bit 0x01 of byte 44
3269 # gives the stabilization mode
3270 PrintConv => q{
3271 $val =~ /^\0{4}/ ? 'Off' : 'On, ' .
3272 (unpack('x44C',$val) & 0x01 ? 'Mode 1' : 'Mode 2')
3273 },
3274 },
3275 # 0x102a same as Subdir4-0x300
3276);
3277
3278# AF information (ref PH)
3279%Image::ExifTool::Olympus::AFInfo = (
3280 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3281 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3282 FIRST_ENTRY => 0,
3283 # 0x2a - int8u: ImagerAFMode? 0=Manual, 1=Auto
3284 # 0x30 - int16u: AFAreaXPosition?
3285 # 0x32 - int16u: AFAreaWidth? (202)
3286 # 0x34 - int16u: AFAreaYPosition?
3287 # 0x36 - int16u: AFAreaHeight? (50)
3288 # (AF area positions above give the top-left coordinates of the AF area in the
3289 # AF frame. Increasing Y is downwards, and the AF frame size is about 1280x256)
3290);
3291
3292# Olympus raw information tags (ref 6)
3293%Image::ExifTool::Olympus::RawInfo = (
3294 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
3295 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
3296 NOTES => 'These tags are found only in ORF images of some models (eg. C8080WZ).',
3297 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3298 0x000 => {
3299 Name => 'RawInfoVersion',
3300 Writable => 'undef',
3301 RawConv => '$val=~s/\0+$//; $val', # (may be null terminated)
3302 Count => 4,
3303 },
3304 0x100 => { Name => 'WB_RBLevelsUsed', Writable => 'int16u', Count => 2 },
3305 0x110 => { Name => 'WB_RBLevelsAuto', Writable => 'int16u', Count => 2 },
3306 0x120 => { Name => 'WB_RBLevelsShade', Writable => 'int16u', Count => 2 },
3307 0x121 => { Name => 'WB_RBLevelsCloudy', Writable => 'int16u', Count => 2 },
3308 0x122 => { Name => 'WB_RBLevelsFineWeather', Writable => 'int16u', Count => 2 },
3309 0x123 => { Name => 'WB_RBLevelsTungsten', Writable => 'int16u', Count => 2 },
3310 0x124 => { Name => 'WB_RBLevelsEveningSunlight',Writable => 'int16u', Count => 2 },
3311 0x130 => { Name => 'WB_RBLevelsDaylightFluor', Writable => 'int16u', Count => 2 },
3312 0x131 => { Name => 'WB_RBLevelsDayWhiteFluor', Writable => 'int16u', Count => 2 },
3313 0x132 => { Name => 'WB_RBLevelsCoolWhiteFluor', Writable => 'int16u', Count => 2 },
3314 0x133 => { Name => 'WB_RBLevelsWhiteFluorescent',Writable => 'int16u', Count => 2 },
3315 0x200 => {
3316 Name => 'ColorMatrix2',
3317 Format => 'int16s',
3318 Writable => 'int16u',
3319 Count => 9,
3320 },
3321 # 0x240 => 'ColorMatrixDefault', ?
3322 # 0x250 => 'ColorMatrixSaturation', ?
3323 # 0x251 => 'ColorMatrixHue', ?
3324 # 0x252 => 'ColorMatrixContrast', ?
3325 # 0x300 => sharpness-related
3326 # 0x301 => list of sharpness-related values
3327 0x310 => { Name => 'CoringFilter', Writable => 'int16u' },
3328 0x311 => { Name => 'CoringValues', Writable => 'int16u', Count => 11 },
3329 0x600 => { Name => 'BlackLevel2', Writable => 'int16u', Count => 4 },
3330 0x601 => {
3331 Name => 'YCbCrCoefficients',
3332 Notes => 'stored as int16u[6], but extracted as rational32u[3]',
3333 Format => 'rational32u',
3334 },
3335 0x611 => { Name => 'ValidPixelDepth', Writable => 'int16u', Count => 2 },
3336 0x612 => { Name => 'CropLeft', Writable => 'int16u' }, #11
3337 0x613 => { Name => 'CropTop', Writable => 'int16u' }, #11
3338 0x614 => { Name => 'CropWidth', Writable => 'int32u' },
3339 0x615 => { Name => 'CropHeight', Writable => 'int32u' },
3340 0x1000 => {
3341 Name => 'LightSource',
3342 Writable => 'int16u',
3343 PrintConv => {
3344 0 => 'Unknown',
3345 16 => 'Shade',
3346 17 => 'Cloudy',
3347 18 => 'Fine Weather',
3348 20 => 'Tungsten (Incandescent)',
3349 22 => 'Evening Sunlight',
3350 33 => 'Daylight Fluorescent',
3351 34 => 'Day White Fluorescent',
3352 35 => 'Cool White Fluorescent',
3353 36 => 'White Fluorescent',
3354 256 => 'One Touch White Balance',
3355 512 => 'Custom 1-4',
3356 },
3357 },
3358 # the following 5 tags all have 3 values: val, min, max
3359 0x1001 => { Name => 'WhiteBalanceComp', Writable => 'int16s', Count => 3 },
3360 0x1010 => { Name => 'SaturationSetting', Writable => 'int16s', Count => 3 },
3361 0x1011 => { Name => 'HueSetting', Writable => 'int16s', Count => 3 },
3362 0x1012 => { Name => 'ContrastSetting', Writable => 'int16s', Count => 3 },
3363 0x1013 => { Name => 'SharpnessSetting', Writable => 'int16s', Count => 3 },
3364 # settings written by Camedia Master 4.x
3365 0x2000 => { Name => 'CMExposureCompensation', Writable => 'rational64s' },
3366 0x2001 => { Name => 'CMWhiteBalance', Writable => 'int16u' },
3367 0x2002 => { Name => 'CMWhiteBalanceComp', Writable => 'int16s' },
3368 0x2010 => { Name => 'CMWhiteBalanceGrayPoint', Writable => 'int16u', Count => 3 },
3369 0x2020 => { Name => 'CMSaturation', Writable => 'int16s', Count => 3 },
3370 0x2021 => { Name => 'CMHue', Writable => 'int16s', Count => 3 },
3371 0x2022 => { Name => 'CMContrast', Writable => 'int16s', Count => 3 },
3372 0x2023 => { Name => 'CMSharpness', Writable => 'int16s', Count => 3 },
3373);
3374
3375# Olympus unknown information tags
3376%Image::ExifTool::Olympus::UnknownInfo = (
3377 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
3378 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
3379 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3380);
3381
3382# Tags found only in some FE models
3383%Image::ExifTool::Olympus::FETags = (
3384 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
3385 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
3386 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3387 NOTES => q{
3388 Some FE models write a large number of tags here, but most of this
3389 information remains unknown.
3390 },
3391 0x0100 => {
3392 Name => 'BodyFirmwareVersion',
3393 Writable => 'string',
3394 },
3395);
3396
3397# tags in Olympus QuickTime videos (ref PH)
3398# (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
3399%Image::ExifTool::Olympus::MOV1 = (
3400 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3401 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3402 FIRST_ENTRY => 0,
3403 NOTES => q{
3404 This information is found in MOV videos from Olympus models such as the
3405 D540Z, D595Z, FE100, FE110, FE115, FE170 and FE200.
3406 },
3407 0x00 => {
3408 Name => 'Make',
3409 Format => 'string[24]',
3410 },
3411 0x18 => {
3412 Name => 'Model',
3413 Description => 'Camera Model Name',
3414 Format => 'string[8]',
3415 SeparateTable => 'CameraType',
3416 PrintConv => \%olympusCameraTypes,
3417 },
3418 # (01 00 at offset 0x20)
3419 0x26 => {
3420 Name => 'ExposureUnknown',
3421 Unknown => 1,
3422 Format => 'int32u',
3423 # this conversion doesn't work for all models (eg. gives "1/100000")
3424 ValueConv => '$val ? 10 / $val : 0',
3425 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
3426 },
3427 0x2a => {
3428 Name => 'FNumber',
3429 Format => 'rational64u',
3430 PrintConv => 'sprintf("%.1f",$val)',
3431 },
3432 0x32 => { #(NC)
3433 Name => 'ExposureCompensation',
3434 Format => 'rational64s',
3435 PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
3436 },
3437 # 0x44 => WhiteBalance ?
3438 0x48 => {
3439 Name => 'FocalLength',
3440 Format => 'rational64u',
3441 PrintConv => 'sprintf("%.1f mm",$val)',
3442 },
3443 # 0xb1 => 'ISO', #(I don't think this works - PH)
3444);
3445
3446# tags in Olympus QuickTime videos (ref PH)
3447# (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
3448%Image::ExifTool::Olympus::MOV2 = (
3449 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3450 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3451 FIRST_ENTRY => 0,
3452 NOTES => q{
3453 This information is found in MOV videos from Olympus models such as the
3454 FE120, FE140 and FE190.
3455 },
3456 0x00 => {
3457 Name => 'Make',
3458 Format => 'string[24]',
3459 },
3460 0x18 => {
3461 Name => 'Model',
3462 Description => 'Camera Model Name',
3463 Format => 'string[24]',
3464 Notes => 'the actual model name, no decoding necessary',
3465 },
3466 # (01 00 at offset 0x30)
3467 0x36 => {
3468 Name => 'ExposureTime',
3469 Format => 'int32u',
3470 ValueConv => '$val ? 10 / $val : 0',
3471 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
3472 },
3473 0x3a => {
3474 Name => 'FNumber',
3475 Format => 'rational64u',
3476 PrintConv => 'sprintf("%.1f",$val)',
3477 },
3478 0x42 => { #(NC)
3479 Name => 'ExposureCompensation',
3480 Format => 'rational64s',
3481 PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
3482 },
3483 0x58 => {
3484 Name => 'FocalLength',
3485 Format => 'rational64u',
3486 PrintConv => 'sprintf("%.1f mm",$val)',
3487 },
3488 0xc1 => {
3489 Name => 'ISO',
3490 Format => 'int16u',
3491 },
3492);
3493
3494# tags in Olympus MP4 videos (ref PH)
3495%Image::ExifTool::Olympus::MP4 = (
3496 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3497 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3498 FIRST_ENTRY => 0,
3499 NOTES => q{
3500 This information is found in MP4 videos from Olympus models such as the
3501 u7040 and u9010.
3502 },
3503 0x00 => {
3504 Name => 'Make',
3505 Format => 'string[24]',
3506 },
3507 0x18 => {
3508 Name => 'Model',
3509 Description => 'Camera Model Name',
3510 Format => 'string[24]',
3511 Notes => 'oddly different than CameraType values in JPEG images by the same camera',
3512 PrintConv => {
3513 SG472 => 'u7040,S7040',
3514 SG473 => 'u9010,S9010',
3515 SG475 => 'SP800UZ',
3516 SG551 => 'SZ-30MR',
3517 SG553 => 'SP-610UZ',
3518 SG554 => 'SZ-10',
3519 SG555 => 'SZ-20',
3520 SG573 => 'SZ-14',
3521 SG575 => 'SP-620UZ',
3522 },
3523 },
3524 0x28 => {
3525 Name => 'FNumber',
3526 Format => 'rational64u',
3527 PrintConv => 'sprintf("%.1f",$val)',
3528 },
3529 0x30 => { #(NC)
3530 Name => 'ExposureCompensation',
3531 Format => 'rational64s',
3532 PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
3533 },
3534 # 0x38 - int32u: 3
3535 # 0x3c - int32u: 1
3536 # 0x40 - int16u: 5
3537 # 0x42 - int16u: 0,4,9
3538 # 0x64 - int32u: 0,6000,12000
3539 # 0x48 - int32u: 100 (ISO?)
3540 0x68 => {
3541 Name => 'MovableInfo',
3542 Condition => '$$valPt =~ /^DIGI/',
3543 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::MovableInfo' },
3544 },
3545 0x72 => {
3546 Name => 'MovableInfo',
3547 Condition => '$$valPt =~ /^DIGI/',
3548 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::MovableInfo' },
3549 },
3550);
3551
3552# yet a different QuickTime TAGS format (PH, E-M5)
3553%Image::ExifTool::Olympus::MOV3 = (
3554 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3555 NOTES => 'QuickTime information found in the TAGS atom of MOV videos from the E-M5.',
3556 OLYM => {
3557 Name => 'OlympusAtom',
3558 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::OLYM2' },
3559 },
3560);
3561
3562# yet a different QuickTime OLYM atom format (PH, E-M5)
3563%Image::ExifTool::Olympus::OLYM2 = (
3564 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3565 prms => {
3566 Name => 'MakerNotes',
3567 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::prms' },
3568 },
3569 thmb =>{
3570 Name => 'ThumbInfo',
3571 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::thmb2' },
3572 },
3573 scrn =>{
3574 Name => 'PreviewInfo',
3575 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::scrn2' },
3576 },
3577);
3578
3579# the "prms" atom in E-M5 MOV videos (PH, E-M5)
3580%Image::ExifTool::Olympus::prms = (
3581 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3582 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3583 FIRST_ENTRY => 0,
3584 NOTES => q{
3585 Information extracted from the "prms" atom in MOV videos from Olympus models
3586 such as the OM E-M5.
3587 },
3588 0x12 => {
3589 Name => 'Make',
3590 Format => 'string[24]',
3591 },
3592 0x2c => {
3593 Name => 'Model',
3594 Description => 'Camera Model Name',
3595 Format => 'string[24]',
3596 SeparateTable => 'CameraType',
3597 PrintConv => \%olympusCameraTypes,
3598 },
3599 0x83 => {
3600 Name => 'DateTime1',
3601 Format => 'string[24]',
3602 Groups => { 2 => 'Time' },
3603 },
3604 0x9d => {
3605 Name => 'DateTime2',
3606 Format => 'string[24]',
3607 Groups => { 2 => 'Time' },
3608 },
3609);
3610
3611# yet a different "thmb" atom format (PH, E-M5)
3612%Image::ExifTool::Olympus::thmb2 = (
3613 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3614 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3615 0 => {
3616 Name => 'ThumbnailWidth',
3617 Format => 'int16u',
3618 },
3619 2 => {
3620 Name => 'ThumbnailHeight',
3621 Format => 'int16u',
3622 },
3623 4 => {
3624 Name => 'ThumbnailLength',
3625 Format => 'int32u',
3626 },
3627 8 => {
3628 Name => 'ThumbnailImage',
3629 Groups => { 2 => 'Preview' },
3630 Format => 'undef[$val{4}]',
3631 Notes => '160x120 JPEG thumbnail image',
3632 RawConv => '$self->ValidateImage(\$val,$tag)',
3633 },
3634);
3635
3636# yet a different "scrn" atom format (PH, E-M5)
3637%Image::ExifTool::Olympus::scrn2 = (
3638 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3639 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3640 # 0 => int16u: 1 - number of preview images?
3641 2 => {
3642 Name => 'OlympusPreview',
3643 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::scrn' },
3644 },
3645);
3646
3647# movable information found in MP4 videos
3648%Image::ExifTool::Olympus::MovableInfo = (
3649 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3650 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3651 FIRST_ENTRY => 0,
3652 0x04 => { #(NC)
3653 Name => 'ISO',
3654 Format => 'int32u',
3655 },
3656 0x2c => {
3657 Name => 'EncoderVersion',
3658 Format => 'string[16]',
3659 },
3660 0x3c => {
3661 Name => 'DecoderVersion',
3662 Format => 'string[16]',
3663 },
3664 0x83 => {
3665 Name => 'Thumbnail',
3666 SubDirectory => {
3667 TagTable => 'Image::ExifTool::Olympus::Thumbnail',
3668 Base => '$start', # (use a separate table because of this)
3669 },
3670 },
3671);
3672
3673# thumbnail image information found in MP4 videos (similar in Olympus,Samsung,Sanyo) (ref PH)
3674%Image::ExifTool::Olympus::Thumbnail = (
3675 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3676 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3677 FIRST_ENTRY => 0,
3678 FORMAT => 'int32u',
3679 1 => 'ThumbnailWidth',
3680 2 => 'ThumbnailHeight',
3681 3 => 'ThumbnailLength',
3682 4 => { Name => 'ThumbnailOffset', IsOffset => 1 },
3683);
3684
3685# thumbnail information found in 'thmb' atom of MP4 videos from the TG-810 (ref PH)
3686%Image::ExifTool::Olympus::thmb = (
3687 NOTES => 'Information extracted from the "thmb" atom of Olympus MP4 videos.',
3688 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3689 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3690 0 => {
3691 Name => 'ThumbnailLength',
3692 Format => 'int32u',
3693 },
3694 4 => {
3695 Name => 'ThumbnailImage',
3696 Groups => { 2 => 'Preview' },
3697 Format => 'undef[$val{0}]',
3698 Notes => '160x120 JPEG thumbnail image',
3699 RawConv => '$self->ValidateImage(\$val,$tag)',
3700 },
3701);
3702
3703# thumbnail information found in 'scrn' atom of MP4 videos from the TG-810 (ref PH)
3704%Image::ExifTool::Olympus::scrn = (
3705 NOTES => 'Information extracted from the "scrn" atom of Olympus MP4 videos.',
3706 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3707 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3708 0 => {
3709 Name => 'PreviewImageLength',
3710 Format => 'int32u',
3711 },
3712 4 => {
3713 Name => 'PreviewImage',
3714 Groups => { 2 => 'Preview' },
3715 Format => 'undef[$val{0}]',
3716 Notes => '640x480 JPEG preview image',
3717 RawConv => '$self->ValidateImage(\$val,$tag)',
3718 },
3719);
3720
3721# information in OLYM atom of MP4 videos from the TG-810 (ref PH)
3722%Image::ExifTool::Olympus::OLYM = (
3723 NOTES => 'Tags found in the OLYM atom of MP4 videos from the TG-810.',
3724 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3725 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3726 0x0e => {
3727 Name => 'Make',
3728 Format => 'string[26]',
3729 },
3730 0x28 => {
3731 Name => 'Model',
3732 Description => 'Camera Model Name',
3733 Format => 'string[24]',
3734 SeparateTable => 'CameraType',
3735 PrintConv => \%olympusCameraTypes,
3736 },
3737 0x5a => {
3738 Name => 'FNumber',
3739 Format => 'rational64u',
3740 PrintConv => 'sprintf("%.1f",$val)',
3741 },
3742 0x7f => {
3743 Name => 'DateTimeOriginal', #(NC)
3744 Description => 'Date/Time Original',
3745 Format => 'string[24]',
3746 Groups => { 2 => 'Time' },
3747 PrintConv => '$self->ConvertDateTime($val)',
3748 },
3749 0x99 => {
3750 Name => 'DateTime2',
3751 Format => 'string[24]',
3752 Groups => { 2 => 'Time' },
3753 },
3754 0x109 => {
3755 Name => 'ThumbnailWidth',
3756 Format => 'int16u',
3757 },
3758 0x10b => {
3759 Name => 'ThumbnailHeight',
3760 Format => 'int16u',
3761 },
3762);
3763
3764# tags in Olympus AVI videos (ref PH)
3765# (very similar to Pentax::Junk2 tags)
3766%Image::ExifTool::Olympus::AVI = (
3767 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3768 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3769 FIRST_ENTRY => 0,
3770 NOTES => 'This information is found in Olympus AVI videos.',
3771 0x12 => {
3772 Name => 'Make',
3773 Format => 'string[24]',
3774 },
3775 0x2c => {
3776 Name => 'Model',
3777 Description => 'Camera Model Name',
3778 Format => 'string[24]',
3779 SeparateTable => 'CameraType',
3780 PrintConv => \%olympusCameraTypes,
3781 },
3782 0x5e => {
3783 Name => 'FNumber',
3784 Format => 'rational64u',
3785 PrintConv => 'sprintf("%.1f",$val)',
3786 },
3787 0x83 => {
3788 Name => 'DateTime1',
3789 Format => 'string[24]',
3790 Groups => { 2 => 'Time' },
3791 },
3792 0x9d => {
3793 Name => 'DateTime2',
3794 Format => 'string[24]',
3795 Groups => { 2 => 'Time' },
3796 },
3797 0x129 => {
3798 Name => 'ThumbInfo',
3799 SubDirectory => { TagTable => 'Image::ExifTool::Olympus::thmb2' },
3800 },
3801);
3802
3803# tags in WAV files from Olympus PCM linear recorders (ref 18)
3804%Image::ExifTool::Olympus::WAV = (
3805 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3806 GROUPS => { 0 => 'MakerNotes', 2 => 'Audio' },
3807 FIRST_ENTRY => 0,
3808 NOTES => q{
3809 This information is found in WAV files from Olympus PCM linear recorders
3810 like the LS-5, LS-10, LS-11.
3811 },
3812 0x0c => {
3813 Name => 'Model',
3814 Description => 'Camera Model Name',
3815 Format => 'string[16]',
3816 },
3817 0x1c => {
3818 Name => 'FileNumber',
3819 Format => 'int32u',
3820 PrintConv => 'sprintf("%.4d", $val)',
3821 },
3822 0x26 => {
3823 Name => 'DateTimeOriginal',
3824 Description => 'Date/Time Original',
3825 Groups => { 2 => 'Time' },
3826 Format => 'undef[12]',
3827 Notes => 'time at start of recording',
3828 ValueConv => q{
3829 return undef unless $val =~ /^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/;
3830 my $y = $1 < 70 ? "20$1" : "19$1";
3831 return "$y:$2:$3 $4:$5:$6";
3832 },
3833 PrintConv => '$self->ConvertDateTime($val)',
3834 },
3835 0x32 => {
3836 Name => 'DateTimeEnd',
3837 Groups => { 2 => 'Time' },
3838 Format => 'undef[12]',
3839 Notes => 'time at end of recording',
3840 ValueConv => q{
3841 return undef unless $val =~ /^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/;
3842 my $y = $1 < 70 ? "20$1" : "19$1";
3843 return "$y:$2:$3 $4:$5:$6";
3844 },
3845 PrintConv => '$self->ConvertDateTime($val)',
3846 },
3847 0x3e => {
3848 Name => 'RecordingTime',
3849 Format => 'undef[6]',
3850 ValueConv => '$val =~ s/^(\d{2})(\d{2})/$1:$2:/; $val',
3851 },
3852 0x200 => {
3853 Name => 'Duration',
3854 Format => 'int32u',
3855 ValueConv => '$val / 1000',
3856 PrintConv => 'ConvertDuration($val)',
3857 },
3858 0x20a => { Name => 'Index01', %indexInfo },
3859 0x214 => { Name => 'Index02', %indexInfo },
3860 0x21e => { Name => 'Index03', %indexInfo },
3861 0x228 => { Name => 'Index04', %indexInfo },
3862 0x232 => { Name => 'Index05', %indexInfo },
3863 0x23c => { Name => 'Index06', %indexInfo },
3864 0x246 => { Name => 'Index07', %indexInfo },
3865 0x250 => { Name => 'Index08', %indexInfo },
3866 0x25a => { Name => 'Index09', %indexInfo },
3867 0x264 => { Name => 'Index10', %indexInfo },
3868 0x26e => { Name => 'Index11', %indexInfo },
3869 0x278 => { Name => 'Index12', %indexInfo },
3870 0x282 => { Name => 'Index13', %indexInfo },
3871 0x28c => { Name => 'Index14', %indexInfo },
3872 0x296 => { Name => 'Index15', %indexInfo },
3873 0x2a0 => { Name => 'Index16', %indexInfo },
3874);
3875
3876# DSS information written by Olympus voice recorders (ref PH)
3877%Image::ExifTool::Olympus::DSS = (
3878 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3879 GROUPS => { 0 => 'MakerNotes', 2 => 'Audio' },
3880 FIRST_ENTRY => 0,
3881 NOTES => q{
3882 Information extracted from DSS/DS2 files and the ID3 XOLY frame of MP3 files
3883 written by some Olympus voice recorders.
3884 },
3885 # 0 - file format:
3886 # "\x02dss"(DSS file and XOLY frame in MP3 file)
3887 # "\x03ds2"(DS2 file)
3888 # "\x03mp3"(ID3 XOLY frame in MP3 file)
3889 12 => { Name => 'Model', Format => 'string[16]' }, # (name truncated by some models)
3890 38 => {
3891 Name => 'StartTime',
3892 Format => 'string[12]',
3893 Groups => { 2 => 'Time' },
3894 ValueConv => '$val =~ s/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/20$1:$2:$3 $4:$5:$6/; $val',
3895 PrintConv => '$self->ConvertDateTime($val)',
3896 },
3897 50 => {
3898 Name => 'EndTime',
3899 Format => 'string[12]',
3900 Groups => { 2 => 'Time' },
3901 ValueConv => '$val =~ s/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/20$1:$2:$3 $4:$5:$6/; $val',
3902 PrintConv => '$self->ConvertDateTime($val)',
3903 },
3904 62 => {
3905 Name => 'Duration',
3906 Format => 'string[6]',
3907 ValueConv => '$val =~ /(\d{2})(\d{2})(\d{2})/ ? ($1 * 60 + $2) * 60 + $3 : undef',
3908 PrintConv => 'ConvertDuration($val)',
3909 },
3910 798 => { # (ref http://search.cpan.org/~rgibson/Audio-DSS-0.02/)
3911 Name => 'Comment',
3912 Format => 'string[100]',
3913 },
3914);
3915
3916# Olympus composite tags
3917%Image::ExifTool::Olympus::Composite = (
3918 GROUPS => { 2 => 'Camera' },
3919 ExtenderStatus => {
3920 Notes => q{
3921 Olympus cameras have the quirk that they may retain the extender settings
3922 after the extender is removed until the camera is powered off. This tag is
3923 an attempt to represent the actual status of the extender.
3924 },
3925 Require => {
3926 0 => 'Olympus:Extender',
3927 1 => 'Olympus:LensType',
3928 2 => 'MaxApertureValue',
3929 },
3930 ValueConv => 'Image::ExifTool::Olympus::ExtenderStatus($val[0],$prt[1],$val[2])',
3931 PrintConv => {
3932 0 => 'Not attached',
3933 1 => 'Attached',
3934 2 => 'Removed',
3935 },
3936 },
3937 ZoomedPreviewImage => {
3938 Groups => { 2 => 'Preview' },
3939 Require => {
3940 0 => 'ZoomedPreviewStart',
3941 1 => 'ZoomedPreviewLength',
3942 },
3943 RawConv => q{
3944 @grps = $self->GetGroup($$val{0}); # set groups from input tag
3945 Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"ZoomedPreviewImage");
3946 },
3947 },
3948 # this is actually for PanasonicRaw tags, but it uses the lens lookup here
3949 LensType => {
3950 Require => {
3951 0 => 'LensTypeMake',
3952 1 => 'LensTypeModel',
3953 },
3954 Notes => 'based on tags found in some Panasonic RW2 images',
3955 SeparateTable => 'LensType',
3956 ValueConv => '"$val[0] $val[1]"',
3957 PrintConv => \%olympusLensTypes,
3958 },
3959);
3960
3961# add our composite tags
3962Image::ExifTool::AddCompositeTags('Image::ExifTool::Olympus');
3963
3964
3965#------------------------------------------------------------------------------
3966# Determine if the extender (EX-25/EC-14) was really attached (ref 9)
3967# Inputs: 0) Extender, 1) LensType string, 2) MaxApertureAtMaxFocal
3968# Returns: 0=not attached, 1=attached, 2=could have been removed
3969# Notes: Olympus has a bug in the in-camera firmware which results in the
3970# extender information being cached and written into the EXIF data even after
3971# the extender has been removed. You must power cycle the camera to prevent it
3972# from writing the cached extender information into the EXIF data.
3973sub ExtenderStatus($$$)
3974{
3975 my ($extender, $lensType, $maxAperture) = @_;
3976 my @info = split ' ', $extender;
3977 # validate that extender identifier is reasonable
3978 return 0 unless @info >= 2 and hex($info[1]);
3979 # if it's not an EC-14 (id '0 04') then assume it was really attached
3980 # (other extenders don't seem to affect the reported max aperture)
3981 return 1 if "$info[0] $info[1]" ne '0 04';
3982 # get the maximum aperture for this lens (in $1)
3983 $lensType =~ / F(\d+(\.\d+)?)/ or return 1;
3984 # If the maximum aperture at the maximum focal length is greater than the
3985 # known max/max aperture of the lens, then the extender must be attached
3986 return(($maxAperture - $1 > 0.2) ? 1 : 2);
3987}
3988
3989#------------------------------------------------------------------------------
3990# Print AF points
3991# Inputs: 0) AF point data (string of integers)
3992# Notes: I'm just guessing that the 2nd and 4th bytes are the Y coordinates,
3993# and that more AF points will show up in the future (derived from E-1 images,
3994# and the E-1 uses just one of 3 possible AF points, all centered in Y) - PH
3995sub PrintAFAreas($)
3996{
3997 my $val = shift;
3998 my @points = split ' ', $val;
3999 my %afPointNames = (
4000 0x36794285 => 'Left',
4001 0x79798585 => 'Center',
4002 0xBD79C985 => 'Right',
4003 );
4004 $val = '';
4005 my $pt;
4006 foreach $pt (@points) {
4007 next unless $pt;
4008 $val and $val .= ', ';
4009 $afPointNames{$pt} and $val .= $afPointNames{$pt} . ' ';
4010 my @coords = unpack('C4',pack('N',$pt));
4011 $val .= "($coords[0],$coords[1])-($coords[2],$coords[3])";
4012 }
4013 $val or $val = 'none';
4014 return $val;
4015}
4016
4017#------------------------------------------------------------------------------
4018# Extract information from a DSS/DS2 voice recorder audio file or ID3 XOLY frame
4019# Inputs: 0) ExifTool object reference, 1) dirInfo reference
4020# Returns: 1 on success
4021sub ProcessDSS($$;$)
4022{
4023 my ($et, $dirInfo) = @_;
4024
4025 # allow this to be called with either RAF or DataPt
4026 my $raf = $$dirInfo{RAF};
4027 if ($raf) {
4028 my $buff;
4029 $raf->Read($buff, 898) > 68 or return 0;
4030 $buff =~ /^(\x02dss|\x03ds2)/ or return 0;
4031 $dirInfo = { DataPt => \$buff };
4032 $et->SetFileType(uc substr $buff, 1, 3);
4033 }
4034 my $tagTablePtr = GetTagTable('Image::ExifTool::Olympus::DSS');
4035 return $et->ProcessBinaryData($dirInfo, $tagTablePtr);
4036}
4037
4038#------------------------------------------------------------------------------
4039# Process ORF file
4040# Inputs: 0) ExifTool object reference, 1) directory information reference
4041# Returns: 1 if this looked like a valid ORF file, 0 otherwise
4042sub ProcessORF($$)
4043{
4044 my ($et, $dirInfo) = @_;
4045 return $et->ProcessTIFF($dirInfo);
4046}
4047
40481; # end
4049
4050__END__
4051
4052=head1 NAME
4053
4054Image::ExifTool::Olympus - Olympus/Epson maker notes tags
4055
4056=head1 SYNOPSIS
4057
4058This module is loaded automatically by Image::ExifTool when required.
4059
4060=head1 DESCRIPTION
4061
4062This module contains definitions required by Image::ExifTool to interpret
4063Olympus or Epson maker notes in EXIF information.
4064
4065=head1 AUTHOR
4066
4067Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
4068
4069This library is free software; you can redistribute it and/or modify it
4070under the same terms as Perl itself.
4071
4072=head1 REFERENCES
4073
4074=over 4
4075
4076=item L<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>
4077
4078=item L<http://www.cybercom.net/~dcoffin/dcraw/>
4079
4080=item L<http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html>
4081
4082=item L<http://olypedia.de/Olympus_Makernotes>
4083
4084=back
4085
4086=head1 ACKNOWLEDGEMENTS
4087
4088Thanks to Markku Hanninen, Remi Guyomarch, Frank Ledwon, Michael Meissner,
4089Mark Dapoz, Ioannis Panagiotopoulos and Tomasz Kawecki for their help
4090figuring out some Olympus tags, and Lilo Huang, Chris Shaw and Viktor
4091Lushnikov for adding to the LensType list.
4092
4093=head1 SEE ALSO
4094
4095L<Image::ExifTool::TagNames/Olympus Tags>,
4096L<Image::ExifTool(3pm)|Image::ExifTool>
4097
4098=cut
Note: See TracBrowser for help on using the repository browser.