Project

General

Profile

Feature #529 ยป exiv2-pentax.patch

Redmine Admin, 26 Sep 2007 23:02

View differences:

value.cpp (working copy)
85 85
        case unsignedRational:
86 86
            value = AutoPtr(new ValueType<URational>);
87 87
            break;
88
        case invalid6:
89
            value = AutoPtr(new DataValue(invalid6));
88
        case signedByte:
89
            value = AutoPtr(new DataValue(signedByte));
90 90
            break;
91 91
        case undefined:
92 92
            value = AutoPtr(new DataValue);
Makefile (working copy)
83 83
endif
84 84
CCSRC += rafimage.cpp         \
85 85
	 sigmamn.cpp          \
86
	 pentaxmn.cpp          \
86 87
	 sonymn.cpp           \
87 88
	 tags.cpp             \
88 89
	 tiffcomposite.cpp    \
pentaxmn.hpp (revision 0)
1
// ***************************************************************** -*- C++ -*-
2
/*
3
 * Copyright (C) 2007 Michal Cihar <michal@cihar.com>
4
 *
5
 * This program is part of the Exiv2 distribution.
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License
9
 * as published by the Free Software Foundation; either version 2
10
 * of the License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
20
 */
21
/*!
22
  @file    pentaxmn.hpp
23
  @brief   Pentax MakerNote implemented according to the specification
24
  		   http://www.gvsoft.homedns.org/exif/makernote-pentax-type3.html and 
25
		   based on ExifTool implementation and 
26
           <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html">Pentax Makernote list</a> by Phil Harvey<br>
27
  @version $Rev: 1039 $
28
  @author  Michal Cihar
29
           <a href="mailto:michal@cihar.com">michal@cihar.com</a>
30
  @date    27-Sep-07
31
 */
32
#ifndef PENTAXMN_HPP_
33
#define PENTAXMN_HPP_
34

  
35
// *****************************************************************************
36
// included header files
37
#include "types.hpp"
38
#include "makernote.hpp"
39
#include "tags.hpp"
40

  
41
// + standard includes
42
#include <string>
43
#include <iosfwd>
44
#include <memory>
45

  
46
// *****************************************************************************
47
// namespace extensions
48
namespace Exiv2 {
49

  
50
// *****************************************************************************
51
// class declarations
52
    class Value;
53

  
54
// *****************************************************************************
55
// free functions
56

  
57
    /*!
58
      @brief Return an auto-pointer to a newly created empty MakerNote
59
             initialized to operate in the memory management model indicated.
60
             The caller owns this copy and the auto-pointer ensures that it
61
             will be deleted.
62

  
63
      @param alloc Memory management model for the new MakerNote. Determines if
64
             memory required to store data should be allocated and deallocated
65
             (true) or not (false). If false, only pointers to the buffer
66
             provided to read() will be kept. See Ifd for more background on
67
             this concept.
68
      @param buf Pointer to the makernote character buffer (not used).
69
      @param len Length of the makernote character buffer (not used).
70
      @param byteOrder Byte order in which the Exif data (and possibly the
71
             makernote) is encoded (not used).
72
      @param offset Offset from the start of the TIFF header of the makernote
73
             buffer (not used).
74

  
75
      @return An auto-pointer to a newly created empty MakerNote. The caller
76
             owns this copy and the auto-pointer ensures that it will be
77
             deleted.
78
     */
79
    MakerNote::AutoPtr createPentaxMakerNote(bool alloc,
80
                                           const byte* buf,
81
                                           long len,
82
                                           ByteOrder byteOrder,
83
                                           long offset);
84

  
85
// *****************************************************************************
86
// class definitions
87

  
88
    //! MakerNote for Pentaxfilm cameras
89
    class PentaxMakerNote : public IfdMakerNote {
90
    public:
91
        //! Shortcut for a %PentaxMakerNote auto pointer.
92
        typedef std::auto_ptr<PentaxMakerNote> AutoPtr;
93

  
94
        //! @name Creators
95
        //@{
96
        /*!
97
          @brief Constructor. Allows to choose whether or not memory management
98
                 is required for the makernote entries.
99
         */
100
        PentaxMakerNote(bool alloc =true);
101
        //! Copy constructor
102
        PentaxMakerNote(const PentaxMakerNote& rhs);
103
        //! Virtual destructor
104
        virtual ~PentaxMakerNote() {}
105
        //@}
106

  
107
        //! @name Manipulators
108
        //@{
109
        int readHeader(const byte* buf,
110
                       long len,
111
                       ByteOrder byteOrder);
112
        //@}
113

  
114
        //! @name Accessors
115
        //@{
116
        int checkHeader() const;
117
        AutoPtr create(bool alloc =true) const;
118
        AutoPtr clone() const;
119
        //! Return read-only list of built-in Pentaxfilm tags
120
        static const TagInfo* tagList();
121
        //@}
122

  
123
        //! @cond IGNORE
124
        // Public only so that we can create a static instance
125
        struct RegisterMn {
126
            RegisterMn();
127
        };
128
        //! @endcond
129

  
130
		static std::ostream& printPentaxVersion(std::ostream& os, const Value& value);
131
		static std::ostream& printPentaxResolution(std::ostream& os, const Value& value);
132
    	static std::ostream& printPentaxDate(std::ostream& os, const Value& value);
133
    	static std::ostream& printPentaxTime(std::ostream& os, const Value& value);
134
    	static std::ostream& printPentaxExposure(std::ostream& os, const Value& value);
135
    	static std::ostream& printPentaxFValue(std::ostream& os, const Value& value);
136
    	static std::ostream& printPentaxFocalLength(std::ostream& os, const Value& value);
137
    	static std::ostream& printPentaxCompensation(std::ostream& os, const Value& value);
138
    	static std::ostream& printPentaxTemperature(std::ostream& os, const Value& value);
139
    	static std::ostream& printPentaxFlashCompensation(std::ostream& os, const Value& value);
140
    	static std::ostream& printPentaxBracketing(std::ostream& os, const Value& value);
141
    	static std::ostream& printPentaxImageProcessing(std::ostream& os, const Value& value);
142
    	static std::ostream& printPentaxPictureMode(std::ostream& os, const Value& value);
143
    	static std::ostream& printPentaxDriveMode(std::ostream& os, const Value& value);
144
    	static std::ostream& printPentaxLensType(std::ostream& os, const Value& value);
145

  
146
    private:
147
        //! Internal virtual create function.
148
        PentaxMakerNote* create_(bool alloc =true) const;
149
        //! Internal virtual copy constructor.
150
        PentaxMakerNote* clone_() const;
151

  
152
        //! Tag information
153
        static const TagInfo tagInfo_[];
154
    }; // class PentaxMakerNote
155

  
156
    static PentaxMakerNote::RegisterMn registerPentaxMakerNote;
157
}                                       // namespace Exiv2
158

  
159
#endif                                  // #ifndef PENTAXMN_HPP_
ifd.cpp (working copy)
482 482
                e.setOffset(tmpOffset - offset_);
483 483
                // Set the size to at least for bytes to accomodate offset-data
