|
1 |
// ***************************************************************** -*- C++ -*-
|
|
2 |
/*
|
|
3 |
* Copyright (C) 2004-2013 Andreas Huggel <ahuggel@gmx.net>
|
|
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: Casiomn.cpp
|
|
23 |
Version: $Rev: 3091 $
|
|
24 |
History: 30-Oct-13, ahu: created
|
|
25 |
Credits: See header file
|
|
26 |
*/
|
|
27 |
// *****************************************************************************
|
|
28 |
#include "rcsid_int.hpp"
|
|
29 |
EXIV2_RCSID("@(#) $Id: Casiomn.cpp 3091 2013-07-24 05:15:04Z robinwmills $")
|
|
30 |
|
|
31 |
// *****************************************************************************
|
|
32 |
// included header files
|
|
33 |
#include "types.hpp"
|
|
34 |
#include "Casiomn_int.hpp"
|
|
35 |
#include "tags_int.hpp"
|
|
36 |
#include "value.hpp"
|
|
37 |
#include "i18n.h" // NLS support.
|
|
38 |
|
|
39 |
// + standard includes
|
|
40 |
#include <string>
|
|
41 |
#include <sstream>
|
|
42 |
#include <iomanip>
|
|
43 |
#include <cassert>
|
|
44 |
#include <cstring>
|
|
45 |
#include <vector>
|
|
46 |
|
|
47 |
// *****************************************************************************
|
|
48 |
// class member definitions
|
|
49 |
namespace Exiv2 {
|
|
50 |
namespace Internal {
|
|
51 |
|
|
52 |
//! RecordingMode, tag 0x0001
|
|
53 |
extern const TagDetails casioRecordingMode[] = {
|
|
54 |
{ 1, N_("Single Shutter") },
|
|
55 |
{ 2, N_("Panorama") },
|
|
56 |
{ 3, N_("Night Scene") },
|
|
57 |
{ 4, N_("Portrait") },
|
|
58 |
{ 5, N_("Landscape") },
|
|
59 |
{ 7, N_("Panorama") },
|
|
60 |
{ 10, N_("Night Scene") },
|
|
61 |
{ 15, N_("Portrait") },
|
|
62 |
{ 16, N_("Landscape") }
|
|
63 |
};
|
|
64 |
|
|
65 |
//! Quality, tag 0x0002
|
|
66 |
extern const TagDetails casioQuality[] = {
|
|
67 |
{ 1, N_("Economy") },
|
|
68 |
{ 2, N_("Normal") },
|
|
69 |
{ 3, N_("Fine") }
|
|
70 |
};
|
|
71 |
|
|
72 |
//! Focus Mode, tag 0x0003
|
|
73 |
extern const TagDetails casioFocusMode[] = {
|
|
74 |
{ 2, N_("Macro") },
|
|
75 |
{ 3, N_("Auto") },
|
|
76 |
{ 4, N_("Manual") },
|
|
77 |
{ 5, N_("Infinity") },
|
|
78 |
{ 7, N_("Sport AF") }
|
|
79 |
};
|
|
80 |
|
|
81 |
//! FlashMode, tag 0x0004
|
|
82 |
extern const TagDetails casioFlashMode[] = {
|
|
83 |
{ 1, N_("Auto") },
|
|
84 |
{ 2, N_("On") },
|
|
85 |
{ 3, N_("Off") },
|
|
86 |
{ 4, N_("Off") },
|
|
87 |
{ 5, N_("Red-eye Reduction") }
|
|
88 |
};
|
|
89 |
|
|
90 |
//! Flash intensity, tag 0x0005
|
|
91 |
extern const TagDetails casioFlashIntensity[] = {
|
|
92 |
{ 11, N_("Weak") },
|
|
93 |
{ 12, N_("Low") },
|
|
94 |
{ 13, N_("Normal") },
|
|
95 |
{ 14, N_("High") },
|
|
96 |
{ 15, N_("Strong") }
|
|
97 |
};
|
|
98 |
|
|
99 |
//! white balance, tag 0x0007
|
|
100 |
extern const TagDetails casioWhiteBalance[] = {
|
|
101 |
{ 1, N_("Auto") },
|
|
102 |
{ 2, N_("Tungsten") },
|
|
103 |
{ 3, N_("Daylight") },
|
|
104 |
{ 4, N_("Fluorescent") },
|
|
105 |
{ 5, N_("Shade") },
|
|
106 |
{ 129, N_("Manual") }
|
|
107 |
};
|
|
108 |
|
|
109 |
//! Flash intensity, tag 0x0005
|
|
110 |
extern const TagDetails casioDigitalZoom[] = {
|
|
111 |
{ 0x10000, N_("Off") },
|
|
112 |
{ 0x10001, N_("2x") },
|
|
113 |
{ 0x13333, N_("1.2x") },
|
|
114 |
{ 0x13ae1, N_("1.23x") },
|
|
115 |
{ 0x19999, N_("1.6x") },
|
|
116 |
{ 0x20000, N_("2x") },
|
|
117 |
{ 0x33333, N_("3.2x") },
|
|
118 |
{ 0x40000, N_("4x") }
|
|
119 |
};
|
|
120 |
|
|
121 |
//! Sharpness, tag 0x000b
|
|
122 |
extern const TagDetails casioSharpness[] = {
|
|
123 |
{ 0, N_("Normal") },
|
|
124 |
{ 1, N_("Soft") },
|
|
125 |
{ 2, N_("Hard") },
|
|
126 |
{ 16, N_("Normal") },
|
|
127 |
{ 17, N_("+1") },
|
|
128 |
{ 18, N_("-1") }
|
|
129 |
};
|
|
130 |
|
|
131 |
//! Contrast, tag 0x000c
|
|
132 |
extern const TagDetails casioContrast[] = {
|
|
133 |
{ 0, N_("Normal") },
|
|
134 |
{ 1, N_("Low") },
|
|
135 |
{ 2, N_("High") },
|
|
136 |
{ 16, N_("Normal") },
|
|
137 |
{ 17, N_("+1") },
|
|
138 |
{ 18, N_("-1") }
|
|
139 |
};
|
|
140 |
|
|
141 |
//! Saturation, tag 0x000d
|
|
142 |
extern const TagDetails casioSaturation[] = {
|
|
143 |
{ 0, N_("Normal") },
|
|
144 |
{ 1, N_("Low") },
|
|
145 |
{ 2, N_("High") },
|
|
146 |
{ 16, N_("Normal") },
|
|
147 |
{ 17, N_("+1") },
|
|
148 |
{ 18, N_("-1") }
|
|
149 |
};
|
|
150 |
|
|
151 |
//! Enhancement, tag 0x0016
|
|
152 |
extern const TagDetails casioEnhancement[] = {
|
|
153 |
{ 1, N_("Off") },
|
|
154 |
{ 2, N_("Red") },
|
|
155 |
{ 3, N_("Green") },
|
|
156 |
{ 4, N_("Blue") },
|
|
157 |
{ 5, N_("Flesh Tones") }
|
|
158 |
};
|
|
159 |
|
|
160 |
//! Color filter, tag 0x0017
|
|
161 |
extern const TagDetails casioColorFilter[] = {
|
|
162 |
{ 1, N_("Off") },
|
|
163 |
{ 2, N_("Black & White") },
|
|
164 |
{ 3, N_("Sepia") },
|
|
165 |
{ 4, N_("Red") },
|
|
166 |
{ 5, N_("Green") },
|
|
167 |
{ 6, N_("Blue") },
|
|
168 |
{ 7, N_("Yellow") },
|
|
169 |
{ 8, N_("Pink") },
|
|
170 |
{ 9, N_("Purple") }
|
|
171 |
};
|
|
172 |
|
|
173 |
//! flash intensity 2, tag 0x0019
|
|
174 |
extern const TagDetails casioFlashIntensity2[] = {
|
|
175 |
{ 1, N_("Normal") },
|
|
176 |
{ 2, N_("Weak") },
|
|
177 |
{ 3, N_("Strong") }
|
|
178 |
};
|
|
179 |
|
|
180 |
//! CCD Sensitivity intensity, tag 0x0020
|
|
181 |
extern const TagDetails casioCCDSensitivity[] = {
|
|
182 |
{ 64, N_("Normal") },
|
|
183 |
{ 125, N_("+1.0") },
|
|
184 |
{ 250, N_("+2.0") },
|
|
185 |
{ 244, N_("+3.0") },
|
|
186 |
{ 80, N_("Normal (ISO 80 equivalent)") },
|
|
187 |
{ 100, N_("High") }
|
|
188 |
};
|
|
189 |
|
|
190 |
// Casio MakerNote Tag Info
|
|
191 |
const TagInfo CasioMakerNote::tagInfo_[] = {
|
|
192 |
TagInfo(0x0001, "RecodingMode", N_("RecodingMode"), N_("Recording Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioRecordingMode)),
|
|
193 |
TagInfo(0x0002, "Quality", N_("Quality"), N_("Quality"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioQuality)),
|
|
194 |
TagInfo(0x0003, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFocusMode)),
|
|
195 |
TagInfo(0x0004, "FlashMode", N_("Flash Mode"), N_("Flash Mode"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashMode)),
|
|
196 |
TagInfo(0x0005, "FlashIntensity", N_("Flash Intensity"), N_("Flash Intensity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashIntensity)),
|
|
197 |
TagInfo(0x0006, "ObjectDistance", N_("Object Distance"), N_("Distance to object"), casioId, makerTags, unsignedLong, -1, print0x0006),
|
|
198 |
TagInfo(0x0007, "WhiteBalance", N_("White Balance"), N_("White balance settings"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioWhiteBalance)),
|
|
199 |
TagInfo(0x000a, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom"), casioId, makerTags, unsignedLong, -1, EXV_PRINT_TAG(casioDigitalZoom)),
|
|
200 |
TagInfo(0x000b, "Sharpness", N_("Sharpness"), N_("Sharpness"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioSharpness)),
|
|
201 |
TagInfo(0x000c, "Contrast", N_("Contrast"), N_("Contrast"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioContrast)),
|
|
202 |
TagInfo(0x000d, "Saturation", N_("Saturation"), N_("Saturation"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioSaturation)),
|
|
203 |
TagInfo(0x0014, "ISO", N_("ISO"), N_("ISO"), casioId, makerTags, unsignedShort, -1, printValue),
|
|
204 |
TagInfo(0x0015, "FirmwareDate", N_("Firmware date"), N_("Firmware date"), casioId, makerTags, asciiString, -1, print0x0015),
|
|
205 |
TagInfo(0x0016, "Enhancement", N_("Enhancement"), N_("Enhancement"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioEnhancement)),
|
|
206 |
TagInfo(0x0017, "ColorFilter", N_("Color Filter"), N_("Color Filter"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioColorFilter)),
|
|
207 |
TagInfo(0x0018, "AFPoint", N_("AF Point"), N_("AF Point"), casioId, makerTags, unsignedShort, -1, printValue),
|
|
208 |
TagInfo(0x0019, "FlashIntensity2", N_("Flash Intensity"), N_("Flash Intensity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioFlashIntensity2)),
|
|
209 |
TagInfo(0x0020, "CCDSensitivity", N_("CCDSensitivity"), N_("CCDSensitivity"), casioId, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casioCCDSensitivity)),
|
|
210 |
TagInfo(0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), casioId, makerTags, undefined, -1, printValue),
|
|
211 |
TagInfo(0xffff, "(UnknownCasioMakerNoteTag)", "(UnknownCasioMakerNoteTag)", N_("Unknown CasioMakerNote tag"), casioId, makerTags, asciiString, -1, printValue)
|
|
212 |
};
|
|
213 |
|
|
214 |
const TagInfo* CasioMakerNote::tagList()
|
|
215 |
{
|
|
216 |
return tagInfo_;
|
|
217 |
}
|
|
218 |
|
|
219 |
std::ostream& CasioMakerNote::print0x0006(std::ostream& os, const Value& value, const ExifData*)
|
|
220 |
{
|
|
221 |
std::ostringstream oss;
|
|
222 |
oss.copyfmt(os);
|
|
223 |
os << std::fixed << std::setprecision(2) << value.toLong() / 1000.0 << _(" m");
|
|
224 |
os.copyfmt(oss);
|
|
225 |
return os;
|
|
226 |
}
|
|
227 |
|
|
228 |
std::ostream& CasioMakerNote::print0x0015(std::ostream& os, const Value& value, const ExifData*)
|
|
229 |
{
|
|
230 |
// format is: "YYMM#00#00DDHH#00#00MM#00#00#00#00" or "YYMM#00#00DDHH#00#00MMSS#00#00#00"
|
|
231 |
std::string s;
|
|
232 |
std::vector<char> numbers;
|
|
233 |
for(long i=0; i<value.size(); i++)
|
|
234 |
{
|
|
235 |
long l=value.toLong(i);
|
|
236 |
if(l!=0)
|
|
237 |
{
|
|
238 |
numbers.push_back((char)l);
|
|
239 |
};
|
|
240 |
};
|
|
241 |
if(numbers.size()>=10)
|
|
242 |
{
|
|
243 |
//year
|
|
244 |
long l=(numbers[0]-48)*10+(numbers[1]-48);
|
|
245 |
if(l<70)
|
|
246 |
{
|
|
247 |
l+=2000;
|
|
248 |
}
|
|
249 |
else
|
|
250 |
{
|
|
251 |
l+=1900;
|
|
252 |
};
|
|
253 |
os << l << ":";
|
|
254 |
// month, day, hour, minutes
|
|
255 |
os << numbers[2] << numbers[3] << ":" << numbers[4] << numbers[5] << " " << numbers[6] << numbers[7] << ":" << numbers[8] << numbers[9];
|
|
256 |
// optional seconds
|
|
257 |
if(numbers.size()==12)
|
|
258 |
{
|
|
259 |
os << ":" << numbers[10] << numbers[11];
|
|
260 |
};
|
|
261 |
}
|
|
262 |
else
|
|
263 |
{
|
|
264 |
os << value;
|
|
265 |
};
|
|
266 |
return os;
|
|
267 |
}
|
|
268 |
|
|
269 |
//Casio Makernotes, Type 2
|
|
270 |
//! Quality Mode, tag 0x0004
|
|
271 |
extern const TagDetails casio2QualityMode[] = {
|
|
272 |
{ 0, N_("Economy") },
|
|
273 |
{ 1, N_("Normal") },
|
|
274 |
{ 2, N_("Fine") }
|
|
275 |
};
|
|
276 |
|
|
277 |
//! Image Size, tag 0x0009
|
|
278 |
extern const TagDetails casio2ImageSize[] = {
|
|
279 |
{ 0, "640x480" },
|
|
280 |
{ 4, "1600x1200" },
|
|
281 |
{ 5, "2048x1536" },
|
|
282 |
{ 20, "2288x1712" },
|
|
283 |
{ 21, "2592x1944" },
|
|
284 |
{ 22, "2304x1728" },
|
|
285 |
{ 36, "3008x2008" }
|
|
286 |
};
|
|
287 |
|
|
288 |
//! Focus Mode, tag 0x000d
|
|
289 |
extern const TagDetails casio2FocusMode[] = {
|
|
290 |
{ 0, N_("Normal") },
|
|
291 |
{ 1, N_("Macro") }
|
|
292 |
};
|
|
293 |
|
|
294 |
//! ISO Speed, tag 0x0014
|
|
295 |
extern const TagDetails casio2IsoSpeed[] = {
|
|
296 |
{ 3, "50" },
|
|
297 |
{ 4, "64" },
|
|
298 |
{ 6, "100" },
|
|
299 |
{ 9, "200" }
|
|
300 |
};
|
|
301 |
|
|
302 |
//! White Balance, tag 0x0019
|
|
303 |
extern const TagDetails casio2WhiteBalance[] = {
|
|
304 |
{ 0, N_("Auto") },
|
|
305 |
{ 1, N_("Daylight") },
|
|
306 |
{ 2, N_("Shade") },
|
|
307 |
{ 3, N_("Tungsten") },
|
|
308 |
{ 4, N_("Fluorescent") },
|
|
309 |
{ 5, N_("Manual") }
|
|
310 |
};
|
|
311 |
|
|
312 |
//! Saturation, tag 0x001f
|
|
313 |
extern const TagDetails casio2Saturation[] = {
|
|
314 |
{ 0, N_("Low") },
|
|
315 |
{ 1, N_("Normal") },
|
|
316 |
{ 2, N_("High") }
|
|
317 |
};
|
|
318 |
|
|
319 |
//! Contrast, tag 0x0020
|
|
320 |
extern const TagDetails casio2Contrast[] = {
|
|
321 |
{ 0, N_("Low") },
|
|
322 |
{ 1, N_("Normal") },
|
|
323 |
{ 2, N_("High") }
|
|
324 |
};
|
|
325 |
|
|
326 |
//! Sharpness, tag 0x0021
|
|
327 |
extern const TagDetails casio2Sharpness[] = {
|
|
328 |
{ 0, N_("Soft") },
|
|
329 |
{ 1, N_("Normal") },
|
|
330 |
{ 2, N_("Hard") }
|
|
331 |
};
|
|
332 |
|
|
333 |
//! White Balance2, tag 0x2012
|
|
334 |
extern const TagDetails casio2WhiteBalance2[] = {
|
|
335 |
{ 0, N_("Manual") },
|
|
336 |
{ 1, N_("Daylight") },
|
|
337 |
{ 2, N_("Cloudy") },
|
|
338 |
{ 3, N_("Shade") },
|
|
339 |
{ 4, N_("Flash") },
|
|
340 |
{ 6, N_("Fluorescent") },
|
|
341 |
{ 9, N_("Tungsten") },
|
|
342 |
{ 10, N_("Tungsten") },
|
|
343 |
{ 12, N_("Flash") }
|
|
344 |
};
|
|
345 |
|
|
346 |
//! Release Mode, tag 0x3001
|
|
347 |
extern const TagDetails casio2ReleaseMode[] = {
|
|
348 |
{ 1, N_("Normal") },
|
|
349 |
{ 3, N_("AE Bracketing") },
|
|
350 |
{ 11, N_("WB Bracketing") },
|
|
351 |
{ 13, N_("Contrast Bracketing") },
|
|
352 |
{ 19, N_("High Speed Burst") }
|
|
353 |
};
|
|
354 |
|
|
355 |
//! Quality, tag 0x3002
|
|
356 |
extern const TagDetails casio2Quality[] = {
|
|
357 |
{ 1, N_("Economy") },
|
|
358 |
{ 2, N_("Normal") },
|
|
359 |
{ 3, N_("Fine") }
|
|
360 |
};
|
|
361 |
|
|
362 |
//! Focus Mode 2, tag 0x3003
|
|
363 |
extern const TagDetails casio2FocusMode2[] = {
|
|
364 |
{ 0, N_("Manual") },
|
|
365 |
{ 1, N_("Focus Lock") },
|
|
366 |
{ 2, N_("Macro") },
|
|
367 |
{ 3, N_("Single-Area Auto Focus") },
|
|
368 |
{ 5, N_("Infinity") },
|
|
369 |
{ 6, N_("Multi-Area Auto Focus") },
|
|
370 |
{ 8, N_("Super Macro") }
|
|
371 |
};
|
|
372 |
|
|
373 |
//! AutoISO, tag 0x3008
|
|
374 |
extern const TagDetails casio2AutoISO[] = {
|
|
375 |
{ 1, N_("On") },
|
|
376 |
{ 2, N_("Off") },
|
|
377 |
{ 7, N_("On (high sensitiviy)") },
|
|
378 |
{ 8, N_("On (anti-shake)") },
|
|
379 |
{ 10, N_("High Speed") }
|
|
380 |
};
|
|
381 |
|
|
382 |
//! AFMode, tag 0x3009
|
|
383 |
extern const TagDetails casio2AFMode[] = {
|
|
384 |
{ 0, N_("Off") },
|
|
385 |
{ 1, N_("Spot") },
|
|
386 |
{ 2, N_("Multi") },
|
|
387 |
{ 3, N_("Face Detection") },
|
|
388 |
{ 4, N_("Tracking") },
|
|
389 |
{ 5, N_("Intelligent") }
|
|
390 |
};
|
|
391 |
|
|
392 |
//! ColorMode, tag 0x3015
|
|
393 |
extern const TagDetails casio2ColorMode[] = {
|
|
394 |
{ 0, N_("Off") },
|
|
395 |
{ 2, N_("Black & White") },
|
|
396 |
{ 3, N_("Sepia") }
|
|
397 |
};
|
|
398 |
|
|
399 |
//! Enhancement, tag 0x3016
|
|
400 |
extern const TagDetails casio2Enhancement[] = {
|
|
401 |
{ 0, N_("Off") },
|
|
402 |
{ 1, N_("Scenery") },
|
|
403 |
{ 3, N_("Green") },
|
|
404 |
{ 5, N_("Unterwater") },
|
|
405 |
{ 9, N_("Flesh Tones") }
|
|
406 |
|
|
407 |
};
|
|
408 |
|
|
409 |
//! Color Filter, tag 0x3017
|
|
410 |
extern const TagDetails casio2ColorFilter[] = {
|
|
411 |
{ 0, N_("Off") },
|
|
412 |
{ 1, N_("Blue") },
|
|
413 |
{ 3, N_("Green") },
|
|
414 |
{ 4, N_("Yellow") },
|
|
415 |
{ 5, N_("Red") },
|
|
416 |
{ 6, N_("Purple") },
|
|
417 |
{ 7, N_("Pink") }
|
|
418 |
};
|
|
419 |
|
|
420 |
//! Art Mode, tag 0x301b
|
|
421 |
extern const TagDetails casio2ArtMode[] = {
|
|
422 |
{ 0, N_("Normal") },
|
|
423 |
{ 8, N_("Silent Movie") },
|
|
424 |
{ 39, N_("HDR") },
|
|
425 |
{ 45, N_("Premium Auto") },
|
|
426 |
{ 47, N_("Painting") },
|
|
427 |
{ 49, N_("Crayon Drawing") },
|
|
428 |
{ 51, N_("Panorama") },
|
|
429 |
{ 52, N_("Art HDR") },
|
|
430 |
{ 62, N_("High Speed Night Shot") },
|
|
431 |
{ 64, N_("Monochrome") },
|
|
432 |
{ 67, N_("Toy Camera") },
|
|
433 |
{ 68, N_("Pop Art") },
|
|
434 |
{ 69, N_("Light Tone") }
|
|
435 |
};
|
|
436 |
|
|
437 |
//! Lighting Mode, tag 0x302a
|
|
438 |
extern const TagDetails casio2LightingMode[] = {
|
|
439 |
{ 0, N_("Off") },
|
|
440 |
{ 1, N_("High Dynamic Range") },
|
|
441 |
{ 5, N_("Shadow Enhance Low") },
|
|
442 |
{ 6, N_("Shadow Enhance High") }
|
|
443 |
};
|
|
444 |
|
|
445 |
//! Portrait Refiner, tag 0x302b
|
|
446 |
extern const TagDetails casio2PortraitRefiner[] = {
|
|
447 |
{ 0, N_("Off") },
|
|
448 |
{ 1, N_("+1") },
|
|
449 |
{ 2, N_("+2") }
|
|
450 |
};
|
|
451 |
|
|
452 |
//! Special Effect Setting, tag 0x3031
|
|
453 |
extern const TagDetails casio2SpecialEffectSetting[] = {
|
|
454 |
{ 0, N_("Off") },
|
|
455 |
{ 1, N_("Makeup") },
|
|
456 |
{ 2, N_("Mist Removal") },
|
|
457 |
{ 3, N_("Vivid Landscape") },
|
|
458 |
{ 16, N_("Art Shot") }
|
|
459 |
};
|
|
460 |
|
|
461 |
//! Drive Mode, tag 0x3103
|
|
462 |
extern const TagDetails casio2DriveMode[] = {
|
|
463 |
{ 0, N_("Single Shot") },
|
|
464 |
{ 1, N_("Continuous Shooting") },
|
|
465 |
{ 2, N_("Continuous (2 fps)") },
|
|
466 |
{ 3, N_("Continuous (3 fps)") },
|
|
467 |
{ 4, N_("Continuous (4 fps)") },
|
|
468 |
{ 5, N_("Continuous (5 fps)") },
|
|
469 |
{ 6, N_("Continuous (6 fps)") },
|
|
470 |
{ 7, N_("Continuous (7 fps)") },
|
|
471 |
{ 10, N_("Continuous (10 fps)") },
|
|
472 |
{ 12, N_("Continuous (12 fps)") },
|
|
473 |
{ 15, N_("Continuous (15 fps)") },
|
|
474 |
{ 20, N_("Continuous (20 fps)") },
|
|
475 |
{ 30, N_("Continuous (30 fps)") },
|
|
476 |
{ 40, N_("Continuous (40 fps)") },
|
|
477 |
{ 60, N_("Continuous (60 fps)") },
|
|
478 |
{ 240, N_("Auto-N") }
|
|
479 |
};
|
|
480 |
|
|
481 |
//! Video Quality, tag 0x4003
|
|
482 |
extern const TagDetails casio2VideoQuality[] = {
|
|
483 |
{ 1, N_("Standard") },
|
|
484 |
{ 3, N_("HD (720p)") },
|
|
485 |
{ 4, N_("Full HD (1080p)") },
|
|
486 |
{ 5, N_("Low") }
|
|
487 |
};
|
|
488 |
|
|
489 |
// Casio2 MakerNote Tag Info
|
|
490 |
const TagInfo Casio2MakerNote::tagInfo_[] = {
|
|
491 |
TagInfo(0x0002, "PreviewImageSize", N_("Preview Image Size"), N_("Preview Image Size"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
492 |
TagInfo(0x0003, "PreviewImageLength", N_("Preview Image Length"), N_("Preview Image Length"), casio2Id, makerTags, unsignedLong, -1, printValue),
|
|
493 |
TagInfo(0x0004, "PreviewImageStart", N_("Preview Image Start"), N_("Preview Image Start"), casio2Id, makerTags, unsignedLong, -1, printValue),
|
|
494 |
TagInfo(0x0008, "QualityMode", N_("Quality Mode"), N_("Quality Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2QualityMode)),
|
|
495 |
TagInfo(0x0009, "ImageSize", N_("Image Size"), N_("Image Size"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ImageSize)),
|
|
496 |
TagInfo(0x000d, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2FocusMode)),
|
|
497 |
TagInfo(0x0014, "ISOSpeed", N_("ISO Speed"), N_("ISO Speed"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2IsoSpeed)),
|
|
498 |
TagInfo(0x0019, "WhiteBalance", N_("White Balance"), N_("White Balance Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2WhiteBalance)),
|
|
499 |
TagInfo(0x001d, "FocalLength", N_("Focal Length"), N_("Focal Length"), casio2Id, makerTags, unsignedRational, -1, printValue),
|
|
500 |
TagInfo(0x001f, "Saturation", N_("Saturation"), N_("Saturation"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Saturation)),
|
|
501 |
TagInfo(0x0020, "Contrast", N_("Contrast"), N_("Contrast"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Contrast)),
|
|
502 |
TagInfo(0x0021, "Sharpness", N_("Sharpness"), N_("Sharpness"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Sharpness)),
|
|
503 |
TagInfo(0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), casio2Id, makerTags, undefined, -1, printValue),
|
|
504 |
TagInfo(0x2000, "PreviewImage", N_("Preview Image"), N_("Preview Image"), casio2Id, makerTags, undefined, -1, printValue),
|
|
505 |
TagInfo(0x2001, "FirmwareDate", N_("Firmware Date"), N_("Firmware Date"), casio2Id, makerTags, asciiString, -1, print0x2001),
|
|
506 |
TagInfo(0x2011, "WhiteBalanceBias", N_("White Balance Bias"), N_("White Balance Bias"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
507 |
TagInfo(0x2012, "WhiteBalance2", N_("White Balance"), N_("White Balance Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2WhiteBalance2)),
|
|
508 |
TagInfo(0x2021, "AFPointPosition", N_("AF Point Position"), N_("AF Point Position"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
509 |
TagInfo(0x2022, "ObjectDistance", N_("Object Distance"), N_("Object Distance"), casio2Id, makerTags, unsignedLong, -1, print0x2022),
|
|
510 |
TagInfo(0x2034, "FlashDistance", N_("Flash Distance"), N_("Flash Distance"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
511 |
TagInfo(0x2076, "SpecialEffectMode", N_("Special Effect Mode"), N_("Special Effect Mode"), casio2Id, makerTags, unsignedByte, -1, printValue),
|
|
512 |
TagInfo(0x2089, "FaceInfo", N_("Face Info"), N_("Face Info"), casio2Id, makerTags, undefined, -1, printValue),
|
|
513 |
TagInfo(0x211c, "FacesDetected", N_("Faces detected"), N_("Faces detected"), casio2Id, makerTags, unsignedByte, -1, printValue),
|
|
514 |
TagInfo(0x3000, "RecordMode", N_("Record Mode"), N_("Record Mode"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
515 |
TagInfo(0x3001, "ReleaseMode", N_("Release Mode"), N_("Release Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ReleaseMode)),
|
|
516 |
TagInfo(0x3002, "Quality", N_("Quality"), N_("Quality"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Quality)),
|
|
517 |
TagInfo(0x3003, "FocusMode2", N_("Focus Mode2"), N_("Focus Mode2"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2FocusMode2)),
|
|
518 |
TagInfo(0x3006, "HometownCity", N_("Home town city"), N_("Home town city"), casio2Id, makerTags, asciiString, -1, printValue),
|
|
519 |
TagInfo(0x3007, "BestShotMode", N_("Best Shot Mode"), N_("Best Shot Mode"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
520 |
TagInfo(0x3008, "AutoISO", N_("Auto ISO"), N_("Auto ISO"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2AutoISO)),
|
|
521 |
TagInfo(0x3009, "AFMode", N_("AF Mode"), N_("AF Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2AFMode)),
|
|
522 |
TagInfo(0x3011, "Sharpness2", N_("Sharpness"), N_("Sharpness"), casio2Id, makerTags, undefined, -1, printValue),
|
|
523 |
TagInfo(0x3012, "Contrast2", N_("Contrast"), N_("Contrast"), casio2Id, makerTags, undefined, -1, printValue),
|
|
524 |
TagInfo(0x3013, "Saturation2", N_("Saturation"), N_("Saturation"), casio2Id, makerTags, undefined, -1, printValue),
|
|
525 |
TagInfo(0x3014, "ISO", N_("ISO"), N_("ISO"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
526 |
TagInfo(0x3015, "ColorMode", N_("Color Mode"), N_("Color Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ColorMode)),
|
|
527 |
TagInfo(0x3016, "Enhancement", N_("Enhancement"), N_("Enhancement"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2Enhancement)),
|
|
528 |
TagInfo(0x3017, "ColorFilter", N_("Color Filter"), N_("Color Filter"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ColorFilter)),
|
|
529 |
TagInfo(0x301b, "ArtMode", N_("Art Mode"), N_("Art Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2ArtMode)),
|
|
530 |
TagInfo(0x301c, "SequenceNumber", N_("Sequence Number"), N_("Sequence Number"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
531 |
TagInfo(0x3020, "ImageStabilization", N_("Image Stabilization"), N_("Image Stabilization"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
532 |
TagInfo(0x302a, "LightingMode", N_("Lighting Mode"), N_("Lighting Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2LightingMode)),
|
|
533 |
TagInfo(0x302b, "PortraitRefiner", N_("Portrait Refiner"), N_("Portrait Refiner settings"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2PortraitRefiner)),
|
|
534 |
TagInfo(0x3030, "SpecialEffectLevel", N_("Special Effect Level"), N_("Special Effect Level"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
535 |
TagInfo(0x3031, "SpecialEffectSetting", N_("Special Effect Setting"), N_("Special Effect Setting"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2SpecialEffectSetting)),
|
|
536 |
TagInfo(0x3103, "DriveMode", N_("Drive Mode"), N_("Drive Mode"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2DriveMode)),
|
|
537 |
TagInfo(0x310b, "ArtModeParameters", N_("Art Mode Parameters"), N_("Art Mode Parameters"), casio2Id, makerTags, undefined, -1, printValue),
|
|
538 |
TagInfo(0x4001, "CaptureFrameRate", N_("Capture Frame Rate"), N_("Capture Frame Rate"), casio2Id, makerTags, unsignedShort, -1, printValue),
|
|
539 |
TagInfo(0x4003, "VideoQuality", N_("Video Quality"), N_("Video Quality"), casio2Id, makerTags, unsignedShort, -1, EXV_PRINT_TAG(casio2VideoQuality)),
|
|
540 |
TagInfo(0xffff, "(UnknownCasio2MakerNoteTag)", "(UnknownCasio2MakerNoteTag)", N_("Unknown Casio2MakerNote tag"), casio2Id, makerTags, asciiString, -1, printValue)
|
|
541 |
};
|
|
542 |
|
|
543 |
const TagInfo* Casio2MakerNote::tagList()
|
|
544 |
{
|
|
545 |
return tagInfo_;
|
|
546 |
}
|
|
547 |
|
|
548 |
std::ostream& Casio2MakerNote::print0x2001(std::ostream& os, const Value& value, const ExifData*)
|
|
549 |
{
|
|
550 |
// format is: "YYMM#00#00DDHH#00#00MM#00#00#00#00"
|
|
551 |
std::string s;
|
|
552 |
std::vector<char> numbers;
|
|
553 |
for(long i=0; i<value.size(); i++)
|
|
554 |
{
|
|
555 |
long l=value.toLong(i);
|
|
556 |
if(l!=0)
|
|
557 |
{
|
|
558 |
numbers.push_back((char)l);
|
|
559 |
};
|
|
560 |
};
|
|
561 |
if(numbers.size()>=10)
|
|
562 |
{
|
|
563 |
//year
|
|
564 |
long l=(numbers[0]-48)*10+(numbers[1]-48);
|
|
565 |
if(l<70)
|
|
566 |
{
|
|
567 |
l+=2000;
|
|
568 |
}
|
|
569 |
else
|
|
570 |
{
|
|
571 |
l+=1900;
|
|
572 |
};
|
|
573 |
os << l << ":";
|
|
574 |
// month, day, hour, minutes
|
|
575 |
os << numbers[2] << numbers[3] << ":" << numbers[4] << numbers[5] << " " << numbers[6] << numbers[7] << ":" << numbers[8] << numbers[9];
|
|
576 |
}
|
|
577 |
else
|
|
578 |
{
|
|
579 |
os << value;
|
|
580 |
};
|
|
581 |
return os;
|
|
582 |
}
|
|
583 |
|
|
584 |
std::ostream& Casio2MakerNote::print0x2022(std::ostream& os, const Value& value, const ExifData*)
|
|
585 |
{
|
|
586 |
if(value.toLong()>=0x20000000)
|
|
587 |
{
|
|
588 |
return os << N_("Inf");
|
|
589 |
};
|
|
590 |
std::ostringstream oss;
|
|
591 |
oss.copyfmt(os);
|
|
592 |
os << std::fixed << std::setprecision(2) << value.toLong() / 1000.0 << _(" m");
|
|
593 |
os.copyfmt(oss);
|
|
594 |
return os;
|
|
595 |
}
|
|
596 |
|
|
597 |
}} // namespace Internal, Exiv2
|