Ignore:
Timestamp:
2021-02-26T19:39:51+13:00 (3 years ago)
Author:
anupama
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Olympus.pm

    r24107 r34921  
    1010#               2) http://www.cybercom.net/~dcoffin/dcraw/
    1111#               3) http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html
    12 #               4) Markku HŠnninen private communication (tests with E-1)
    13 #               5) RŽmi Guyomarch from http://forums.dpreview.com/forums/read.asp?forum=1022&message=12790396
     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
    1414#               6) Frank Ledwon private communication (tests with E/C-series cameras)
    1515#               7) Michael Meissner private communication
     
    1717#               9) Mark Dapoz private communication
    1818#              10) Lilo Huang private communication (E-330)
    19 #              11) http://olypedia.de/Olympus_Makernotes
     19#              11) http://olypedia.de/Olympus_Makernotes (May 30, 2013)
    2020#              12) Ioannis Panagiotopoulos private communication (E-510)
    2121#              13) Chris Shaw private communication (E-3)
    2222#              14) Viktor Lushnikov private communication (E-400)
    2323#              15) Yrjo Rauste private communication (E-30)
    24 #              16) Godfrey DiGiorgi private communcation (E-P1) + http://forums.dpreview.com/forums/read.asp?message=33187567
     24#              16) Godfrey DiGiorgi private communication (E-P1) + http://forums.dpreview.com/forums/read.asp?message=33187567
    2525#              17) Martin Hibers private communication
    2626#              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
    2733#------------------------------------------------------------------------------
    2834
     
    3137use strict;
    3238use vars qw($VERSION);
     39use Image::ExifTool qw(:DataAccess :Utils);
    3340use Image::ExifTool::Exif;
    3441use Image::ExifTool::APP12;
    3542
    36 $VERSION = '1.79';
     43$VERSION = '2.70';
    3744
    3845sub PrintLensInfo($$$);
     
    4148
    4249# lookup for Olympus LensType values
     50# (as of ExifTool 9.15, this was the complete list of chipped lenses at www.four-thirds.org)
    4351my %olympusLensTypes = (
    44     '0 0 0'  => 'None',
    45     # Olympus lenses
    46     '0 1 0'  => 'Olympus Zuiko Digital ED 50mm F2.0 Macro',
    47     '0 1 1'  => 'Olympus Zuiko Digital 40-150mm F3.5-4.5', #8
    48     '0 1 16' => 'Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6', #PH (E-P1 pre-production)
    49     '0 2 0'  => 'Olympus Zuiko Digital ED 150mm F2.0',
    50     '0 2 16' => 'Olympus M.Zuiko Digital 17mm F2.8 Pancake', #PH (E-P1 pre-production)
    51     '0 3 0'  => 'Olympus Zuiko Digital ED 300mm F2.8',
    52     '0 3 16' => 'Olympus M.Zuiko Digital ED 14-150mm F4.0-5.6', #11
    53     '0 4 16' => 'Olympus M.Zuiko Digital ED 9-18mm F4.0-5.6', #11
    54     '0 5 0'  => 'Olympus Zuiko Digital 14-54mm F2.8-3.5',
    55     '0 5 1'  => 'Olympus Zuiko Digital Pro ED 90-250mm F2.8', #9
    56     '0 5 16' => 'Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6', #11
    57     '0 6 0'  => 'Olympus Zuiko Digital ED 50-200mm F2.8-3.5',
    58     '0 6 1'  => 'Olympus Zuiko Digital ED 8mm F3.5 Fisheye', #9
    59     '0 7 0'  => 'Olympus Zuiko Digital 11-22mm F2.8-3.5',
    60     '0 7 1'  => 'Olympus Zuiko Digital 18-180mm F3.5-6.3', #6
    61     '0 8 1'  => 'Olympus Zuiko Digital 70-300mm F4.0-5.6', #7 (seen as release 1 - PH)
    62     '0 9 16' => 'Olympus M.Zuiko Digital 14-42mm F3.5-5.6 II', #PH (E-PL2)
    63     '0 21 0' => 'Olympus Zuiko Digital ED 7-14mm F4.0',
    64     '0 23 0' => 'Olympus Zuiko Digital Pro ED 35-100mm F2.0', #7
    65     '0 24 0' => 'Olympus Zuiko Digital 14-45mm F3.5-5.6',
    66     '0 32 0' => 'Olympus Zuiko Digital 35mm F3.5 Macro', #9
    67     '0 34 0' => 'Olympus Zuiko Digital 17.5-45mm F3.5-5.6', #9
    68     '0 35 0' => 'Olympus Zuiko Digital ED 14-42mm F3.5-5.6', #PH
    69     '0 36 0' => 'Olympus Zuiko Digital ED 40-150mm F4.0-5.6', #PH
    70     '0 48 0' => 'Olympus Zuiko Digital ED 50-200mm F2.8-3.5 SWD', #7
    71     '0 49 0' => 'Olympus Zuiko Digital ED 12-60mm F2.8-4.0 SWD', #7
    72     '0 50 0' => 'Olympus Zuiko Digital ED 14-35mm F2.0 SWD', #PH
    73     '0 51 0' => 'Olympus Zuiko Digital 25mm F2.8', #PH
    74     '0 52 0' => 'Olympus Zuiko Digital ED 9-18mm F4.0-5.6', #7
    75     '0 53 0' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5 II', #PH
     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
    76116    # Sigma lenses
    77     '1 1 0'  => 'Sigma 18-50mm F3.5-5.6', #8
    78     '1 2 0'  => 'Sigma 55-200mm F4.0-5.6 DC',
    79     '1 3 0'  => 'Sigma 18-125mm F3.5-5.6 DC',
    80     '1 4 0'  => 'Sigma 18-125mm F3.5-5.6', #7
    81     '1 5 0'  => 'Sigma 30mm F1.4', #10
    82     '1 6 0'  => 'Sigma 50-500mm F4.0-6.3 EX DG APO HSM RF', #6
    83     '1 7 0'  => 'Sigma 105mm F2.8 DG', #PH
    84     '1 8 0'  => 'Sigma 150mm F2.8 DG HSM', #PH
    85     '1 16 0' => 'Sigma 24mm F1.8 EX DG Aspherical Macro', #PH
    86     '1 17 0' => 'Sigma 135-400mm F4.5-5.6 DG ASP APO RF', #11
    87     '1 18 0' => 'Sigma 300-800mm F5.6 EX DG APO', #11
    88     '1 20 0' => 'Sigma 50-500mm F4.0-6.3 EX DG APO HSM RF', #11
    89     '1 21 0' => 'Sigma 10-20mm F4.0-5.6 EX DC HSM', #11
    90     '1 22 0' => 'Sigma 70-200mm F2.8 EX DG Macro HSM II', #11
    91     '1 23 0' => 'Sigma 50mm F1.4 EX DG HSM', #11
    92     # Leica lenses (ref 11)
    93     '2 1 0'  => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.',
    94     '2 1 16' => 'Lumix G Vario 14-45mm F3.5-5.6 Asph. Mega OIS', #16
    95     '2 2 0'  => 'Leica D Summilux 25mm F1.4 Asph.',
    96     '2 2 16' => 'Lumix G Vario 45-200mm F4-5.6 Mega OIS', #16
    97     '2 3 1'  => 'Leica D Vario Elmar 14-50mm F3.8-5.6 Asph.', #14 (L10 kit)
    98     '2 3 16' => 'Lumix G Vario HD 14-140mm F4-5.8 Asph. Mega OIS', #16
    99     '2 4 0'  => 'Leica D Vario Elmar 14-150mm F3.5-5.6', #13
    100     '2 4 16' => 'Lumix G Vario 7-14mm F4 Asph.', #PH (E-P1 pre-production)
    101     '2 5 16' => 'Lumix G 20mm F1.7 Asph.', #16
    102     '2 6 16' => 'Leica DG Macro-Elmarit 45mm F2.8', #PH
    103     '2 8 16' => 'Lumix G Fisheye 8mm F3.5', #PH
    104     '3 1 0'  => 'Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph.',
    105     '3 2 0'  => 'Leica D Summilux 25mm F1.4 Asph.',
     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
    106193);
    107194
    108 # ArtFilter and MagicFilter values (ref PH)
     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)
    109527my %filters = (
    110     '0'    => 'Off',
    111     '1' => 'Soft Focus',
    112     '2' => 'Pop Art',
    113     '3' => 'Pale & Light Color',
    114     '4' => 'Light Tone',
    115     '5' => 'Pin Hole',
    116     '6' => 'Grainy Film',
    117     '9' => 'Diorama',
    118     '10' => 'Cross Process',
    119     '12' => 'Fish Eye',
    120     '13' => 'Drawing',
    121     # Punk? Sparkle?
     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',
    122573);
    123574
     
    184635    0x0100 => {
    185636        Name => 'ThumbnailImage',
     637        Groups => { 2 => 'Preview' },
    186638        Writable => 'undef',
    187639        WriteCheck => '$self->CheckImage(\$val)',
    188640        Binary => 1,
    189641    },
    190     0x0104 => { #11
    191         Name => 'BodyFirmwareVersion',
    192         Writable => 'string',
    193     },
     642    0x0104 => { Name => 'BodyFirmwareVersion',    Writable => 'string' }, #11
    194643#
    195644# end Konica/Minolta tags
     
    199648        Notes => q{
    200649            3 numbers: 1. Shooting mode: 0=Normal, 2=Fast, 3=Panorama;
    201             2. Sequence Number; 3. Panorama Direction: 1=Left-Right,
    202             2=Right-Left, 3=Bottom-Top, 4=Top-Bottom
     650            2. Sequence Number; 3. Panorama Direction: 1=Left-right,
     651            2=Right-left, 3=Bottom-Top, 4=Top-Bottom
    203652        },
    204653        Writable => 'int32u',
     
    236685                6 => 'RAW', #PH - C5050WZ
    237686            );
    238             my %t2 = ( # all other types
     687            my %t2 = ( # all other types (except D4322, ref 22)
    239688                1 => 'SQ (Low)',
    240689                2 => 'HQ (Normal)',
     
    245694                33 => 'Uncompressed', #PH - C2100Z
    246695            );
    247             my $conv = $self->{CameraType} =~ /^SX(?!151\b)/ ? \%t1 : \%t2;
     696            my $conv = $self->{CameraType} =~ /^(SX(?!151\b)|D4322)/ ? \%t1 : \%t2;
    248697            return $$conv{$val} ? $$conv{$val} : "Unknown ($val)";
    249698        },
     
    263712        Description => 'Black And White Mode',
    264713        Writable => 'int16u',
    265         PrintConv => \%offOn,
     714        PrintConv => {
     715            0 => 'Off',
     716            1 => 'On',
     717            6 => '(none)', #22
     718        },
    266719    },
    267720    0x0204 => {
     
    277730        PrintConvInv => '$val=~s/\s*mm$//;$val',
    278731    },
    279     0x0206 => { #6
    280         Name => 'LensDistortionParams',
    281         Writable => 'int16s',
    282         Count => 6,
    283     },
    284     0x0207 => { #PH (was incorrectly FirmwareVersion, ref 1,3)
     732    0x0206 => { Name => 'LensDistortionParams', Writable => 'int16s', Count => 6 }, #6
     733    0x0207 => { #PH (was incorrectly FirmwareVersion, ref 1/3)
    285734        Name => 'CameraType',
     735        Condition => '$$valPt ne "NORMAL"', # FE240, SP510, u730 and u1000 write this
    286736        Writable => 'string',
    287737        DataMember => 'CameraType',
    288738        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
    289745    },
    290746    0x0208 => {
     
    298754        Format => 'string', # this really should have been a string
    299755    },
    300     0x020b => { #PH
    301         Name => 'EpsonImageWidth',
    302         Writable => 'int16u',
    303     },
    304     0x020c => { #PH
    305         Name => 'EpsonImageHeight',
    306         Writable => 'int16u',
    307     },
    308     0x020d => { #PH
    309         Name => 'EpsonSoftware',
    310         Writable => 'string',
    311     },
     756    0x020b => { Name => 'EpsonImageWidth',  Writable => 'int32u' }, #PH
     757    0x020c => { Name => 'EpsonImageHeight', Writable => 'int32u' }, #PH
     758    0x020d => { Name => 'EpsonSoftware',    Writable => 'string' }, #PH
    312759    0x0280 => { #PH
    313760        %Image::ExifTool::previewImageTagInfo,
     761        Groups => { 2 => 'Preview' },
    314762        Notes => 'found in ERF and JPG images from some Epson models',
    315763        Format => 'undef',
    316764        Writable => 'int8u',
    317765    },
    318     0x0300 => { #6
    319         Name => 'PreCaptureFrames',
    320         Writable => 'int16u',
    321     },
    322     0x0301 => { #11
    323         Name => 'WhiteBoard',
    324         Writable => 'int16u',
    325     },
     766    0x0300 => { Name => 'PreCaptureFrames', Writable => 'int16u' }, #6
     767    0x0301 => { Name => 'WhiteBoard',       Writable => 'int16u' }, #11
    326768    0x0302 => { #6
    327769        Name => 'OneTouchWB',
     
    333775        },
    334776    },
    335     0x0303 => { #11
    336         Name => 'WhiteBalanceBracket',
    337         Writable => 'int16u',
    338     },
    339     0x0304 => { #11
    340         Name => 'WhiteBalanceBias',
    341         Writable => 'int16u',
    342     },
    343    # 0x0305 => 'PrintMaching', ? #11
     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)
    344796    0x0403 => { #11
    345797        Name => 'SceneMode',
    346798        Writable => 'int16u',
     799        PrintConvColumns => 2,
    347800        PrintConv => {
    348801            0 => 'Normal',
     
    381834            33 => 'Pet',
    382835            34 => 'Smile Shot',
     836            35 => 'Quick Shutter',
     837            43 => 'Hand-held Starlight', #PH (SH-21)
     838            100 => 'Panorama', #PH (SH-21)
    383839            101 => 'Magic Filter', #PH
    384         },
    385     },
    386     0x0404 => { #PH (D595Z, C7070WZ)
    387         Name => 'SerialNumber',
    388         Writable => 'string',
    389     },
    390     0x0405 => { #11
    391         Name => 'Firmware',
    392         Writable => 'string',
    393     },
    394     0x0e00 => {
     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)
    395846        Name => 'PrintIM',
    396847        Description => 'Print Image Matching',
     
    400851        },
    401852    },
     853    # 0x0e80 - undef[256] - offset 0x30: uint16[2] WB_RGBLevels = val[0]*561,65536,val[1]*431 (ref IB)
    402854    0x0f00 => {
    403855        Name => 'DataDump',
     
    412864    0x0f04 => {
    413865        Name => 'ZoomedPreviewStart',
    414         # NOTE: this tag is not currently updated properly when the image is rewritten!
     866        # NOTE: this tag is currently not updated properly when the image is rewritten!
    415867        OffsetPair => 0xf05,
    416868        DataTag => 'ZoomedPreviewImage',
     
    484936        Writable => 'rational64s',
    485937    },
    486     0x1007 => { #6 (E-10, E-20 and C2500L - numbers usually around 30-40)
    487         Name => 'SensorTemperature',
    488         Writable => 'int16s',
    489     },
    490     0x1008 => { #6
    491         Name => 'LensTemperature',
    492         Writable => 'int16s',
    493     },
    494     0x1009 => { #11
    495         Name => 'LightCondition',
    496         Writable => 'int16u',
    497     },
     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
    498941    0x100a => { #11
    499942        Name => 'FocusRange',
     
    518961        PrintConvInv => '$val=~s/\s*mm$//; $val',
    519962    },
    520     0x100d => { #6
    521         Name => 'ZoomStepCount',
    522         Writable => 'int16u',
    523     },
    524     0x100e => { #6
    525         Name => 'FocusStepCount',
    526         Writable => 'int16u',
    527     },
     963    0x100d => { Name => 'ZoomStepCount',    Writable => 'int16u' }, #6
     964    0x100e => { Name => 'FocusStepCount',   Writable => 'int16u' }, #6
    528965    0x100f => { #6
    529966        Name => 'Sharpness',
     
    536973        },
    537974    },
    538     0x1010 => { #6
    539         Name => 'FlashChargeLevel',
    540         Writable => 'int16u',
    541     },
     975    0x1010 => { Name => 'FlashChargeLevel', Writable => 'int16u' }, #6
    542976    0x1011 => { #3
    543977        Name => 'ColorMatrix',
     
    546980        Count => 9,
    547981    },
    548     0x1012 => { #3
    549         Name => 'BlackLevel',
    550         Writable => 'int16u',
    551         Count => 4,
    552     },
     982    0x1012 => { Name => 'BlackLevel',       Writable => 'int16u', Count => 4 }, #3
    553983    0x1013 => { #11
    554984        Name => 'ColorTemperatureBG',
     
    565995        Writable => 'int16u',
    566996        Count => 2,
     997        PrintConvColumns => 2,
    567998        PrintConv => {
    568999            '1'   => 'Auto',
     
    5941025        ValueConvInv => '$val*=256;"$val 64"',
    5951026    },
    596     0x1019 => { #11
    597         Name => 'ColorMatrixNumber',
    598         Writable => 'int16u',
    599     },
     1027    0x1019 => { Name => 'ColorMatrixNumber',    Writable => 'int16u' }, #11
    6001028    # 0x101a is same as CameraID ("OLYMPUS DIGITAL CAMERA") for C2500L - PH
    601     0x101a => { #3
    602         Name => 'SerialNumber',
    603         Writable => 'string',
    604     },
     1029    0x101a => { Name => 'SerialNumber',         Writable => 'string' }, #3
    6051030    0x101b => { #11
    6061031        Name => 'ExternalFlashAE1_0',
     
    6081033        Unknown => 1, # (what are these?)
    6091034    },
    610     0x101c => { #11
    611         Name => 'ExternalFlashAE2_0',
    612         Writable => 'int32u',
    613         Unknown => 1,
    614     },
    615     0x101d => { #11
    616         Name => 'InternalFlashAE1_0',
    617         Writable => 'int32u',
    618         Unknown => 1,
    619     },
    620     0x101e => { #11
    621         Name => 'InternalFlashAE2_0',
    622         Writable => 'int32u',
    623         Unknown => 1,
    624     },
    625     0x101f => { #11
    626         Name => 'ExternalFlashAE1',
    627         Writable => 'int32u',
    628         Unknown => 1,
    629     },
    630     0x1020 => { #11
    631         Name => 'ExternalFlashAE2',
    632         Writable => 'int32u',
    633         Unknown => 1,
    634     },
    635     0x1021 => { #11
    636         Name => 'InternalFlashAE1',
    637         Writable => 'int32u',
    638         Unknown => 1,
    639     },
    640     0x1022 => { #11
    641         Name => 'InternalFlashAE2',
    642         Writable => 'int32u',
    643         Unknown => 1,
    644     },
    645     0x1023 => { #6
    646         Name => 'FlashExposureComp',
    647         Writable => 'rational64s',
    648     },
    649     0x1024 => { #11
    650         Name => 'InternalFlashTable',
    651         Writable => 'int16u',
    652     },
    653     0x1025 => { #11
    654         Name => 'ExternalFlashGValue',
    655         Writable => 'rational64s',
    656     },
     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
    6571045    0x1026 => { #6
    6581046        Name => 'ExternalFlashBounce',
     
    6631051        },
    6641052    },
    665     0x1027 => { #6
    666         Name => 'ExternalFlashZoom',
    667         Writable => 'int16u',
    668     },
    669     0x1028 => { #6
    670         Name => 'ExternalFlashMode',
    671         Writable => 'int16u',
    672     },
     1053    0x1027 => { Name => 'ExternalFlashZoom',    Writable => 'int16u' }, #6
     1054    0x1028 => { Name => 'ExternalFlashMode',    Writable => 'int16u' }, #6
    6731055    0x1029 => { #3
    6741056        Name => 'Contrast',
     
    6801062        },
    6811063    },
    682     0x102a => { #3
    683         Name => 'SharpnessFactor',
    684         Writable => 'int16u',
    685     },
    686     0x102b => { #3
    687         Name => 'ColorControl',
    688         Writable => 'int16u',
    689         Count => 6,
    690     },
    691     0x102c => { #3
    692         Name => 'ValidBits',
    693         Writable => 'int16u',
    694         Count => 2,
    695     },
    696     0x102d => { #3
    697         Name => 'CoringFilter',
    698         Writable => 'int16u',
    699     },
    700     0x102e => { #PH
    701         Name => 'OlympusImageWidth',
    702         Writable => 'int32u',
    703     },
    704     0x102f => { #PH
    705         Name => 'OlympusImageHeight',
    706         Writable => 'int32u',
    707     },
    708     0x1030 => { #11
    709         Name => 'SceneDetect',
    710         Writable => 'int16u',
    711     },
     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
    7121071    0x1031 => { #11
    7131072        Name => 'SceneArea',
     
    7241083        Unknown => 1, # (but what does it mean?)
    7251084    },
    726     0x1034 => { #3
    727         Name => 'CompressionRatio',
    728         Writable => 'rational64u',
    729     },
     1085    0x1034 => { Name => 'CompressionRatio',    Writable => 'rational64u' }, #3
    7301086    0x1035 => { #6
    7311087        Name => 'PreviewImageValid',
    7321088        Writable => 'int32u',
     1089        DelValue => 0,
    7331090        PrintConv => { 0 => 'No', 1 => 'Yes' },
    7341091    },
     
    7391096        DataTag => 'PreviewImage',
    7401097        Writable => 'int32u',
     1098        WriteGroup => 'MakerNotes',
    7411099        Protected => 2,
    7421100    },
     
    7471105        DataTag => 'PreviewImage',
    7481106        Writable => 'int32u',
     1107        WriteGroup => 'MakerNotes',
    7491108        Protected => 2,
    7501109    },
    751     0x1038 => { #11
    752         Name => 'AFResult',
    753         Writable => 'int16u',
    754     },
     1110    0x1038 => { Name => 'AFResult',             Writable => 'int16u' }, #11
    7551111    0x1039 => { #6
    7561112        Name => 'CCDScanMode',
     
    7661122        PrintConv => \%offOn,
    7671123    },
    768     0x103b => { #6
    769         Name => 'FocusStepInfinity',
    770         Writable => 'int16u',
    771     },
    772     0x103c => { #6
    773         Name => 'FocusStepNear',
    774         Writable => 'int16u',
    775     },
    776     0x103d => { #11
    777         Name => 'LightValueCenter',
    778         Writable => 'rational64s',
    779     },
    780     0x103e => { #11
    781         Name => 'LightValuePeriphery',
    782         Writable => 'rational64s',
    783     },
     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
    7841128    0x103f => { #11
    7851129        Name => 'FieldCount',
     
    12121556        DataMember => 'CameraType',
    12131557        RawConv => '$self->{CameraType} = $val',
     1558        SeparateTable => 'CameraType',
     1559        PrintConv => \%olympusCameraTypes,
    12141560    },
    12151561);
     
    12311577        Writable => 'string',
    12321578        Count => 6,
     1579        SeparateTable => 'CameraType',
     1580        PrintConv => \%olympusCameraTypes,
    12331581    },
    12341582    0x101 => { #PH
     
    12621610        Count => 6,
    12631611        Notes => q{
    1264             6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.  Only
    1265             the Make, Model and Sub-model are used to determine the lens model
     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
    12661614        },
    12671615        SeparateTable => 'LensType',
    12681616        # Have seen these values for the unknown numbers:
    1269         # 1: 0
    1270         # 4: 0, 2(Olympus lenses for which I have also seen 0 for this number)
    1271         # 5: 0, 16(new Lumix lenses)
    1272         ValueConv => 'my @a = split(" ",$val); "$a[0] $a[2] $a[3]"',
     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])',
    12731621        # set unknown values to zero when writing
    1274         ValueConvInv => 'my @a=split(" ",$val); "$a[0] 0 $a[1] $a[2] 0 0"',
     1622        ValueConvInv => 'my @a=split(" ",$val); hex($a[0])." 0 ".hex($a[1])." ".hex($a[2])." 0 0"',
    12751623        PrintConv => \%olympusLensTypes,
    12761624    },
     
    12901638        PrintConvInv => 'pack("A31",$val)', # pad with spaces to 31 chars
    12911639    },
    1292     0x203 => { #17
    1293         Name => 'LensModel',
    1294         Writable => 'string',
    1295     },
     1640    0x203 => { Name => 'LensModel',         Writable => 'string' }, #17
    12961641    0x204 => { #6
    12971642        Name => 'LensFirmwareVersion',
     
    13161661        PrintConvInv => '$val',
    13171662    },
    1318     0x207 => { #PH
    1319         Name => 'MinFocalLength',
    1320         Writable => 'int16u',
    1321     },
    1322     0x208 => { #PH
    1323         Name => 'MaxFocalLength',
    1324         Writable => 'int16u',
    1325     },
     1663    0x207 => { Name => 'MinFocalLength',    Writable => 'int16u' }, #PH
     1664    0x208 => { Name => 'MaxFocalLength',    Writable => 'int16u' }, #PH
    13261665    0x20a => { #9
    1327         Name => 'MaxApertureAtCurrentFocal',
     1666        Name => 'MaxAperture', # (at current focal length)
    13281667        Writable => 'int16u',
    13291668        ValueConv => '$val ? sqrt(2)**($val/256) : 0',
     
    13431682        Count => 6,
    13441683        Notes => q{
    1345             6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.  Only
    1346             the Make and Model are used to determine the extender model
    1347         },
    1348         ValueConv => 'my @a = split(" ",$val); "$a[0] $a[2]"',
    1349         ValueConvInv => 'my @a=split(" ",$val); "$a[0] 0 $a[1] 0 0 0"',
    1350         PrintConv => {
    1351             '0 0'   => 'None',
    1352             '0 4'   => 'Olympus Zuiko Digital EC-14 1.4x Teleconverter',
    1353             '0 8'   => 'Olympus EX-25 Extension Tube',
    1354             '0 16'  => 'Olympus Zuiko Digital EC-20 2.0x Teleconverter', #7
    1355         },
    1356     },
    1357     0x302 => { #4
    1358         Name => 'ExtenderSerialNumber',
    1359         Writable => 'string',
    1360         Count => 32,
    1361     },
    1362     0x303 => { #9
    1363         Name => 'ExtenderModel',
    1364         Writable => 'string',
    1365     },
     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
    13661698    0x304 => { #6
    13671699        Name => 'ExtenderFirmwareVersion',
     
    13701702        PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
    13711703    },
     1704    0x403 => { #http://dev.exiv2.org/issues/870
     1705        Name => 'ConversionLens',
     1706        Writable => 'string',
     1707        # (observed values: '','TCON','FCON','WCON')
     1708    },
    13721709    0x1000 => { #6
    13731710        Name => 'FlashType',
     
    13771714            2 => 'Simple E-System',
    13781715            3 => 'E-System',
     1716            4 => 'E-System (body powered)', #forum9740
    13791717        },
    13801718    },
     
    13821720        Name => 'FlashModel',
    13831721        Writable => 'int16u',
     1722        PrintConvColumns => 2,
    13841723        PrintConv => {
    13851724            0 => 'None',
     
    13911730            6 => 'FL-50R', #11 (or Metz mecablitz digital)
    13921731            7 => 'FL-36R', #11
    1393             # have seen value of 9 - PH
     1732            9 => 'FL-14', #11
     1733            11 => 'FL-600R', #11
     1734            13 => 'FL-LM3', #forum9740
     1735            15 => 'FL-900R', #7
    13941736        },
    13951737    },
     
    14001742        PrintConvInv => '$val=sprintf("%.3f",$val);$val=~s/\.//;hex($val)',
    14011743    },
    1402     0x1003 => { #4
    1403         Name => 'FlashSerialNumber',
    1404         Writable => 'string',
    1405         Count => 32,
    1406     },
     1744    0x1003 => { Name => 'FlashSerialNumber', Writable => 'string', Count => 32 }, #4
    14071745);
    14081746
     
    14301768        DataTag => 'PreviewImage',
    14311769        Writable => 'int32u',
     1770        WriteGroup => 'MakerNotes',
    14321771        Protected => 2,
    14331772    },
     
    14371776        DataTag => 'PreviewImage',
    14381777        Writable => 'int32u',
     1778        WriteGroup => 'MakerNotes',
    14391779        Protected => 2,
    14401780    },
     
    14671807        },
    14681808    },
    1469     0x203 => { #11 (some E-models only)
    1470         Name => 'ExposureShift',
    1471         Writable => 'rational64s',
     1809    0x203 => { Name => 'ExposureShift', Writable => 'rational64s' }, #11 (some models only)
     1810    0x204 => { #11 (XZ-1)
     1811        Name => 'NDFilter',
     1812        PrintConv => \%offOn,
    14721813    },
    14731814    0x300 => { #6
     
    14901831            2 => 'Continuous AF',
    14911832            3 => 'Multi AF',
    1492             5 => 'Face detect', #11
     1833            4 => 'Face detect', #11
    14931834            10 => 'MF',
    1494         }, { BITMASK => { #11
    1495             0 => 'S-AF',
    1496             2 => 'C-AF',
    1497             4 => 'MF',
    1498             5 => 'Face detect',
    1499             6 => 'Imager AF',
    1500             8 => 'AF sensor',
    1501         }}],
     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        }],
    15021848    },
    15031849    0x302 => { #6
     
    15261872        Name => 'AFAreas',
    15271873        Notes => 'coordinates range from 0 to 255',
    1528         Format => 'int32u',
     1874        Writable => 'int32u',
    15291875        Count => 64,
    15301876        PrintConv => 'Image::ExifTool::Olympus::PrintAFAreas($val)',
     
    15331879        Name => 'AFPointSelected',
    15341880        Notes => 'coordinates expressed as a percent',
    1535         Format => 'rational64s',
     1881        Writable => 'rational64s',
    15361882        Count => 5,
    15371883        ValueConv => '$val =~ s/\S* //; $val', # ignore first undefined value
    15381884        ValueConvInv => '"undef $val"',
    15391885        PrintConv => q{
    1540             return $val if $val =~ /undef/;
     1886            return 'n/a' if $val =~ /undef/;
    15411887            sprintf("(%d%%,%d%%) (%d%%,%d%%)", map {$_ * 100} split(" ",$val));
    1542         }
     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' },
    15431900    },
    15441901    0x307 => { #15
    15451902        Name => 'AFFineTuneAdj',
    1546         Format => 'int16s',
     1903        Writable => 'int16s',
    15471904        Count => 3, # not sure what the 3 values mean
     1905    },
     1906    0x308 => { #forum11578
     1907        Name => 'FocusBracketStepSize',
     1908        Writable => 'int8u',
    15481909    },
    15491910    0x400 => { #6
     
    15621923        },
    15631924    },
    1564     0x401 => { #6
    1565         Name => 'FlashExposureComp',
    1566         Writable => 'rational64s',
    1567     },
    1568     # 0x402 - FlashMode? bit0=TTL, bit2=SuperFP (ref 11)
     1925    0x401 => { Name => 'FlashExposureComp', Writable => 'rational64s' }, #6
     1926    # 0x402 - FlashMode? bit0=TTL, bit1=auto, bit2=SuperFP (ref 11)
    15691927    0x403 => { #11
    15701928        Name => 'FlashRemoteControl',
    15711929        Writable => 'int16u',
    15721930        PrintHex => 1,
     1931        PrintConvColumns => 2,
    15731932        PrintConv => {
    15741933            0 => 'Off',
     
    15901949        Name => 'FlashControlMode',
    15911950        Writable => 'int16u',
    1592         Count => 3,
     1951        Count => -1,
     1952        Notes => '3 or 4 values',
    15931953        PrintConv => [{
    15941954            0 => 'Off',
     
    16011961        Name => 'FlashIntensity',
    16021962        Writable => 'rational64s',
    1603         Count => 3,
    1604         PrintConv => '$val eq "undef undef undef" ? "n/a" : $val',
    1605         PrintConvInv => '$val eq "n/a" ? "undef undef undef" : $val',
     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        },
    16061970    },
    16071971    0x406 => { #11
    16081972        Name => 'ManualFlashStrength',
    16091973        Writable => 'rational64s',
    1610         Count => 3,
    1611         PrintConv => '$val eq "undef undef undef" ? "n/a" : $val',
    1612         PrintConvInv => '$val eq "n/a" ? "undef undef undef" : $val',
     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        },
    16131981    },
    16141982    0x500 => { #6
     
    16171985        PrintConv => {
    16181986            0 => 'Auto',
     1987            1 => 'Auto (Keep Warm Color Off)', #IB
    16191988            16 => '7500K (Fine Weather with Shade)',
    16201989            17 => '6000K (Cloudy)',
     
    16221991            20 => '3000K (Tungsten light)',
    16231992            21 => '3600K (Tungsten light-like)',
     1993            22 => 'Auto Setup', #IB
     1994            23 => '5500K (Flash)', #IB
    16241995            33 => '6600K (Daylight fluorescent)',
    16251996            34 => '4500K (Neutral white fluorescent)',
    16261997            35 => '4000K (Cool white fluorescent)',
     1998            36 => 'White Fluorescent', #IB
    16271999            48 => '3600K (Tungsten light-like)',
    1628             256 => 'Custom WB 1',
    1629             257 => 'Custom WB 2',
    1630             258 => 'Custom WB 3',
    1631             259 => 'Custom WB 4',
    1632             512 => 'Custom WB 5400K',
    1633             513 => 'Custom WB 2900K',
    1634             514 => 'Custom WB 8000K',
     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
    16352009        },
    16362010    },
     
    16992073        Name => 'SceneMode',
    17002074        Writable => 'int16u',
     2075        PrintConvColumns => 2,
    17012076        PrintConv => {
    17022077            0 => 'Standard',
     
    17462121            49 => 'Underwater Snapshot', #11
    17472122            50 => 'Shooting Guide', #11
    1748             51 => 'Face Portrait', #PH (NC)
    1749             52 => 'Smile Shot', #PH (NC)
    1750             53 => 'Quick Shutter', #PH (NC)
    1751             54 => 'Slow Shutter', #PH (NC)
    1752             55 => 'Bird Watching', #PH (NC)
    1753             56 => 'Multiple Exposure', #PH (NC)
    1754             57 => 'e-Portrait', #PH (NC)
    1755             58 => 'Beauty Fix', #PH (NC)
    1756             59 => 'Soft Background', #PH (NC)
     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)
    17572139        },
    17582140    },
     
    17612143        Writable => 'int16u',
    17622144        PrintConv => {
     2145            0 => '(none)',
    17632146            BITMASK => {
    17642147                0 => 'Noise Reduction',
     
    17792162        PrintConv => \%offOn,
    17802163    },
    1781     0x50d => { #PH/4
    1782         Name => 'CompressionFactor',
    1783         Writable => 'rational64u',
    1784     },
     2164    0x50d => { Name => 'CompressionFactor', Writable => 'rational64u' }, #PH/4
    17852165    0x50f => { #6
    17862166        Name => 'Gradation',
     
    17902170        Relist => [ [0..2], 3 ], # join values 0-2 for PrintConv
    17912171        PrintConv => [{
     2172           '0 0 0' => 'n/a', #PH (?)
    17922173           '-1 -1 1' => 'Low Key',
    17932174            '0 -1 1' => 'Normal',
     
    18092190            4 => 'Portrait',
    18102191            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
    18112200            256 => 'Monotone',
    18122201            512 => 'Sepia',
     
    18462235        Name => 'PictureModeBWFilter',
    18472236        Writable => 'int16s',
     2237        PrintConvColumns => 2,
    18482238        PrintConv => {
    18492239            0 => 'n/a',
     
    18582248        Name => 'PictureModeTone',
    18592249        Writable => 'int16s',
     2250        PrintConvColumns => 2,
    18602251        PrintConv => {
    18612252            0 => 'n/a',
     
    18722263        Count => 3,
    18732264        PrintConv => {
     2265           '0 0 0' => 'n/a', #PH (?)
    18742266           '-2 -2 1' => 'Off',
    18752267           '-1 -2 1' => 'Low',
     
    18822274        Writable => 'int16u',
    18832275        Count => 4,
     2276        PrintConvColumns => 2,
    18842277        PrintConv => [ \%filters ],
    18852278    },
     
    18872280        Name => 'MagicFilter',
    18882281        Writable => 'int16u',
    1889         Count => 4, # (2nd number is 0 or 1280, 3rd/4th are 0)
     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,
    18902285        PrintConv => [ \%filters ],
    18912286    },
    1892     0x600 => { #PH/4
     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
    18932449        Name => 'DriveMode',
    18942450        Writable => 'int16u',
    18952451        Count => -1,
    1896         Notes => '2 or 3 numbers: 1. Mode, 2. Shot number, 3. Mode bits',
     2452        Notes => '2, 3 or 5 numbers: 1. Mode, 2. Shot number, 3. Mode bits, 5. Shutter mode',
    18972453        PrintConv => q{
    1898             my ($a,$b,$c) = split ' ',$val;
    1899             return 'Single Shot' unless $a;
     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;
    19002461            if ($a == 5 and defined $c) {
    19012462                $a = DecodeBits($c, { #6
     
    19042465                    2 => 'FL',
    19052466                    3 => 'MF',
     2467                    4 => 'ISO', #forum8906
     2468                    5 => 'AE Auto', #forum8906
     2469                    6 => 'Focus', #PH
    19062470                }) . ' Bracketing';
    19072471                $a =~ s/, /+/g;
     
    19152479                $a = $a{$a} || "Unknown ($a)";
    19162480            }
    1917             return "$a, Shot $b";
     2481            return "$a, Shot $b$e";
    19182482        },
    19192483    },
     
    19312495                4 => 'Top to Bottom',
    19322496            );
    1933             return ($a{$a} || "Unknown ($a)") . ', Shot ' . $b;
     2497            return(($a{$a} || "Unknown ($a)") . ', Shot ' . $b);
    19342498        },
    19352499    },
     
    19552519            2 => 'On, Mode 2',
    19562520            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            },
    19572560        },
    19582561    },
     
    19812584    },
    19822585    0x903 => { #11
    1983         Name => 'LevelGaugeRoll',
    1984         Writable => 'int16u',
    1985         PrintConv => \%offOn,
     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"',
    19862593    },
    19872594    0x904 => { #11
    1988         Name => 'LevelGaugePitch',
    1989         Writable => 'int16u',
    1990         PrintConv => \%offOn,
     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)',
    19912609    },
    19922610);
     
    20042622        Count => 4,
    20052623    },
    2006     0x100 => {
    2007         Name => 'RawDevExposureBiasValue',
    2008         Writable => 'rational64s',
    2009     },
    2010     0x101 => {
    2011         Name => 'RawDevWhiteBalanceValue',
    2012         Writable => 'int16u',
    2013     },
    2014     0x102 => {
    2015         Name => 'RawDevWBFineAdjustment',
    2016         Writable => 'int16s',
    2017     },
    2018     0x103 => {
    2019         Name => 'RawDevGrayPoint',
    2020         Writable => 'int16u',
    2021         Count => 3,
    2022     },
    2023     0x104 => {
    2024         Name => 'RawDevSaturationEmphasis',
    2025         Writable => 'int16s',
    2026         Count => 3,
    2027     },
    2028     0x105 => {
    2029         Name => 'RawDevMemoryColorEmphasis',
    2030         Writable => 'int16u',
    2031     },
    2032     0x106 => {
    2033         Name => 'RawDevContrastValue',
    2034         Writable => 'int16s',
    2035         Count => 3,
    2036     },
    2037     0x107 => {
    2038         Name => 'RawDevSharpnessValue',
    2039         Writable => 'int16s',
    2040         Count => 3,
    2041     },
     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 },
    20422632    0x108 => {
    20432633        Name => 'RawDevColorSpace',
     
    20632653        Writable => 'int16u',
    20642654        PrintConv => { #11
     2655            0 => '(none)',
    20652656            BITMASK => {
    20662657                0 => 'Noise Reduction',
     
    20842675        Writable => 'int16u',
    20852676        PrintConv => { #11
     2677            0 => '(none)',
    20862678            BITMASK => {
    20872679                0 => 'WB Color Temp',
     
    21102702        Count => 4,
    21112703    },
    2112     0x100 => {
    2113         Name => 'RawDevExposureBiasValue',
    2114         Writable => 'rational64s',
    2115     },
     2704    0x100 => { Name => 'RawDevExposureBiasValue',   Writable => 'rational64s' },
    21162705    0x101 => {
    21172706        Name => 'RawDevWhiteBalance',
     
    21222711        },
    21232712    },
    2124     0x102 => {
    2125         Name => 'RawDevWhiteBalanceValue',
    2126         Writable => 'int16u',
    2127     },
    2128     0x103 => {
    2129         Name => 'RawDevWBFineAdjustment',
    2130         Writable => 'int16s',
    2131     },
    2132     0x104 => {
    2133         Name => 'RawDevGrayPoint',
    2134         Writable => 'int16u',
    2135         Count => 3,
    2136     },
    2137     0x105 => {
    2138         Name => 'RawDevContrastValue',
    2139         Writable => 'int16s',
    2140         Count => 3,
    2141     },
    2142     0x106 => {
    2143         Name => 'RawDevSharpnessValue',
    2144         Writable => 'int16s',
    2145         Count => 3,
    2146     },
    2147     0x107 => {
    2148         Name => 'RawDevSaturationEmphasis',
    2149         Writable => 'int16s',
    2150         Count => 3,
    2151     },
    2152     0x108 => {
    2153         Name => 'RawDevMemoryColorEmphasis',
    2154         Writable => 'int16u',
    2155     },
     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' },
    21562720    0x109 => {
    21572721        Name => 'RawDevColorSpace',
     
    21672731        Writable => 'int16u',
    21682732        PrintConv => {
     2733            0 => '(none)',
    21692734            BITMASK => {
    21702735                0 => 'Noise Reduction',
     
    21932758        },
    21942759    },
    2195     0x10d => {
    2196         Name => 'RawDevPMSaturation',
    2197         Writable => 'int16s',
    2198         Count => 3,
    2199     },
    2200     0x10e => {
    2201         Name => 'RawDevPMContrast',
    2202         Writable => 'int16s',
    2203         Count => 3,
    2204     },
    2205     0x10f => {
    2206         Name => 'RawDevPMSharpness',
    2207         Writable => 'int16s',
    2208         Count => 3,
    2209     },
     2760    0x10d => { Name => 'RawDevPMSaturation',    Writable => 'int16s', Count => 3 },
     2761    0x10e => { Name => 'RawDevPMContrast',      Writable => 'int16s', Count => 3 },
     2762    0x10f => { Name => 'RawDevPMSharpness',     Writable => 'int16s', Count => 3 },
    22102763    0x110 => {
    22112764        Name => 'RawDevPM_BWFilter',
     
    22302783        },
    22312784    },
    2232     0x112 => {
    2233         Name => 'RawDevGradation',
    2234         Writable => 'int16s',
    2235         Count => 3,
    2236     },
    2237     0x113 => {
    2238         Name => 'RawDevSaturation3',
    2239         Writable => 'int16s',
    2240         Count => 3, #(NC)
    2241     },
    2242     0x119 => {
    2243         Name => 'RawDevAutoGradation',
    2244         Writable => 'int16u', #(NC)
    2245         PrintConv => \%offOn,
    2246     },
    2247     0x120 => {
    2248         Name => 'RawDevPMNoiseFilter',
    2249         Writable => 'int16u', #(NC)
     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 ],
    22502795    },
    22512796);
     
    22632808        Count => 4,
    22642809    },
    2265     0x100 => { #6
    2266         Name => 'WB_RBLevels',
    2267         Writable => 'int16u',
    2268         Count => 2,
    2269     },
    2270     0x102 => { #11
    2271         Name => 'WB_RBLevels3000K',
    2272         Writable => 'int16u',
    2273         Count => 2,
    2274     },
    2275     0x103 => { #11
    2276         Name => 'WB_RBLevels3300K',
    2277         Writable => 'int16u',
    2278         Count => 2,
    2279     },
    2280     0x104 => { #11
    2281         Name => 'WB_RBLevels3600K',
    2282         Writable => 'int16u',
    2283         Count => 2,
    2284     },
    2285     0x105 => { #11
    2286         Name => 'WB_RBLevels3900K',
    2287         Writable => 'int16u',
    2288         Count => 2,
    2289     },
    2290     0x106 => { #11
    2291         Name => 'WB_RBLevels4000K',
    2292         Writable => 'int16u',
    2293         Count => 2,
    2294     },
    2295     0x107 => { #11
    2296         Name => 'WB_RBLevels4300K',
    2297         Writable => 'int16u',
    2298         Count => 2,
    2299     },
    2300     0x108 => { #11
    2301         Name => 'WB_RBLevels4500K',
    2302         Writable => 'int16u',
    2303         Count => 2,
    2304     },
    2305     0x109 => { #11
    2306         Name => 'WB_RBLevels4800K',
    2307         Writable => 'int16u',
    2308         Count => 2,
    2309     },
    2310     0x10a => { #11
    2311         Name => 'WB_RBLevels5300K',
    2312         Writable => 'int16u',
    2313         Count => 2,
    2314     },
    2315     0x10b => { #11
    2316         Name => 'WB_RBLevels6000K',
    2317         Writable => 'int16u',
    2318         Count => 2,
    2319     },
    2320     0x10c => { #11
    2321         Name => 'WB_RBLevels6600K',
    2322         Writable => 'int16u',
    2323         Count => 2,
    2324     },
    2325     0x10d => { #11
    2326         Name => 'WB_RBLevels7500K',
    2327         Writable => 'int16u',
    2328         Count => 2,
    2329     },
    2330     0x10e => { #11
    2331         Name => 'WB_RBLevelsCWB1',
    2332         Writable => 'int16u',
    2333         Count => 2,
    2334     },
    2335     0x10f => { #11
    2336         Name => 'WB_RBLevelsCWB2',
    2337         Writable => 'int16u',
    2338         Count => 2,
    2339     },
    2340     0x110 => { #11
    2341         Name => 'WB_RBLevelsCWB3',
    2342         Writable => 'int16u',
    2343         Count => 2,
    2344     },
    2345     0x111 => { #11
    2346         Name => 'WB_RBLevelsCWB4',
    2347         Writable => 'int16u',
    2348         Count => 2,
    2349     },
    2350     0x113 => { #11
    2351         Name => 'WB_GLevel3000K',
    2352         Writable => 'int16u',
    2353     },
    2354     0x114 => { #11
    2355         Name => 'WB_GLevel3300K',
    2356         Writable => 'int16u',
    2357     },
    2358     0x115 => { #11
    2359         Name => 'WB_GLevel3600K',
    2360         Writable => 'int16u',
    2361     },
    2362     0x116 => { #11
    2363         Name => 'WB_GLevel3900K',
    2364         Writable => 'int16u',
    2365     },
    2366     0x117 => { #11
    2367         Name => 'WB_GLevel4000K',
    2368         Writable => 'int16u',
    2369     },
    2370     0x118 => { #11
    2371         Name => 'WB_GLevel4300K',
    2372         Writable => 'int16u',
    2373     },
    2374     0x119 => { #11
    2375         Name => 'WB_GLevel4500K',
    2376         Writable => 'int16u',
    2377     },
    2378     0x11a => { #11
    2379         Name => 'WB_GLevel4800K',
    2380         Writable => 'int16u',
    2381     },
    2382     0x11b => { #11
    2383         Name => 'WB_GLevel5300K',
    2384         Writable => 'int16u',
    2385     },
    2386     0x11c => { #11
    2387         Name => 'WB_GLevel6000K',
    2388         Writable => 'int16u',
    2389     },
    2390     0x11d => { #11
    2391         Name => 'WB_GLevel6600K',
    2392         Writable => 'int16u',
    2393     },
    2394     0x11e => { #11
    2395         Name => 'WB_GLevel7500K',
    2396         Writable => 'int16u',
    2397     },
    2398     0x11f => { #11
    2399         Name => 'WB_GLevel',
    2400         Writable => 'int16u',
    2401     },
     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)
    24022843    0x200 => { #6
    24032844        Name => 'ColorMatrix',
     
    24142855    # 0x0253-0x0255 are Adobe RGB color matrices
    24152856    # 0x0256-0x0258 are ProPhoto RGB color matrices
    2416     0x300 => { #11
    2417         Name => 'Enhancer',
    2418         Writable => 'int16u',
    2419     },
    2420     0x301 => { #11
    2421         Name => 'EnhancerValues',
    2422         Writable => 'int16u',
    2423         Count => 7,
    2424     },
    2425     0x310 => { #11
    2426         Name => 'CoringFilter',
    2427         Writable => 'int16u',
    2428     },
    2429     0x0311 => { #11
    2430         Name => 'CoringValues',
    2431         Writable => 'int16u',
    2432         Count => 7,
    2433     },
    2434     0x600 => { #11
    2435         Name => 'BlackLevel2',
    2436         Writable => 'int16u',
    2437         Count => 4,
    2438     },
    2439     0x610 => { #11
    2440         Name => 'GainBase',
    2441         Writable => 'int16u',
    2442     },
    2443     0x611 => { #4/6
    2444         Name => 'ValidBits',
    2445         Writable => 'int16u',
    2446         Count => 2,
    2447     },
    2448     0x612 => { #11
    2449         Name => 'CropLeft',
    2450         Writable => 'int16u',
    2451         Count => 2,
    2452     },
    2453     0x613 => { #11
    2454         Name => 'CropTop',
    2455         Writable => 'int16u',
    2456         Count => 2,
    2457     },
    2458     0x614 => { #PH/11
    2459         Name => 'CropWidth',
    2460         Writable => 'int32u',
    2461     },
    2462     0x615 => { #PH/11
    2463         Name => 'CropHeight',
    2464         Writable => 'int32u',
     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' ],
    24652881    },
    24662882    # 0x800 LensDistortionParams, float[9] (ref 11)
    24672883    # 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    },
    24682890    # 0x1010-0x1012 are the processing options used in camera or in
    24692891    # Olympus software, which 0x050a-0x050c are in-camera only (ref 6)
     
    24722894        Writable => 'int16u',
    24732895        PrintConv => {
     2896            0 => '(none)',
    24742897            BITMASK => {
    24752898                0 => 'Noise Reduction',
     
    24952918        PrintConv => [{
    24962919            0 => 'Off',
     2920            1 => 'Live Composite', #github issue#61
    24972921            2 => 'On (2 frames)',
    24982922            3 => 'On (3 frames)',
     
    25002924    },
    25012925    0x1103 => { #PH
    2502         Name => 'UnknownBlock',
     2926        Name => 'UnknownBlock3',
    25032927        Writable => 'undef',
    2504         Notes => 'unknown 142kB block in ORF images, not copied to JPEG images',
     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',
    25052936        # 'Drop' because too large for APP1 in JPEG images
    25062937        Flags => [ 'Unknown', 'Binary', 'Drop' ],
     
    25112942        Count => 2,
    25122943        PrintConv => {
     2944            # '0 0' - have seen this with a 16:9 XZ-1 image - PH
    25132945            '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
    25142948            '2 2' => '3:2',
     2949            '3 1' => '16:9 (RAW)', #forum6285
    25152950            '3 3' => '16:9',
     2951            '4 1' => '1:1 (RAW)', #forum6285
    25162952            '4 4' => '6:6',
    25172953            '5 5' => '5:4',
     
    25192955            '7 7' => '6:5',
    25202956            '8 8' => '7:5',
     2957            '9 1' => '3:4 (RAW)', #forum6285
    25212958            '9 9' => '3:4',
    25222959        },
    25232960    },
    2524     0x1113 => { #11
    2525         Name => 'AspectFrame',
    2526         Writable => 'int16u',
    2527         Count => 4,
    2528     },
     2961    0x1113 => { Name => 'AspectFrame',  Writable => 'int16u', Count => 4 }, #11
    25292962    0x1200 => { #11/PH
    25302963        Name => 'FacesDetected',
     
    25452978        },
    25462979    },
    2547     0x1202 => { #PH
    2548         Name => 'MaxFaces',
    2549         Writable => 'int32u',
    2550         Count => 3,
    2551     },
     2980    0x1202 => { Name => 'MaxFaces',     Writable => 'int32u', Count => 3 }, #PH
    25522981    0x1203 => { #PH
    25532982        Name => 'FaceDetectFrameSize',
     
    25612990        Count => 12,
    25622991        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',
    25633025    },
    25643026);
     
    25823044        Unknown => 1, #6
    25833045    },
    2584     0x210 => { #11
    2585         Name => 'SceneDetect',
    2586         Writable => 'int16u',
    2587     },
     3046    0x210 => { Name => 'SceneDetect',       Writable => 'int16u' }, #11
    25883047    0x211 => { #11
    25893048        Name => 'SceneArea',
     
    25993058        Unknown => 1, # (but what does it mean?)
    26003059    },
    2601     0x300 => { #6
    2602         Name => 'ZoomStepCount',
    2603         Writable => 'int16u',
    2604     },
    2605     0x301 => { #11
    2606         Name => 'FocusStepCount',
    2607         Writable => 'int16u',
    2608     },
    2609     0x303 => { #11
    2610         Name => 'FocusStepInfinity',
    2611         Writable => 'int16u',
    2612     },
    2613     0x304 => { #11
    2614         Name => 'FocusStepNear',
    2615         Writable => 'int16u',
    2616     },
     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
    26173065    0x305 => { #4
    26183066        Name => 'FocusDistance',
     
    26493097            ValueConv => '($val & 0x1f) . " " . ($val & 0xffe0)',
    26503098            ValueConvInv => 'my @v=split(" ",$val); @v == 2 ? $v[0] + $v[1] : $val',
     3099            PrintConvColumns => 2,
    26513100            PrintConv => [
    26523101                {
     
    26743123                    0x15 => 'Bottom-center (vertical)',
    26753124                    0x16 => 'Bottom-right (vertical)',
     3125                    0x1f => 'n/a', #PH (NC, E-3)
    26763126                },
    26773127                {
     
    26793129                    0x40 => 'All Target',
    26803130                    0x80 => 'Dynamic Single Target',
     3131                    0xe0 => 'n/a', #PH (NC, E-3)
    26813132                }
    26823133            ],
     
    27163167    ],
    27173168    # 0x31a Continuous AF parameters?
    2718     # 0x328 Related to AF (maybe Imager AF data?) (ref PH, E-PL1):
    2719     #  - offset 0x2a (int8u)  ImagerAFMode?  0=Manual, 1=Auto
    2720     #  - offset 0x30 (int16u) AFAreaXPosition
    2721     #  - offset 0x32 (int16u) AFAreaWidth (202)
    2722     #  - offset 0x34 (int16u) AFAreaYPosition
    2723     #  - offset 0x36 (int16u) AFAreaHeight (50)
    2724     #  (AF area positions above give the top-left coordinates of the AF area in the
    2725     #   AF frame. Increasing Y is downwards, and the AF frame size is about 1280x256)
     3169    0x328 => { #PH
     3170        Name => 'AFInfo',
     3171        SubDirectory => { TagTable => 'Image::ExifTool::Olympus::AFInfo' },
     3172    },
    27263173    # 0x1200-0x1209 Flash information:
    27273174    0x1201 => { #6
     
    27473194        },
    27483195    },
    2749     0x1205 => { #11 (ref converts to mm using table)
    2750         Name => 'ExternalFlashZoom',
    2751         Writable => 'rational64u',
    2752     },
     3196    0x1205 => { Name => 'ExternalFlashZoom', Writable => 'rational64u' }, #11 (ref converts to mm using table)
    27533197    0x1208 => { #6
    27543198        Name => 'InternalFlash',
     
    27743218        },
    27753219    },
    2776     0x1500 => { #6
     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    },{
    27773233        Name => 'SensorTemperature',
    27783234        Writable => 'int16s',
    2779         Notes => q{
    2780             approximately Celsius for E-1, unknown calibration for E-3/410/420/510, and
    2781             always zero for E-300/330/400/500, divide by 10 for E-P1?
    2782         },
    2783     },
     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    }],
    27843263    0x1600 => { # ref http://fourthirdsphoto.com/vbb/showpost.php?p=107607&postcount=15
    27853264        Name => 'ImageStabilization',
     
    27973276);
    27983277
     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
    27993292# Olympus raw information tags (ref 6)
    28003293%Image::ExifTool::Olympus::RawInfo = (
    28013294    WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
    28023295    CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
    2803     NOTES => 'These tags are found only in ORF images of some models (ie. C8080WZ).',
     3296    NOTES => 'These tags are found only in ORF images of some models (eg. C8080WZ).',
    28043297    GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
    28053298    0x000 => {
     
    28093302        Count => 4,
    28103303    },
    2811     0x100 => {
    2812         Name => 'WB_RBLevelsUsed',
    2813         Writable => 'int16u',
    2814         Count => 2,
    2815     },
    2816     0x110 => {
    2817         Name => 'WB_RBLevelsAuto',
    2818         Writable => 'int16u',
    2819         Count => 2,
    2820     },
    2821     0x120 => {
    2822         Name => 'WB_RBLevelsShade',
    2823         Writable => 'int16u',
    2824         Count => 2,
    2825     },
    2826     0x121 => {
    2827         Name => 'WB_RBLevelsCloudy',
    2828         Writable => 'int16u',
    2829         Count => 2,
    2830     },
    2831     0x122 => {
    2832         Name => 'WB_RBLevelsFineWeather',
    2833         Writable => 'int16u',
    2834         Count => 2,
    2835     },
    2836     0x123 => {
    2837         Name => 'WB_RBLevelsTungsten',
    2838         Writable => 'int16u',
    2839         Count => 2,
    2840     },
    2841     0x124 => {
    2842         Name => 'WB_RBLevelsEveningSunlight',
    2843         Writable => 'int16u',
    2844         Count => 2,
    2845     },
    2846     0x130 => {
    2847         Name => 'WB_RBLevelsDaylightFluor',
    2848         Writable => 'int16u',
    2849         Count => 2,
    2850     },
    2851     0x131 => {
    2852         Name => 'WB_RBLevelsDayWhiteFluor',
    2853         Writable => 'int16u',
    2854         Count => 2,
    2855     },
    2856     0x132 => {
    2857         Name => 'WB_RBLevelsCoolWhiteFluor',
    2858         Writable => 'int16u',
    2859         Count => 2,
    2860     },
    2861     0x133 => {
    2862         Name => 'WB_RBLevelsWhiteFluorescent',
    2863         Writable => 'int16u',
    2864         Count => 2,
    2865     },
     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 },
    28663315    0x200 => {
    28673316        Name => 'ColorMatrix2',
     
    28763325    # 0x300 => sharpness-related
    28773326    # 0x301 => list of sharpness-related values
    2878     0x310 => {
    2879         Name => 'CoringFilter',
    2880         Writable => 'int16u',
    2881     },
    2882     0x311 => {
    2883         Name => 'CoringValues',
    2884         Writable => 'int16u',
    2885         Count => 11,
    2886     },
    2887     0x600 => {
    2888         Name => 'BlackLevel2',
    2889         Writable => 'int16u',
    2890         Count => 4,
    2891     },
     3327    0x310 => { Name => 'CoringFilter',      Writable => 'int16u' },
     3328    0x311 => { Name => 'CoringValues',      Writable => 'int16u', Count => 11 },
     3329    0x600 => { Name => 'BlackLevel2',       Writable => 'int16u', Count => 4 },
    28923330    0x601 => {
    28933331        Name => 'YCbCrCoefficients',
     
    28953333        Format => 'rational32u',
    28963334    },
    2897     0x611 => {
    2898         Name => 'ValidPixelDepth',
    2899         Writable => 'int16u',
    2900         Count => 2,
    2901     },
    2902     0x612 => { #11
    2903         Name => 'CropLeft',
    2904         Writable => 'int16u',
    2905     },
    2906     0x613 => { #11
    2907         Name => 'CropTop',
    2908         Writable => 'int16u',
    2909     },
    2910     0x614 => {
    2911         Name => 'CropWidth',
    2912         Writable => 'int32u',
    2913     },
    2914     0x615 => {
    2915         Name => 'CropHeight',
    2916         Writable => 'int32u',
    2917     },
     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' },
    29183340    0x1000 => {
    29193341        Name => 'LightSource',
     
    29353357    },
    29363358    # the following 5 tags all have 3 values: val, min, max
    2937     0x1001 => {
    2938         Name => 'WhiteBalanceComp',
    2939         Writable => 'int16s',
    2940         Count => 3,
    2941     },
    2942     0x1010 => {
    2943         Name => 'SaturationSetting',
    2944         Writable => 'int16s',
    2945         Count => 3,
    2946     },
    2947     0x1011 => {
    2948         Name => 'HueSetting',
    2949         Writable => 'int16s',
    2950         Count => 3,
    2951     },
    2952     0x1012 => {
    2953         Name => 'ContrastSetting',
    2954         Writable => 'int16s',
    2955         Count => 3,
    2956     },
    2957     0x1013 => {
    2958         Name => 'SharpnessSetting',
    2959         Writable => 'int16s',
    2960         Count => 3,
    2961     },
     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 },
    29623364    # settings written by Camedia Master 4.x
    2963     0x2000 => {
    2964         Name => 'CMExposureCompensation',
    2965         Writable => 'rational64s',
    2966     },
    2967     0x2001 => {
    2968         Name => 'CMWhiteBalance',
    2969         Writable => 'int16u',
    2970     },
    2971     0x2002 => {
    2972         Name => 'CMWhiteBalanceComp',
    2973         Writable => 'int16s',
    2974     },
    2975     0x2010 => {
    2976         Name => 'CMWhiteBalanceGrayPoint',
    2977         Writable => 'int16u',
    2978         Count => 3,
    2979     },
    2980     0x2020 => {
    2981         Name => 'CMSaturation',
    2982         Writable => 'int16s',
    2983         Count => 3,
    2984     },
    2985     0x2021 => {
    2986         Name => 'CMHue',
    2987         Writable => 'int16s',
    2988         Count => 3,
    2989     },
    2990     0x2022 => {
    2991         Name => 'CMContrast',
    2992         Writable => 'int16s',
    2993         Count => 3,
    2994     },
    2995     0x2023 => {
    2996         Name => 'CMSharpness',
    2997         Writable => 'int16s',
    2998         Count => 3,
    2999     },
     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 },
    30003373);
    30013374
     
    30383411    0x18 => {
    30393412        Name => 'Model',
     3413        Description => 'Camera Model Name',
    30403414        Format => 'string[8]',
     3415        SeparateTable => 'CameraType',
     3416        PrintConv => \%olympusCameraTypes,
    30413417    },
    30423418    # (01 00 at offset 0x20)
     
    30453421        Unknown => 1,
    30463422        Format => 'int32u',
    3047         # this conversion doesn't work for all models (ie. gives "1/100000")
     3423        # this conversion doesn't work for all models (eg. gives "1/100000")
    30483424        ValueConv => '$val ? 10 / $val : 0',
    30493425        PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
     
    30843460    0x18 => {
    30853461        Name => 'Model',
     3462        Description => 'Camera Model Name',
    30863463        Format => 'string[24]',
     3464        Notes => 'the actual model name, no decoding necessary',
    30873465    },
    30883466    # (01 00 at offset 0x30)
     
    31293507    0x18 => {
    31303508        Name => 'Model',
     3509        Description => 'Camera Model Name',
    31313510        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        },
    31323523    },
    31333524    0x28 => {
     
    31413532        PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
    31423533    },
    3143     # NEED MORE SAMPLES TO DECODE THIS
     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    },
    31443550);
    31453551
     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
    31463764# tags in Olympus AVI videos (ref PH)
     3765# (very similar to Pentax::Junk2 tags)
    31473766%Image::ExifTool::Olympus::AVI = (
    31483767    PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
     
    31553774    },
    31563775    0x2c => {
    3157         Name => 'ModelType',
     3776        Name => 'Model',
     3777        Description => 'Camera Model Name',
    31583778        Format => 'string[24]',
     3779        SeparateTable => 'CameraType',
     3780        PrintConv => \%olympusCameraTypes,
    31593781    },
    31603782    0x5e => {
     
    31733795        Groups => { 2 => 'Time' },
    31743796    },
    3175     0x12d => {
    3176         Name => 'ThumbnailLength',
    3177         Format => 'int32u',
    3178     },
    3179     0x131 => {
    3180         Name => 'ThumbnailImage',
    3181         Format => 'undef[$val{0x12d}]',
    3182         Notes => '160x120 JPEG thumbnail image',
    3183         RawConv => '$self->ValidateImage(\$val,$tag)',
     3797    0x129 => {
     3798        Name => 'ThumbInfo',
     3799        SubDirectory => { TagTable => 'Image::ExifTool::Olympus::thmb2' },
    31843800    },
    31853801);
     
    31963812    0x0c => {
    31973813        Name => 'Model',
     3814        Description => 'Camera Model Name',
    31983815        Format => 'string[16]',
    31993816    },
     
    32573874);
    32583875
     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
    32593916# Olympus composite tags
    32603917%Image::ExifTool::Olympus::Composite = (
     
    32793936    },
    32803937    ZoomedPreviewImage => {
     3938        Groups => { 2 => 'Preview' },
    32813939        Require => {
    32823940            0 => 'ZoomedPreviewStart',
    32833941            1 => 'ZoomedPreviewLength',
    32843942        },
    3285         RawConv => 'Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"ZoomedPreviewImage")',
     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,
    32863958    },
    32873959);
     
    33043976    my @info = split ' ', $extender;
    33053977    # validate that extender identifier is reasonable
    3306     return 0 unless @info >= 2 and $info[1];
    3307     # if it's not an EC-14 (id 0 4) then assume it was really attached
     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
    33083980    # (other extenders don't seem to affect the reported max aperture)
    3309     return 1 if "$info[0] $info[1]" ne '0 4';
     3981    return 1 if "$info[0] $info[1]" ne '0 04';
    33103982    # get the maximum aperture for this lens (in $1)
    3311     $lensType =~ / F(\d+(.\d+)?)/ or return 1;
     3983    $lensType =~ / F(\d+(\.\d+)?)/ or return 1;
    33123984    # If the maximum aperture at the maximum focal length is greater than the
    33133985    # known max/max aperture of the lens, then the extender must be attached
    3314     return ($maxAperture - $1 > 0.2) ? 1 : 2;
     3986    return(($maxAperture - $1 > 0.2) ? 1 : 2);
    33153987}
    33163988
     
    33444016
    33454017#------------------------------------------------------------------------------
     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#------------------------------------------------------------------------------
    33464039# Process ORF file
    33474040# Inputs: 0) ExifTool object reference, 1) directory information reference
     
    33494042sub ProcessORF($$)
    33504043{
    3351     my ($exifTool, $dirInfo) = @_;
    3352     return $exifTool->ProcessTIFF($dirInfo);
     4044    my ($et, $dirInfo) = @_;
     4045    return $et->ProcessTIFF($dirInfo);
    33534046}
    33544047
     
    33724065=head1 AUTHOR
    33734066
    3374 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
     4067Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
    33754068
    33764069This library is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.