484 484
#ifndef SUPPRESS_WARNINGS
485
                if (i->type_ < 1 || i->type_ > 10 || i->type_ == 6) {
485
                if (i->type_ < 1 || i->type_ > 10) {
486 486
                    std::cerr << "Warning: "
487 487
                              << ExifTags::ifdName(ifdId_) << " tag 0x"
488 488
                              << std::setw(4) << std::setfill('0') << std::hex
types.cpp (working copy)
63 63
        TypeInfoTable(unsignedShort,    "Short",       2),
64 64
        TypeInfoTable(unsignedLong,     "Long",        4),
65 65
        TypeInfoTable(unsignedRational, "Rational",    8),
66
        TypeInfoTable(invalid6,         "Invalid(6)",  1),
66
        TypeInfoTable(signedByte,       "SByte",       1),
67 67
        TypeInfoTable(undefined,        "Undefined",   1),
68 68
        TypeInfoTable(signedShort,      "SShort",      2),
69 69
        TypeInfoTable(signedLong,       "SLong",       4),
mn.hpp (working copy)
38 38
#include "nikonmn.hpp"
39 39
#include "olympusmn.hpp"
40 40
#include "panasonicmn.hpp"
41
#include "pentaxmn.hpp"
41 42
#include "sigmamn.hpp"
42 43
#include "sonymn.hpp"
43 44

  
tags.cpp (working copy)
89 89
        IfdInfo(nikon3IfdId, "Makernote", "Nikon3"),
90 90
        IfdInfo(olympusIfdId, "Makernote", "Olympus"),
91 91
        IfdInfo(panasonicIfdId, "Makernote", "Panasonic"),
92
        IfdInfo(pentaxIfdId, "Makernote", "Pentax"),
92 93
        IfdInfo(sigmaIfdId, "Makernote", "Sigma"),
93 94
        IfdInfo(sonyIfdId, "Makernote", "Sony"),
94 95
        IfdInfo(lastIfdId, "(Last IFD info)", "(Last IFD item)")
makernote-test.cpp (working copy)
11 11
    testMatch("Canon", "Canon");
12 12
    testMatch("Canon*", "Canon");
13 13
    testMatch("Canon*", "Canon Corp.");
14
    testMatch("PENTAX*", "PENTAX Corporation");
14 15
    testMatch("*foo*bar*", "foobar");
15 16
    testMatch("*foo*bar*", "barfoofoobarbar");
16 17
    testMatch("foo*bar", "foo");
pentaxmn.cpp (revision 0)
1
// ***************************************************************** -*- C++ -*-
2
/*
3
 * Copyright (C) 2007 Michal Cihar <michal@cihar.com>
4
 *
5
 * This program is part of the Exiv2 distribution.
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License
9
 * as published by the Free Software Foundation; either version 2
10
 * of the License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
20
 */
21
/*
22
  File:      pentaxmn.cpp
23
  Version:   $Rev: 1231 $
24
  Author(s): Michal Cihar <michal@cihar.com>
25
  Based on fujimn.cpp by:
26
  			 Andreas Huggel (ahu) <ahuggel@gmx.net>
27
             Gilles Caulier (gc) <caulier.gilles@kdemail.net>
28
  History:   07-09-27 created
29
  Credits:   See header file.
30
 */
31
// *****************************************************************************
32
#include "rcsid.hpp"
33
EXIV2_RCSID("@(#) $Id: pentaxmn.cpp 1231 2007-09-24 14:30:10Z ahuggel $")
34

  
35
// *****************************************************************************
36
// included header files
37
#include "types.hpp"
38
#include "pentaxmn.hpp"
39
#include "makernote.hpp"
40
#include "value.hpp"
41
#include "i18n.h"                // NLS support.
42

  
43
// + standard includes
44
#include <string>
45
#include <sstream>
46
#include <iomanip>
47
#include <cassert>
48
#include <cstring>
49

  
50
// *****************************************************************************
51
// class member definitions
52
namespace Exiv2 {
53

  
54
    //! @cond IGNORE
55
    PentaxMakerNote::RegisterMn::RegisterMn()
56
    {
57
        MakerNoteFactory::registerMakerNote("PENTAX*", "*", createPentaxMakerNote);
58
        MakerNoteFactory::registerMakerNote(
59
            pentaxIfdId, MakerNote::AutoPtr(new PentaxMakerNote));
60

  
61
        ExifTags::registerMakerTagInfo(pentaxIfdId, tagInfo_);
62
    }
63
    //! @endcond
64

  
65
    //! ShootingMode, tag 0x0001
66
    extern const TagDetails pentaxShootingMode[] = {
67
        {   0, N_("Auto")                      },
68
        {   1, N_("Night-Scene")               },
69
        {   2, N_("Manual")                    },
70
    };
71

  
72
    //! CameraModel, tag 0x0005
73
    extern const TagDetails pentaxModel[] = {
74
		{	0x0000d, N_("Optio 330/430") },
75
		{	0x12926, N_("Optio 230") },
76
		{	0x12958, N_("Optio 330GS") },
77
		{	0x12962, N_("Optio 450/550") },
78
		{	0x1296c, N_("Optio S") },
79
		{	0x12994, N_("*ist D") },
80
		{	0x129b2, N_("Optio 33L") },
81
		{	0x129bc, N_("Optio 33LF") },
82
		{	0x129c6, N_("Optio 33WR/43WR/555") },
83
		{	0x129d5, N_("Optio S4") },
84
		{	0x12a02, N_("Optio MX") },
85
		{	0x12a0c, N_("Optio S40") },
86
		{	0x12a16, N_("Optio S4i") },
87
		{	0x12a34, N_("Optio 30") },
88
		{	0x12a52, N_("Optio S30") },
89
		{	0x12a66, N_("Optio 750Z") },
90
		{	0x12a70, N_("Optio SV") },
91
		{	0x12a75, N_("Optio SVi") },
92
		{	0x12a7a, N_("Optio X") },
93
		{	0x12a8e, N_("Optio S5i") },
94
		{	0x12a98, N_("Optio S50") },
95
		{	0x12aa2, N_("*ist DS") },
96
		{	0x12ab6, N_("Optio MX4") },
97
		{	0x12ac0, N_("Optio S5n") },
98
		{	0x12aca, N_("Optio WP") },
99
		{	0x12afc, N_("Optio S55") },
100
		{	0x12b10, N_("Optio S5z") },
101
		{	0x12b1a, N_("*ist DL") },
102
		{	0x12b24, N_("Optio S60") },
103
		{	0x12b2e, N_("Optio S45") },
104
		{	0x12b38, N_("Optio S6") },
105
		{	0x12b4c, N_("Optio WPi") }, 
106
		{	0x12b56, N_("BenQ DC X600") },
107
		{	0x12b60, N_("*ist DS2") },
108
		{	0x12b62, N_("Samsung GX-1S") },
109
		{	0x12b6a, N_("Optio A10") },
110
		{	0x12b7e, N_("*ist DL2") },
111
		{	0x12b80, N_("Samsung GX-1L") },
112
		{	0x12b9c, N_("K100D") },
113
		{	0x12b9d, N_("K110D") },
114
		{	0x12ba2, N_("K100D Super") }, 
115
		{	0x12bb0, N_("Optio T10") },
116
		{	0x12be2, N_("Optio W10") },
117
		{	0x12bf6, N_("Optio M10") },
118
		{	0x12c1e, N_("K10D") },
119
		{	0x12c20, N_("Samsung GX10") },
120
		{	0x12c28, N_("Optio S7") },
121
		{	0x12c32, N_("Optio M20") },
122
		{	0x12c3c, N_("Optio W20") },
123
		{	0x12c46, N_("Optio A20") },
124
		{	0x12c8c, N_("Optio M30") },
125
		{	0x12c78, N_("Optio E30") },
126
		{	0x12c82, N_("Optio T30") },
127
		{	0x12c96, N_("Optio W30") },
128
		{	0x12ca0, N_("Optio A30") },
129
		{	0x12cb4, N_("Optio E40") },
130
		{	0x12cbe, N_("Optio M40") },
131
		{	0x12cdc, N_("Optio S10") },
132
	};
133

  
134
    //! Quality, tag 0x0008
135
    extern const TagDetails pentaxQuality[] = {
136
        {   0, N_("Good") },
137
        {   1, N_("Better") },
138
        {   2, N_("Best") },
139
        {   3, N_("TIFF") },
140
        {   4, N_("RAW") },
141
    };
142

  
143
    //! Size, tag 0x0009
144
    extern const TagDetails pentaxSize[] = {
145
		{	0, N_("640x480") },
146
		{	1, N_("Full") },
147
		{	2, N_("1024x768") },
148
		{	3, N_("1280x960") },
149
		{	4, N_("1600x1200") },
150
		{	5, N_("2048x1536") },
151
		{	8, N_("2560x1920 or 2304x1728") },
152
		{	9, N_("3072x2304") },
153
		{	10, N_("3264x2448") },
154
		{	19, N_("320x240") },
155
		{	20, N_("2288x1712") },
156
		{	21, N_("2592x1944") },
157
		{	22, N_("2304x1728 or 2592x1944") },
158
		{	23, N_("3056x2296") },
159
		{	25, N_("2816x2212 or 2816x2112") },
160
		{	27, N_("3648x2736") },
161
	};
162

  
163
    //! Flash, tag 0x000c
164
    extern const TagDetails pentaxFlash[] = {
165
		{	0x000, N_("Auto, Did not fire") },
166
		{	0x001, N_("Off") },
167
		{	0x003, N_("Auto, Did not fire, Red-eye reduction") },
168
		{	0x100, N_("Auto, Fired") },
169
		{	0x102, N_("On") },
170
		{	0x103, N_("Auto, Fired, Red-eye reduction") },
171
		{	0x104, N_("On, Red-eye reduction") },
172
		{	0x105, N_("On, Wireless") },
173
		{	0x108, N_("On, Soft") },
174
		{	0x109, N_("On, Slow-sync") },
175
		{	0x10a, N_("On, Slow-sync, Red-eye reduction") },
176
		{	0x10b, N_("On, Trailing-curtain Sync") },
177
    };
178

  
179
    //! Focus, tag 0x000d
180
    extern const TagDetails pentaxFocus[] = {
181
		{	0, N_("Normal") },
182
		{	1, N_("Macro") },
183
		{	2, N_("Infinity") },
184
		{	3, N_("Manual") },
185
		{	5, N_("Pan Focus") },
186
		{	16, N_("AF-S") },
187
		{	17, N_("AF-C") },
188
	};
189

  
190
    //! AFPoint, tag 0x000e
191
    extern const TagDetails pentaxAFPoint[] = {
192
		{	0xffff, N_("Auto") },
193
		{	0xfffe, N_("Fixed Center") },
194
		{	1, N_("Upper-left") },
195
		{	2, N_("Top") },
196
		{	3, N_("Upper-right") },
197
		{	4, N_("Left") },
198
		{	5, N_("Mid-left") },
199
		{	6, N_("Center") },
200
		{	7, N_("Mid-right") },
201
		{	8, N_("Right") },
202
		{	9, N_("Lower-left") },
203
		{	10, N_("Bottom") },
204
		{	11, N_("Lower-right") },
205
	};
206

  
207
    //! ISO, tag 0x0014
208
    extern const TagDetails pentaxISO[] = {
209
		{	3, N_("50") },
210
		{	4, N_("64") },
211
		{	5, N_("80") },
212
		{	6, N_("100") },
213
		{	7, N_("125") },
214
		{	8, N_("160") },
215
		{	9, N_("200") },
216
		{	10, N_("250") },
217
		{	11, N_("320") },
218
		{	12, N_("400") },
219
		{	13, N_("500") },
220
		{	14, N_("640") },
221
		{	15, N_("800") },
222
		{	16, N_("1000") },
223
		{	17, N_("1250") },
224
		{	18, N_("1600") },
225
		{	21, N_("3200") },
226
		{	50, N_("50") },
227
		{	100, N_("100") },
228
		{	200, N_("200") },
229
		{	268, N_("200") },
230
		{	400, N_("400") },
231
		{	800, N_("800") },
232
		{	1600, N_("1600") },
233
		{	3200, N_("3200") },
234
	};
235

  
236
    //! Generic for Off/On switches
237
    extern const TagDetails pentaxOffOn[] = {
238
		{	0, N_("Off") },
239
		{	1, N_("On") },
240
	};
241

  
242
    //! Generic for Yes/No switches
243
    extern const TagDetails pentaxYesNo[] = {
244
		{	0, N_("No") },
245
		{	1, N_("Yes") },
246
	};
247

  
248
	//! MeteringMode, tag 0x0017
249
    extern const TagDetails pentaxMeteringMode[] = {
250
		{	0, N_("Multi Segment") },
251
		{	1, N_("Center Weighted") },
252
		{	2, N_("Spot") },
253
	};
254

  
255
	//! WhiteBallance, tag 0x0019
256
    extern const TagDetails pentaxWhiteBallance[] = {
257
		{	0, N_("Auto") },
258
		{	1, N_("Daylight") },
259
		{	2, N_("Shade") },
260
		{	3, N_("Fluorescent") },
261
		{	4, N_("Tungsten") },
262
		{	5, N_("Manual") },
263
		{	6, N_("DaylightFluorescent") },
264
		{	7, N_("DaywhiteFluorescent") },
265
		{	8, N_("WhiteFluorescent") },
266
		{	9, N_("Flash") },
267
		{	10, N_("Cloudy") },
268
		{	65534, N_("Unknown") },
269
		{	65535, N_("User Selected") },
270
	};
271

  
272
	//! WhiteBallance, tag 0x001a
273
    extern const TagDetails pentaxWhiteBallanceMode[] = {
274
		{	1, N_("Auto (Daylight)") },
275
		{	2, N_("Auto (Shade)") },
276
		{	3, N_("Auto (Flash)") },
277
		{	4, N_("Auto (Tungsten)") },
278
		{	7, N_("Auto (DaywhiteFluorescent)") },
279
		{	8, N_("Auto (WhiteFluorescent)") },
280
		{	10, N_("Auto (Cloudy)") },
281
		{	0xffff, N_("User-Selected") },
282
		{	0xfffe, N_("Preset (Fireworks?)") },
283
	};
284

  
285
	//! Saturation, tag 0x001f
286
    extern const TagDetails pentaxSaturation[] = {
287
		{	0, N_("Low") },
288
		{	1, N_("Normal") },
289
		{	2, N_("High") },
290
		{	3, N_("Med Low") },
291
		{	4, N_("Med High") },
292
		{	5, N_("Very Low") },
293
		{	6, N_("Very High") },
294
	};
295

  
296
	//! Contrast, tag 0x0020
297
    extern const TagDetails pentaxContrast[] = {
298
		{	0, N_("Low") },
299
		{	1, N_("Normal") },
300
		{	2, N_("High") },
301
		{	3, N_("Med Low") },
302
		{	4, N_("Med High") },
303
		{	5, N_("Very Low") },
304
		{	6, N_("Very High") },
305
	};
306

  
307
	//! Sharpness, tag 0x0021
308
    extern const TagDetails pentaxSharpness[] = {
309
		{	0, N_("Soft") },
310
		{	1, N_("Normal") },
311
		{	2, N_("Hard") },
312
		{	3, N_("Med Soft") },
313
		{	4, N_("Med Hard") },
314
		{	5, N_("Very Soft") },
315
		{	6, N_("Very Hard") },
316
	};
317

  
318
	//! Location, tag 0x0022
319
    extern const TagDetails pentaxLocation[] = {
320
		{	0, N_("Home town") },
321
		{	1, N_("Destination") },
322
	};
323

  
324
	//! City names, tags 0x0023 and 0x0024
325
    extern const TagDetails pentaxCities[] = {
326
		{	0, N_("Pago Pago") },
327
		{	1, N_("Honolulu") },
328
		{	2, N_("Anchorage") },
329
		{	3, N_("Vancouver") },
330
		{	4, N_("San Fransisco") },
331
		{	5, N_("Los Angeles") },
332
		{	6, N_("Calgary") },
333
		{	7, N_("Denver") },
334
		{	8, N_("Mexico City") },
335
		{	9, N_("Chicago") },
336
		{	10, N_("Miami") },
337
		{	11, N_("Toronto") },
338
		{	12, N_("New York") },
339
		{	13, N_("Santiago") },
340
		{	14, N_("Caracus") },
341
		{	15, N_("Halifax") },
342
		{	16, N_("Buenos Aires") },
343
		{	17, N_("Sao Paulo") },
344
		{	18, N_("Rio de Janeiro") },
345
		{	19, N_("Madrid") },
346
		{	20, N_("London") },
347
		{	21, N_("Paris") },
348
		{	22, N_("Milan") },
349
		{	23, N_("Rome") },
350
		{	24, N_("Berlin") },
351
		{	25, N_("Johannesburg") },
352
		{	26, N_("Istanbul") },
353
		{	27, N_("Cairo") },
354
		{	28, N_("Jerusalem") },
355
		{	29, N_("Moscow") },
356
		{	30, N_("Jeddah") },
357
		{	31, N_("Tehran") },
358
		{	32, N_("Dubai") },
359
		{	33, N_("Karachi") },
360
		{	34, N_("Kabul") },
361
		{	35, N_("Male") },
362
		{	36, N_("Delhi") },
363
		{	37, N_("Colombo") },
364
		{	38, N_("Kathmandu") },
365
		{	39, N_("Dacca") },
366
		{	40, N_("Yangon") },
367
		{	41, N_("Bangkok") },
368
		{	42, N_("Kuala Lumpur") },
369
		{	43, N_("Vientiane") },
370
		{	44, N_("Singapore") },
371
		{	45, N_("Phnom Penh") },
372
		{	46, N_("Ho Chi Minh") },
373
		{	47, N_("Jakarta") },
374
		{	48, N_("Hong Kong") },
375
		{	49, N_("Perth") },
376
		{	50, N_("Beijing") },
377
		{	51, N_("Shanghai") },
378
		{	52, N_("Manila") },
379
		{	53, N_("Taipei") },
380
		{	54, N_("Seoul") },
381
		{	55, N_("Adelaide") },
382
		{	56, N_("Tokyo") },
383
		{	57, N_("Guam") },
384
		{	58, N_("Sydney") },
385
		{	59, N_("Noumea") },
386
		{	60, N_("Wellington") },
387
		{	61, N_("Auckland") },
388
		{	62, N_("Lima") },
389
		{	63, N_("Dakar") },
390
		{	64, N_("Algiers") },
391
		{	65, N_("Helsinki") },
392
		{	66, N_("Athens") },
393
		{	67, N_("Nairobi") },
394
		{	68, N_("Amsterdam") },
395
		{	69, N_("Stockholm") },
396
		{	70, N_("Lisbon") },
397
	};
398

  
399
    //! ColorSpace, tag 0x0037
400
    extern const TagDetails pentaxColorSpace[] = {
401
		{	0, N_("sRGB") },
402
		{	1, N_("Adobe RGB") },
403
	};
404

  
405
    //! ImageTone, tag 0x004f
406
    extern const TagDetails pentaxImageTone[] = {
407
		{	0, N_("Natural") },
408
		{	1, N_("Bright") },
409
	};
410

  
411
    std::ostream& PentaxMakerNote::printPentaxVersion(std::ostream& os, const Value& value)
412
    {
413
        std::string val = value.toString();
414
		size_t i;
415
		while ((i = val.find(' ')) != std::string::npos && i != val.length() - 1) {
416
			val.replace(i, 1, ".");
417
		}
418
		os << val;
419
        return os;
420
    }
421

  
422
    std::ostream& PentaxMakerNote::printPentaxResolution(std::ostream& os, const Value& value)
423
    {
424
        std::string val = value.toString();
425
		size_t i;
426
		while ((i = val.find(' ')) != std::string::npos && i != val.length() - 1) {
427
			val.replace(i, 1, "x");
428
		}
429
		os << val;
430
        return os;
431
    }
432

  
433
    std::ostream& PentaxMakerNote::printPentaxDate(std::ostream& os, const Value& value)
434
    {
435
		/* I choose same format as is used inside EXIF itself */
436
		os << ((value.toLong(0) << 8) + value.toLong(1));
437
		os << ":";
438
		os << std::setw(2) << std::setfill('0') << value.toLong(2);
439
		os << ":";
440
		os << std::setw(2) << std::setfill('0') << value.toLong(3);
441
        return os;
442
    }
443

  
444
    std::ostream& PentaxMakerNote::printPentaxTime(std::ostream& os, const Value& value)
445
    {
446
		os << std::setw(2) << std::setfill('0') << value.toLong(0);
447
		os << ":";
448
		os << std::setw(2) << std::setfill('0') << value.toLong(1);
449
		os << ":";
450
		os << std::setw(2) << std::setfill('0') << value.toLong(2);
451
        return os;
452
    }
453

  
454
    std::ostream& PentaxMakerNote::printPentaxExposure(std::ostream& os, const Value& value)
455
    {
456
		os << static_cast<float>(value.toLong()) / 100 << " ms";
457
        return os;
458
    }
459

  
460
    std::ostream& PentaxMakerNote::printPentaxFValue(std::ostream& os, const Value& value)
461
    {
462
		os << "F" << std::setprecision(2)
463
		   << static_cast<float>(value.toLong()) / 10;
464
        return os;
465
    }
466

  
467
    std::ostream& PentaxMakerNote::printPentaxFocalLength(std::ostream& os, const Value& value)
468
    {
469
		os << std::fixed << std::setprecision(1)
470
		   << static_cast<float>(value.toLong()) / 100
471
		   << " mm";
472
        return os;
473
    }
474

  
475
    std::ostream& PentaxMakerNote::printPentaxCompensation(std::ostream& os, const Value& value)
476
    {
477
		os << std::setprecision(2)
478
		   << (static_cast<float>(value.toLong()) - 50) / 10 
479
		   << " EV";
480
        return os;
481
    }
482

  
483
    std::ostream& PentaxMakerNote::printPentaxTemperature(std::ostream& os, const Value& value)
484
    {
485
		os << value.toLong() << " C";
486
        return os;
487
    }
488

  
489
    std::ostream& PentaxMakerNote::printPentaxFlashCompensation(std::ostream& os, const Value& value)
490
    {
491
		os << std::setprecision(2)
492
		   << static_cast<float>(value.toLong()) / 256
493
		   << " EV";
494
        return os;
495
    }
496

  
497
    std::ostream& PentaxMakerNote::printPentaxBracketing(std::ostream& os, const Value& value)
498
	{
499
		long l0 = value.toLong(0);
500

  
501
		if (l0 < 10) {
502
			os << std::setprecision(2)
503
			   << static_cast<float>(l0) / 3
504
			   << " EV";
505
		} else {
506
			os << std::setprecision(2)
507
			   << static_cast<float>(l0) - 9.5
508
			   << " EV";
509
		}
510

  
511
		if (value.size() == 2) {
512
			long l1 = value.toLong(1);
513
			long type;
514
			long range;
515
			os << " (";
516
			if (l1 == 0) {
517
				os << _("No extended bracketing");
518
			} else {
519
				type = l1 >> 8;
520
				range = l1 & 0xff;
521
				switch (type) {
522
					case 1:
523
						os << _("WB-BA");
524
						break;
525
					case 2:
526
						os << _("WB-GM");
527
						break;
528
					case 3:
529
						os << _("Saturation");
530
						break;
531
					case 4:
532
						os << _("Sharpness");
533
						break;
534
					case 5:
535
						os << _("Contrast");
536
						break;
537
					default:
538
						os << _("Unknown ") << type;
539
						break;
540
				}
541
				os << " " << range;
542
			}
543
			os << ")";
544
		}
545
		return os;
546
	}
547

  
548
    std::ostream& PentaxMakerNote::printPentaxImageProcessing(std::ostream& os, const Value& value)
549
	{
550
		long l0 = value.toLong(0);
551
		long l1 = value.toLong(1);
552
		long l2 = value.toLong(2);
553
		long l3 = value.toLong(3);
554

  
555
		if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 0) {
556
			os << _("Unprocessed");
557
		} else if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 4) {
558
			os << _("Digital Filter");
559
		} else if (l0 == 2 && l1 == 0 && l2 == 0 && l3 == 0) {
560
			os << _("Cropped");
561
		} else if (l0 == 4 && l1 == 0 && l2 == 0 && l3 == 0) {
562
			os << _("Color Filter");
563
		} else if (l0 == 16 && l1 == 0 && l2 == 0 && l3 == 0) {
564
			os << _("Frame Synthesis?");
565
		} else {
566
			os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << " " << l3 << ")";
567
		}
568

  
569
        return os;
570
	}
571

  
572
    std::ostream& PentaxMakerNote::printPentaxPictureMode(std::ostream& os, const Value& value)
573
	{
574
		long l0 = value.toLong(0);
575
		long l1 = value.toLong(1);
576
		long l2 = value.toLong(2);
577

  
578
		if (l0 == 0 && l1 == 0 && l2 == 0) {
579
			os << _("Program");
580
		} else if (l0 == 0 && l1 == 4 && l2 == 0) {
581
			os << _("Standard");
582
		} else if (l0 == 0 && l1 == 5 && l2 == 0) {
583
			os << _("Portrait");
584
		} else if (l0 == 0 && l1 == 6 && l2 == 0) {
585
			os << _("Landscape");
586
		} else if (l0 == 0 && l1 == 7 && l2 == 0) {
587
			os << _("Macro");
588
		} else if (l0 == 0 && l1 == 8 && l2 == 0) {
589
			os << _("Sport");
590
		} else if (l0 == 0 && l1 == 9 && l2 == 0) {
591
			os << _("Night Scene Portrait");
592
		} else if (l0 == 0 && l1 == 10 && l2 == 0) {
593
			os << _("No Flash");
594
		/* SCN modes (menu-selected) */
595
		} else if (l0 == 0 && l1 == 11 && l2 == 0) {
596
			os << _("Night Scene");
597
		} else if (l0 == 0 && l1 == 12 && l2 == 0) {
598
			os << _("Surf & Snow");
599
		} else if (l0 == 0 && l1 == 13 && l2 == 0) {
600
			os << _("Text");
601
		} else if (l0 == 0 && l1 == 14 && l2 == 0) {
602
			os << _("Sunset");
603
		} else if (l0 == 0 && l1 == 15 && l2 == 0) {
604
			os << _("Kids");
605
		} else if (l0 == 0 && l1 == 16 && l2 == 0) {
606
			os << _("Pet");
607
		} else if (l0 == 0 && l1 == 17 && l2 == 0) {
608
			os << _("Candlelight");
609
		} else if (l0 == 0 && l1 == 18 && l2 == 0) {
610
			os << _("Museum");
611
		/* AUTO PICT modes (auto-selected) */
612
		} else if (l0 == 1 && l1 == 4 && l2 == 0) {
613
			os << _("Auto PICT (Standard)");
614
		} else if (l0 == 1 && l1 == 5 && l2 == 0) {
615
			os << _("Auto PICT (Portrait)");
616
		} else if (l0 == 1 && l1 == 6 && l2 == 0) {
617
			os << _("Auto PICT (Landscape)");
618
		} else if (l0 == 1 && l1 == 7 && l2 == 0) {
619
			os << _("Auto PICT (Macro)");
620
		} else if (l0 == 1 && l1 == 8 && l2 == 0) {
621
			os << _("Auto PICT (Sport)");
622
		/* Manual dial modes */
623
		} else if (l0 == 2 && l1 == 0 && l2 == 0) {
624
			os << _("Program AE");
625
		} else if (l0 == 3 && l1 == 0 && l2 == 0) {
626
			os << _("Green Mode");
627
		} else if (l0 == 4 && l1 == 0 && l2 == 0) {
628
			os << _("Shutter Speed Priority");
629
		} else if (l0 == 5 && l1 == 0 && l2 == 0) {
630
			os << _("Aperture Priority");
631
		} else if (l0 == 8 && l1 == 0 && l2 == 0) {
632
			os << _("Manual");
633
		} else if (l0 == 9 && l1 == 0 && l2 == 0) {
634
			os << _("Bulb");
635
       	/* *istD modes */
636
		} else if (l0 == 2 && l1 == 0 && l2 == 1) {
637
			os << _("Program AE");
638
		} else if (l0 == 2 && l1 == 1 && l2 == 1) {
639
			os << _("Hi-speed Program");
640
		} else if (l0 == 2 && l1 == 2 && l2 == 1) {
641
			os << _("DOF Program");
642
		} else if (l0 == 2 && l1 == 3 && l2 == 1) {
643
			os << _("MTF Program");
644
		} else if (l0 == 3 && l1 == 0 && l2 == 1) {
645
			os << _("Green Mode");
646
		} else if (l0 == 4 && l1 == 0 && l2 == 1) {
647
			os << _("Shutter Speed Priority");
648
		} else if (l0 == 5 && l1 == 0 && l2 == 1) {
649
			os << _("Aperture Priority");
650
		} else if (l0 == 6 && l1 == 0 && l2 == 1) {
651
			os << _("Program Tv Shift");
652
		} else if (l0 == 7 && l1 == 0 && l2 == 1) {
653
			os << _("Program Av Shift");
654
		} else if (l0 == 8 && l1 == 0 && l2 == 1) {
655
			os << _("Manual");
656
		} else if (l0 == 9 && l1 == 0 && l2 == 1) {
657
			os << _("Bulb");
658
		} else if (l0 == 10 && l1 == 0 && l2 == 1) {
659
			os << _("Aperture Priority (Off-Auto-Aperture)");
660
		} else if (l0 == 11 && l1 == 0 && l2 == 1) {
661
			os << _("Manual (Off-Auto-Aperture)");
662
		} else if (l0 == 12 && l1 == 0 && l2 == 1) {
663
			os << _("Bulb (Off-Auto-Aperture)");
664
		/* K10D modes */
665
		} else if (l0 == 6 && l1 == 0 && l2 == 0) {
666
			os << _("Shutter Priority");
667
		} else if (l0 == 13 && l1 == 0 && l2 == 0) {
668
			os << _("Shutter & Aperture Priority AE");
669
		} else if (l0 == 13 && l1 == 0 && l2 == 1) {
670
			os << _("Shutter & Aperture Priority AE (1)");
671
		} else if (l0 == 15 && l1 == 0 && l2 == 0) {
672
			os << _("Sensitivity Priority AE");
673
		} else if (l0 == 15 && l1 == 0 && l2 == 1) {
674
			os << _("Sensitivity Priority AE (1)");
675
		} else if (l0 == 16 && l1 == 0 && l2 == 0) {
676
			os << _("Flash X-Sync Speed AE");
677
		} else if (l0 == 16 && l1 == 0 && l2 == 1) {
678
			os << _("Flash X-Sync Speed AE (1)");
679
		/* other modes */
680
		} else if (l0 == 0 && l1 == 0 && l2 == 1) {
681
			os << _("Program");
682
		} else {
683
			os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << ")";
684
		}
685

  
686
        return os;
687
	}
688

  
689
    std::ostream& PentaxMakerNote::printPentaxDriveMode(std::ostream& os, const Value& value)
690
    {
691
		long l0 = value.toLong(0);
692
		long l1 = value.toLong(1);
693
		long l2 = value.toLong(2);
694
		long l3 = value.toLong(3);
695

  
696
		if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 0) {
697
			os << _("Single-frame");
698
		} else if (l0 == 1 && l1 == 0 && l2 == 0 && l3 == 0) {
699
			os << _("Continuous");
700
		} else if (l0 == 0 && l1 == 1 && l2 == 0 && l3 == 0) {
701
			os << _("Self-timer (12 sec)");
702
		} else if (l0 == 0 && l1 == 2 && l2 == 0 && l3 == 0) {
703
			os << _("Self-timer (2 sec)");
704
		} else if (l0 == 0 && l1 == 0 && l2 == 1 && l3 == 0) {
705
			os << _("Remote Control?");
706
		} else if (l0 == 0 && l1 == 0 && l2 == 0 && l3 == 1) {
707
			os << _("Multiple Exposure");
708
		} else {
709
			os << _("Unknown") << " (" << l0 << " " << l1 << " " << l2 << " " << l3 << ")";
710
		}
711

  
712
        return os;
713
    }
714

  
715
    std::ostream& PentaxMakerNote::printPentaxLensType(std::ostream& os, const Value& value)
716
    {
717
		long l0 = value.toLong(0);
718
		long l1 = value.toLong(1);
719

  
720
		switch(l0) {
721
			case 0:
722
				switch (l1) {
723
					case 0:
724
						os << "M-42 or No Lens";
725
						break;
726
					default:
727
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
728
						break;
729
				}
730
			case 1:
731
				switch (l1) {
732
					case 0:
733
						os << "K,M Lens";
734
						break;
735
					default:
736
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
737
						break;
738
				}
739
			case 2:
740
				switch (l1) {
741
					case 0:
742
						os << "A Series Lens";
743
						break;
744
					default:
745
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
746
						break;
747
				}
748
			case 3:
749
				switch (l1) {
750
					case 0:
751
						os << "SIGMA";
752
						break;
753
					case 17:
754
						os << "smc PENTAX-FA SOFT 85mm F2.8";
755
						break;
756
					case 18:
757
						os << "smc PENTAX-F 1.7X AF ADAPTER";
758
						break;
759
					case 19:
760
						os << "smc PENTAX-F 24-50mm F4";
761
						break;
762
					case 20:
763
						os << "smc PENTAX-F 35-80mm F4-5.6";
764
						break;
765
					case 21:
766
						os << "smc PENTAX-F 80-200mm F4.7-5.6";
767
						break;
768
					case 22:
769
						os << "smc PENTAX-F FISH-EYE 17-28mm F3.5-4.5";
770
						break;
771
					case 23:
772
						os << "smc PENTAX-F 100-300mm F4.5-5.6";
773
						break;
774
					case 24:
775
						os << "smc PENTAX-F 35-135mm F3.5-4.5";
776
						break;
777
					case 25:
778
						os << "smc PENTAX-F 35-105mm F4-5.6 or SIGMA or Tokina";
779
						break;
780
					case 26:
781
						os << "smc PENTAX-F* 250-600mm F5.6 ED[IF]";
782
						break;
783
					case 27:
784
						os << "smc PENTAX-F 28-80mm F3.5-4.5";
785
						break;
786
					case 28:
787
						os << "smc PENTAX-F 35-70mm F3.5-4.5";
788
						break;
789
					case 29:
790
						os << "PENTAX-F 28-80mm F3.5-4.5 or SIGMA AF 18-125mm F3.5-5.6 DC";
791
						break;
792
					case 30:
793
						os << "PENTAX-F 70-200mm F4-5.6";
794
						break;
795
					case 31:
796
						os << "smc PENTAX-F 70-210mm F4-5.6";
797
						break;
798
					case 32:
799
						os << "smc PENTAX-F 50mm F1.4";
800
						break;
801
					case 33:
802
						os << "smc PENTAX-F 50mm F1.7";
803
						break;
804
					case 34:
805
						os << "smc PENTAX-F 135mm F2.8 [IF]";
806
						break;
807
					case 35:
808
						os << "smc PENTAX-F 28mm F2.8";
809
						break;
810
					case 36:
811
						os << "SIGMA 20mm F1.8 EX DG ASPHERICAL RF";
812
						break;
813
					case 38:
814
						os << "smc PENTAX-F* 300mm F4.5 ED[IF]";
815
						break;
816
					case 39:
817
						os << "smc PENTAX-F* 600mm F4 ED[IF]";
818
						break;
819
					case 40:
820
						os << "smc PENTAX-F MACRO 100mm F2.8";
821
						break;
822
					case 41:
823
						os << "smc PENTAX-F MACRO 50mm F2.8 or Sigma 50mm F2,8 MACRO";
824
						break;
825
					case 44:
826
						os << "Tamron 35-90mm F4 AF or various SIGMA models";
827
						break;
828
					case 46:
829
						os << "SIGMA APO 70-200mm F2.8 EX";
830
						break;
831
					case 50:
832
						os << "smc PENTAX-FA 28-70mm F4 AL";
833
						break;
834
					case 51:
835
						os << "SIGMA 28mm F1.8 EX DG ASPHERICAL MACRO";
836
						break;
837
					case 52:
838
						os << "smc PENTAX-FA 28-200mm F3.8-5.6 AL[IF]";
839
						break;
840
					case 53:
841
						os << "smc PENTAX-FA 28-80mm F3.5-5.6 AL";
842
						break;
843
					case 247:
844
						os << "smc PENTAX-DA FISH-EYE 10-17mm F3.5-4.5 ED[IF]";
845
						break;
846
					case 248:
847
						os << "smc PENTAX-DA 12-24mm F4 ED AL[IF]";
848
						break;
849
					case 250:
850
						os << "smc PENTAX-DA 50-200mm F4-5.6 ED";
851
						break;
852
					case 251:
853
						os << "smc PENTAX-DA 40mm F2.8 Limited";
854
						break;
855
					case 252:
856
						os << "smc PENTAX-DA 18-55mm F3.5-5.6 AL";
857
						break;
858
					case 253:
859
						os << "smc PENTAX-DA 14mm F2.8 ED[IF]";
860
						break;
861
					case 254:
862
						os << "smc PENTAX-DA 16-45mm F4 ED AL";
863
						break;
864
					case 255:
865
						os << "SIGMA";
866
						break;
867
					default:
868
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
869
						break;
870
				}
871
				break;
872
			case 4:
873
				switch (l1) {
874
					case 1:
875
						os << "smc PENTAX-FA SOFT 28mm F2.8";
876
						break;
877
					case 2:
878
						os << "smc PENTAX-FA 80-320mm F4.5-5.6";
879
						break;
880
					case 3:
881
						os << "smc PENTAX-FA 43mm F1.9 Limited";
882
						break;
883
					case 6:
884
						os << "smc PENTAX-FA 35-80mm F4-5.6";
885
						break;
886
					case 12:
887
						os << "smc PENTAX-FA 50mm F1.4";
888
						break;
889
					case 15:
890
						os << "smc PENTAX-FA 28-105mm F4-5.6 [IF]";
891
						break;
892
					case 16:
893
						os << "TAMRON AF 80-210mm F4-5.6 (178D)";
894
						break;
895
					case 19:
896
						os << "TAMRON SP AF 90mm F2.8 (172E)";
897
						break;
898
					case 20:
899
						os << "smc PENTAX-FA 28-80mm F3.5-5.6";
900
						break;
901
					case 22:
902
						os << "TOKINA 28-80mm F3.5-5.6";
903
						break;
904
					case 23:
905
						os << "smc PENTAX-FA 20-35mm F4 AL";
906
						break;
907
					case 24:
908
						os << "smc PENTAX-FA 77mm F1.8 Limited";
909
						break;
910
					case 25:
911
						os << "TAMRON SP AF 14mm F2.8";
912
						break;
913
					case 26:
914
						os << "smc PENTAX-FA MACRO 100mm F3.5";
915
						break;
916
					case 27:
917
						os << "TAMRON AF28-300mm F/3.5-6.3 LD Aspherical[IF] MACRO (285D)";
918
						break;
919
					case 28:
920
						os << "smc PENTAX-FA 35mm F2 AL";
921
						break;
922
					case 29:
923
						os << "TAMRON AF 28-200mm F/3.8-5.6 LD Super II MACRO (371D)";
924
						break;
925
					case 34:
926
						os << "smc PENTAX-FA 24-90mm F3.5-4.5 AL[IF]";
927
						break;
928
					case 35:
929
						os << "smc PENTAX-FA 100-300mm F4.7-5.8";
930
						break;
931
					case 36:
932
						os << "TAMRON AF70-300mm F/4-5.6 LD MACRO";
933
						break;
934
					case 37:
935
						os << "TAMRON SP AF 24-135mm F3.5-5.6 AD AL (190D)";
936
						break;
937
					case 38:
938
						os << "smc PENTAX-FA 28-105mm F3.2-4.5 AL[IF]";
939
						break;
940
					case 39:
941
						os << "smc PENTAX-FA 31mm F1.8AL Limited";
942
						break;
943
					case 41:
944
						os << "TAMRON AF 28-200mm Super Zoom F3.8-5.6 Aspherical XR [IF] MACRO (A03)";
945
						break;
946
					case 43:
947
						os << "smc PENTAX-FA 28-90mm F3.5-5.6";
948
						break;
949
					case 44:
950
						os << "smc PENTAX-FA J 75-300mm F4.5-5.8 AL";
951
						break;
952
					case 45:
953
						os << "TAMRON 28-300mm F3.5-6.3 Ultra zoom XR";
954
						break;
955
					case 46:
956
						os << "smc PENTAX-FA J 28-80mm F3.5-5.6 AL";
957
						break;
958
					case 47:
959
						os << "smc PENTAX-FA J 18-35mm F4-5.6 AL";
960
						break;
961
					case 49:
962
						os << "TAMRON SP AF 28-75mm F2.8 XR Di (A09)";
963
						break;
964
					case 51:
965
						os << "smc PENTAX-D FA 50mm F2.8 MACRO";
966
						break;
967
					case 52:
968
						os << "smc PENTAX-D FA 100mm F2.8 MACRO";
969
						break;
970
					case 244:
971
						os << "smc PENTAX-DA 21mm F3.2 AL Limited";
972
						break;
973
					case 245:
974
						os << "Schneider D-XENON 50-200mm";
975
						break;
976
					case 246:
977
						os << "Schneider D-XENON 18-55mm";
978
						break;
979
					case 247:
980
						os << "smc PENTAX-DA 10-17mm F3.5-4.5 ED [IF] Fisheye zoom";
981
						break;
982
					case 248:
983
						os << "smc PENTAX-DA 12-24mm F4 ED AL [IF]";
984
						break;
985
					case 249:
986
						os << "TAMRON XR DiII 18-200mm F3.5-6.3 (A14)";
987
						break;
988
					case 250:
989
						os << "smc PENTAX-DA 50-200mm F4-5.6 ED";
990
						break;
991
					case 251:
992
						os << "smc PENTAX-DA 40mm F2.8 Limited";
993
						break;
994
					case 252:
995
						os << "smc PENTAX-DA 18-55mm F3.5-5.6 AL";
996
						break;
997
					case 253:
998
						os << "smc PENTAX-DA 14mm F2.8 ED[IF]";
999
						break;
1000
					case 254:
1001
						os << "smc PENTAX-DA 16-45mm F4 ED AL";
1002
						break;
1003
					default:
1004
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1005
						break;
1006
				}
1007
				break;
1008
			case 5:
1009
				switch (l1) {
1010
					case 1:
1011
						os << "smc PENTAX-FA* 24mm F2 AL[IF]";
1012
						break;
1013
					case 2:
1014
						os << "smc PENTAX-FA 28mm F2.8 AL";
1015
						break;
1016
					case 3:
1017
						os << "smc PENTAX-FA 50mm F1.7";
1018
						break;
1019
					case 4:
1020
						os << "smc PENTAX-FA 50mm F1.4";
1021
						break;
1022
					case 5:
1023
						os << "smc PENTAX-FA* 600mm F4 ED[IF]";
1024
						break;
1025
					case 6:
1026
						os << "smc PENTAX-FA* 300mm F4.5 ED[IF]";
1027
						break;
1028
					case 7:
1029
						os << "smc PENTAX-FA 135mm F2.8 [IF]";
1030
						break;
1031
					case 8:
1032
						os << "smc PENTAX-FA MACRO 50mm F2.8";
1033
						break;
1034
					case 9:
1035
						os << "smc PENTAX-FA MACRO 100mm F2.8";
1036
						break;
1037
					case 10:
1038
						os << "smc PENTAX-FA* 85mm F1.4 [IF]";
1039
						break;
1040
					case 11:
1041
						os << "smc PENTAX-FA* 200mm F2.8 ED[IF]";
1042
						break;
1043
					case 12:
1044
						os << "smc PENTAX-FA 28-80mm F3.5-4.7";
1045
						break;
1046
					case 13:
1047
						os << "smc PENTAX-FA 70-200mm F4-5.6";
1048
						break;
1049
					case 14:
1050
						os << "smc PENTAX-FA* 250-600mm F5.6 ED[IF]";
1051
						break;
1052
					case 15:
1053
						os << "smc PENTAX-FA 28-105mm F4-5.6";
1054
						break;
1055
					case 16:
1056
						os << "smc PENTAX-FA 100-300mm F4.5-5.6";
1057
						break;
1058
					default:
1059
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1060
						break;
1061
				}
1062
				break;
1063
			case 6:
1064
				switch (l1) {
1065
					case 1:
1066
						os << "smc PENTAX-FA* 85mm F1.4[IF]";
1067
						break;
1068
					case 2:
1069
						os << "smc PENTAX-FA* 200mm F2.8 ED[IF]";
1070
						break;
1071
					case 3:
1072
						os << "smc PENTAX-FA* 300mm F2.8 ED[IF]";
1073
						break;
1074
					case 4:
1075
						os << "smc PENTAX-FA* 28-70mm F2.8 AL";
1076
						break;
1077
					case 5:
1078
						os << "smc PENTAX-FA* 80-200mm F2.8 ED[IF]";
1079
						break;
1080
					case 6:
1081
						os << "smc PENTAX-FA* 28-70mm F2.8 AL";
1082
						break;
1083
					case 7:
1084
						os << "smc PENTAX-FA* 80-200mm F2.8 ED[IF]";
1085
						break;
1086
					case 8:
1087
						os << "smc PENTAX-FA 28-70mm F4AL";
1088
						break;
1089
					case 9:
1090
						os << "smc PENTAX-FA 20mm F2.8";
1091
						break;
1092
					case 10:
1093
						os << "smc PENTAX-FA* 400mm F5.6 ED[IF]";
1094
						break;
1095
					case 13:
1096
						os << "smc PENTAX-FA* 400mm F5.6 ED[IF]";
1097
						break;
1098
					case 14:
1099
						os << "smc PENTAX-FA* MACRO 200mm F4 ED[IF]";
1100
						break;
1101
					default:
1102
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1103
						break;
1104
				}
1105
				break;
1106
			case 7:
1107
				switch (l1) {
1108
					case 0:
1109
						os << "smc PENTAX-DA 21mm F3.2 AL Limited";
1110
						break;
1111
					case 238:
1112
						os << "TAMRON AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] MACRO";
1113
						break;
1114
					case 243:
1115
						os << "smc PENTAX-DA 70mm F2.4 Limited";
1116
						break;
1117
					case 244:
1118
						os << "smc PENTAX-DA 21mm F3.2 AL Limited";
1119
						break;
1120
					default:
1121
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1122
						break;
1123
				}
1124
				break;
1125
			case 8:
1126
				switch (l1) {
1127
					case 241:
1128
						os << "smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM";
1129
						break;
1130
					case 242:
1131
						os << "smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM";
1132
						break;
1133
					default:
1134
						os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1135
						break;
1136
				}
1137
				break;
1138
			default:
1139
				os << _("Unknown") << " (" << l0 << " " << l1 << ")";
1140
				break;
1141
		}
1142
        return os;
1143
    }
1144

  
1145
    // Pentax MakerNote Tag Info
1146
    const TagInfo PentaxMakerNote::tagInfo_[] = {
1147
        TagInfo(0x0000, "Version", N_("Version"),
1148
                N_("Pentax Makernote version"),
1149
                pentaxIfdId, makerTags, undefined, printPentaxVersion),
1150
        TagInfo(0x0001, "Mode", N_("Shooting mode"),
1151
                N_("Camera shooting mode"),
1152
                pentaxIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(pentaxShootingMode)),
1153
        TagInfo(0x0002, "PreviewResolution", N_("Resolution of a preview image"),
1154
                N_("Resolution of a preview image"),
1155
                pentaxIfdId, makerTags, undefined, printPentaxResolution),
1156
        TagInfo(0x0003, "PreviewLength", N_("Length of a preview image"),
1157
                N_("Size of an IFD containing a preview image"),
1158
                pentaxIfdId, makerTags, undefined, printValue),
1159
        TagInfo(0x0004, "PreviewOffset", N_("Pointer to a preview image"),
1160
                N_("Offset to an IFD containing a preview image"),
1161
                pentaxIfdId, makerTags, undefined, printValue),
1162
        TagInfo(0x0005, "ModelID", N_("Model identification"),
1163
                N_("Pentax model idenfication"),
1164
                pentaxIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(pentaxModel)),
1165
        TagInfo(0x0006, "Date", N_("Date"),
1166
                N_("Date"),
1167
                pentaxIfdId, makerTags, undefined, printPentaxDate),
1168
        TagInfo(0x0007, "Time", N_("Time"),
1169
                N_("Time"),
1170
                pentaxIfdId, makerTags, undefined, printPentaxTime),
1171
        TagInfo(0x0008, "Quality", N_("Image quality"),
1172
                N_("Image quality settings"),
1173
                pentaxIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(pentaxQuality)),
1174
        TagInfo(0x0009, "Size", N_("Image size"),
1175
                N_("Image size settings"),
1176
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxSize)),
1177
		/* Some missing ! */
1178
        TagInfo(0x000c, "Flash", N_("Flash mode"),
1179
                N_("Flash mode settings"),
1180
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxFlash)),
1181
        TagInfo(0x000d, "Focus", N_("Focus mode"),
1182
                N_("Focus mode settings"),
1183
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxFocus)),
1184
        TagInfo(0x000e, "AFPoint", N_("AF point"),
1185
                N_("Selected AF point"),
1186
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxAFPoint)),
1187
		/* Some missing ! */
1188
        TagInfo(0x0012, "ExposureTime", N_("Exposure time"),
1189
                N_("Exposure time"),
1190
                pentaxIfdId, makerTags, unsignedLong, printPentaxExposure),
1191
        TagInfo(0x0013, "FNumber", N_("F-Number"),
1192
                N_("F-Number"),
1193
                pentaxIfdId, makerTags, unsignedLong, printPentaxFValue),
1194
        TagInfo(0x0014, "ISO", N_("ISO sensitivity"),
1195
                N_("ISO sensitivity settings"),
1196
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxISO)),
1197
		/* Some missing ! */
1198
        TagInfo(0x0016, "ExposureCompensation", N_("Exposure compensation"),
1199
                N_("Exposure compensation"),
1200
                pentaxIfdId, makerTags, unsignedLong, printPentaxCompensation),
1201

  
1202
		/* Some missing ! */
1203
        TagInfo(0x0017, "MeteringMode", N_("MeteringMode"),
1204
                N_("MeteringMode"),
1205
                pentaxIfdId, makerTags, undefined, EXV_PRINT_TAG(pentaxMeteringMode)),
1206
        TagInfo(0x0018, "AutoBracketing", N_("AutoBracketing"),
1207
                N_("AutoBracketing"),
1208
                pentaxIfdId, makerTags, undefined, printPentaxBracketing),
1209
        TagInfo(0x0019, "WhiteBallance", N_("White ballance"),
... This diff was truncated because it exceeds the maximum size that can be displayed.
    (1-1/1)