/src/exiv2/src/nikonmn_int.hpp
Line | Count | Source |
1 | | // SPDX-License-Identifier: GPL-2.0-or-later |
2 | | |
3 | | /*! |
4 | | @file nikonmn_int.hpp |
5 | | @brief Nikon makernote tags.<BR>References:<BR> |
6 | | [1] <a href="http://www.tawbaware.com/990exif.htm">MakerNote EXIF Tag of the Nikon 990</a> by Max Lyons<BR> |
7 | | [2] <a href="http://park2.wakwak.com/%7Etsuruzoh/Computer/Digicams/exif-e.html">Exif file format</a> by TsuruZoh |
8 | | Tachibanaya<BR> [3] "EXIFutils Field Reference Guide"<BR> [3] <a |
9 | | href="http://www.ozhiker.com/electronics/pjmt/jpeg_info/nikon_mn.html#Nikon_Type_3_Tags">Nikon Type 3 Makernote Tags |
10 | | Definition</a> of the PHP JPEG Metadata Toolkit by Evan Hunter<BR> [4] <a |
11 | | href="http://www.sno.phy.queensu.ca/~phil/exiftool/">ExifTool</a> by Phil Harvey<BR> [5] Email communication with <a |
12 | | href="http://www.rottmerhusen.com">Robert Rottmerhusen</a><BR> [6] Email communication with Roger Larsson<BR> [7] <a |
13 | | href="http://www.cybercom.net/~dcoffin/dcraw/">Decoding raw digital photos in Linux</a> by Dave Coffin<br> |
14 | | */ |
15 | | #ifndef NIKONMN_INT_HPP_ |
16 | | #define NIKONMN_INT_HPP_ |
17 | | |
18 | | // ***************************************************************************** |
19 | | // included header files |
20 | | #include <iosfwd> |
21 | | #include <string> |
22 | | |
23 | | // ***************************************************************************** |
24 | | // namespace extensions |
25 | | namespace Exiv2 { |
26 | | class ExifData; |
27 | | class Value; |
28 | | struct TagInfo; |
29 | | |
30 | | namespace Internal { |
31 | | // ***************************************************************************** |
32 | | // class definitions |
33 | | |
34 | | //! A MakerNote format used by Nikon cameras, such as the E990 and D1. |
35 | | class Nikon1MakerNote { |
36 | | public: |
37 | | //! Return read-only list of built-in Nikon1 tags |
38 | 17.7k | static constexpr auto tagList() { |
39 | 17.7k | return tagInfo_; |
40 | 17.7k | } |
41 | | |
42 | | //! @name Print functions for Nikon1 %MakerNote tags |
43 | | //@{ |
44 | | //! Print ISO setting |
45 | | static std::ostream& print0x0002(std::ostream& os, const Value& value, const ExifData*); |
46 | | //! Print autofocus mode |
47 | | static std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*); |
48 | | //! Print manual focus distance |
49 | | static std::ostream& print0x0085(std::ostream& os, const Value& value, const ExifData*); |
50 | | //! Print digital zoom setting |
51 | | static std::ostream& print0x0086(std::ostream& os, const Value& value, const ExifData*); |
52 | | //! Print AF focus position |
53 | | static std::ostream& print0x0088(std::ostream& os, const Value& value, const ExifData*); |
54 | | //! Print BarometerInfo |
55 | | static std::ostream& printBarValue(std::ostream& os, const Value& value, const ExifData*); |
56 | | //@} |
57 | | |
58 | | private: |
59 | | //! Tag information |
60 | | static const TagInfo tagInfo_[]; |
61 | | |
62 | | }; // class Nikon1MakerNote |
63 | | |
64 | | /*! |
65 | | @brief A second MakerNote format used by Nikon cameras, including the |
66 | | E700, E800, E900, E900S, E910, E950 |
67 | | */ |
68 | | class Nikon2MakerNote { |
69 | | public: |
70 | | //! Return read-only list of built-in Nikon2 tags |
71 | 7.65k | static constexpr auto tagList() { |
72 | 7.65k | return tagInfo_; |
73 | 7.65k | } |
74 | | |
75 | | //! @name Print functions for Nikon2 %MakerNote tags |
76 | | //@{ |
77 | | //! Print digital zoom setting |
78 | | static std::ostream& print0x000a(std::ostream& os, const Value& value, const ExifData*); |
79 | | //@} |
80 | | |
81 | | private: |
82 | | //! Tag information |
83 | | static const TagInfo tagInfo_[]; |
84 | | |
85 | | }; // class Nikon2MakerNote |
86 | | |
87 | | //! A third MakerNote format used by Nikon cameras, e.g., E5400, SQ, D2H, D70 |
88 | | class Nikon3MakerNote { |
89 | | public: |
90 | | //! Return read-only list of built-in Nikon3 tags |
91 | 71.3k | static constexpr auto tagList() { |
92 | 71.3k | return tagInfo_; |
93 | 71.3k | } |
94 | | //! Return read-only list of built-in Vibration Reduction tags |
95 | 535 | static constexpr auto tagListVr() { |
96 | 535 | return tagInfoVr_; |
97 | 535 | } |
98 | | //! Return read-only list of built-in Picture Control tags |
99 | 1.90k | static constexpr auto tagListPc() { |
100 | 1.90k | return tagInfoPc_; |
101 | 1.90k | } |
102 | | //! Return read-only list of built-in World time tags |
103 | 1.10k | static constexpr auto tagListWt() { |
104 | 1.10k | return tagInfoWt_; |
105 | 1.10k | } |
106 | | //! Return read-only list of built-in ISO info tags |
107 | 2.16k | static constexpr auto tagListIi() { |
108 | 2.16k | return tagInfoIi_; |
109 | 2.16k | } |
110 | | //! Return read-only list of built-in Auto Focus tags |
111 | 1.36k | static constexpr auto tagListAf() { |
112 | 1.36k | return tagInfoAf_; |
113 | 1.36k | } |
114 | | //! Return read-only list of built-in Auto Focus 2 tags |
115 | 4.70k | static constexpr auto tagListAf21() { |
116 | 4.70k | return tagInfoAf21_; |
117 | 4.70k | } |
118 | | //! Return read-only list of built-in Auto Focus 2 tags |
119 | 558 | static constexpr auto tagListAf22() { |
120 | 558 | return tagInfoAf22_; |
121 | 558 | } |
122 | | //! Return read-only list of built-in AF Fine Tune tags |
123 | 3.40k | static constexpr auto tagListAFT() { |
124 | 3.40k | return tagInfoAFT_; |
125 | 3.40k | } |
126 | | //! Return read-only list of built-in File Info tags |
127 | 81 | static constexpr auto tagListFi() { |
128 | 81 | return tagInfoFi_; |
129 | 81 | } |
130 | | //! Return read-only list of built-in Multi Exposure tags |
131 | 201 | static constexpr auto tagListMe() { |
132 | 201 | return tagInfoMe_; |
133 | 201 | } |
134 | | //! Return read-only list of built-in Flash Info 1 tags |
135 | 411 | static constexpr auto tagListFl1() { |
136 | 411 | return tagInfoFl1_; |
137 | 411 | } |
138 | | //! Return read-only list of built-in Flash Info 2 tags |
139 | 51 | static constexpr auto tagListFl2() { |
140 | 51 | return tagInfoFl2_; |
141 | 51 | } |
142 | | //! Return read-only list of built-in Flash Info 3 tags |
143 | 174 | static constexpr auto tagListFl3() { |
144 | 174 | return tagInfoFl3_; |
145 | 174 | } |
146 | | //! Return read-only list of built-in Flash Info 6 (0106) tags |
147 | 1.48k | static constexpr auto tagListFl6() { |
148 | 1.48k | return tagInfoFl6_; |
149 | 1.48k | } |
150 | | //! Return read-only list of built-in Flash Info 7 (0107 and 0108) tags |
151 | 2.77k | static constexpr auto tagListFl7() { |
152 | 2.77k | return tagInfoFl7_; |
153 | 2.77k | } |
154 | | //! Return read-only list of built-in Shot Info D80 tags |
155 | 14 | static constexpr auto tagListSi1() { |
156 | 14 | return tagInfoSi1_; |
157 | 14 | } |
158 | | //! Return read-only list of built-in Shot Info D40 tags |
159 | 18 | static constexpr auto tagListSi2() { |
160 | 18 | return tagInfoSi2_; |
161 | 18 | } |
162 | | //! Return read-only list of built-in Shot Info D300 (a) tags |
163 | 0 | static constexpr auto tagListSi3() { |
164 | 0 | return tagInfoSi3_; |
165 | 0 | } |
166 | | //! Return read-only list of built-in Shot Info D300 (b) tags |
167 | 0 | static constexpr auto tagListSi4() { |
168 | 0 | return tagInfoSi4_; |
169 | 0 | } |
170 | | //! Return read-only list of built-in Shot Info tags |
171 | 664 | static constexpr auto tagListSi5() { |
172 | 664 | return tagInfoSi5_; |
173 | 664 | } |
174 | | //! Return read-only list of built-in Color Balance 1 tags |
175 | 38 | static constexpr auto tagListCb1() { |
176 | 38 | return tagInfoCb1_; |
177 | 38 | } |
178 | | //! Return read-only list of built-in Color Balance 2 tags |
179 | 61 | static constexpr auto tagListCb2() { |
180 | 61 | return tagInfoCb2_; |
181 | 61 | } |
182 | | //! Return read-only list of built-in Color Balance 2a tags |
183 | 48 | static constexpr auto tagListCb2a() { |
184 | 48 | return tagInfoCb2a_; |
185 | 48 | } |
186 | | //! Return read-only list of built-in Color Balance 2b tags |
187 | 228 | static constexpr auto tagListCb2b() { |
188 | 228 | return tagInfoCb2b_; |
189 | 228 | } |
190 | | //! Return read-only list of built-in Color Balance 3 tags |
191 | 17 | static constexpr auto tagListCb3() { |
192 | 17 | return tagInfoCb3_; |
193 | 17 | } |
194 | | //! Return read-only list of built-in Color Balance 4 tags |
195 | 35 | static constexpr auto tagListCb4() { |
196 | 35 | return tagInfoCb4_; |
197 | 35 | } |
198 | | //! Return read-only list of built-in Lens Data 1 tags |
199 | 237 | static constexpr auto tagListLd1() { |
200 | 237 | return tagInfoLd1_; |
201 | 237 | } |
202 | | //! Return read-only list of built-in Lens Data 2 tags |
203 | 936 | static constexpr auto tagListLd2() { |
204 | 936 | return tagInfoLd2_; |
205 | 936 | } |
206 | | //! Return read-only list of built-in Lens Data 3 tags |
207 | 761 | static constexpr auto tagListLd3() { |
208 | 761 | return tagInfoLd3_; |
209 | 761 | } |
210 | | //! Return read-only list of built-in Lens Data 4 tags |
211 | 10.1k | static constexpr auto tagListLd4() { |
212 | 10.1k | return tagInfoLd4_; |
213 | 10.1k | } |
214 | | |
215 | | //! @name Print functions for Nikon3 %MakerNote tags |
216 | | //@{ |
217 | | //! Print ISO setting |
218 | | static std::ostream& print0x0002(std::ostream& os, const Value& value, const ExifData*); |
219 | | //! Print AF2 Area Mode |
220 | | static std::ostream& printAf2AreaMode(std::ostream& os, const Value& value, const ExifData* metadata); |
221 | | //! Print autofocus mode |
222 | | static std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*); |
223 | | //! Print lens type |
224 | | static std::ostream& print0x0083(std::ostream& os, const Value& value, const ExifData*); |
225 | | //! Print lens information |
226 | | static std::ostream& print0x0084(std::ostream& os, const Value& value, const ExifData*); |
227 | | //! Print manual focus distance |
228 | | static std::ostream& print0x0085(std::ostream& os, const Value& value, const ExifData*); |
229 | | //! Print digital zoom setting |
230 | | static std::ostream& print0x0086(std::ostream& os, const Value& value, const ExifData*); |
231 | | //! Print AF point |
232 | | static std::ostream& print0x0088(std::ostream& os, const Value& value, const ExifData*); |
233 | | //! Print shooting mode |
234 | | static std::ostream& print0x0089(std::ostream& os, const Value& value, const ExifData* metadata); |
235 | | //! Print number of lens stops |
236 | | static std::ostream& print0x008b(std::ostream& os, const Value& value, const ExifData*); |
237 | | //! Print AF Points In Focus |
238 | | static std::ostream& printAfPointsInFocus(std::ostream& os, const Value& value, const ExifData* metadata); |
239 | | //! Print lens name |
240 | | static std::ostream& printLensId(std::ostream& os, const Value& value, const ExifData* metadata, |
241 | | const std::string& group); |
242 | | static std::ostream& printLensId1(std::ostream& os, const Value& value, const ExifData* metadata); |
243 | | static std::ostream& printLensId2(std::ostream& os, const Value& value, const ExifData* metadata); |
244 | | static std::ostream& printLensId3(std::ostream& os, const Value& value, const ExifData* metadata); |
245 | | static std::ostream& printLensId4(std::ostream& os, const Value& value, const ExifData* metadata); |
246 | | //! Print focus distance |
247 | | static std::ostream& printFocusDistance(std::ostream& os, const Value& value, const ExifData*); |
248 | | //! Print focus distance for new LensData as used for e.g. Nikon Z 6/7 |
249 | | static std::ostream& printFocusDistanceLd4(std::ostream& os, const Value& value, const ExifData*); |
250 | | //! Print lens aperture value |
251 | | static std::ostream& printAperture(std::ostream& os, const Value& value, const ExifData*); |
252 | | //! Print lens aperture value for new LensData as used for e.g. Nikon Z 6/7 |
253 | | static std::ostream& printApertureLd4(std::ostream& os, const Value& value, const ExifData*); |
254 | | //! Print lens focal length |
255 | | static std::ostream& printFocal(std::ostream& os, const Value& value, const ExifData*); |
256 | | //! Print Focal length value for new LensData as used for e.g. Nikon Z 6/7 |
257 | | static std::ostream& printFocalLd4(std::ostream& os, const Value& value, const ExifData*); |
258 | | //! Print lens f-stops |
259 | | static std::ostream& printFStops(std::ostream& os, const Value& value, const ExifData*); |
260 | | //! Print exit pupil position |
261 | | static std::ostream& printExitPupilPosition(std::ostream& os, const Value& value, const ExifData*); |
262 | | //! Print sensor pixel size |
263 | | static std::ostream& print0x009a(std::ostream& os, const Value& value, const ExifData*); |
264 | | //! Print retouch history |
265 | | static std::ostream& print0x009e(std::ostream& os, const Value& value, const ExifData*); |
266 | | //! Print Exif.NikonIi.ISO(2) |
267 | | static std::ostream& printIiIso(std::ostream& os, const Value& value, const ExifData*); |
268 | | //! Print flash focal length |
269 | | static std::ostream& printFlashFocalLength(std::ostream& os, const Value& value, const ExifData*); |
270 | | //! Print repeating flash rate |
271 | | static std::ostream& printRepeatingFlashRate(std::ostream& os, const Value& value, const ExifData*); |
272 | | //! Print repeating flash count |
273 | | static std::ostream& printRepeatingFlashCount(std::ostream& os, const Value& value, const ExifData*); |
274 | | //! Print external flash data 1 value when using NikonFl6 |
275 | | static std::ostream& printExternalFlashData1Fl6(std::ostream& os, const Value& value, const ExifData*); |
276 | | //! Print external flash data 1 value when using NikonFl7 |
277 | | static std::ostream& printExternalFlashData1Fl7(std::ostream& os, const Value& value, const ExifData*); |
278 | | //! Print external flash data 1 value when using NikonFl6 |
279 | | static std::ostream& printExternalFlashData2Fl6(std::ostream& os, const Value& value, const ExifData*); |
280 | | //! Print external flash data 2 value |
281 | | static std::ostream& printExternalFlashData2(std::ostream& os, const Value& value, const ExifData*); |
282 | | //! Print flash compensation value for the Master when using NikonFl6 |
283 | | static std::ostream& printFlashMasterDataFl6(std::ostream& os, const Value& value, const ExifData*); |
284 | | //! Print flash compensation value for the Master when using NikonFl7 |
285 | | static std::ostream& printFlashMasterDataFl7(std::ostream& os, const Value& value, const ExifData*); |
286 | | //! Print flash group A control data value |
287 | | static std::ostream& printFlashGroupAControlData(std::ostream& os, const Value& value, const ExifData* data); |
288 | | //! Print flash group B/C control data value |
289 | | static std::ostream& printFlashGroupBCControlData(std::ostream& os, const Value& value, const ExifData* data); |
290 | | //! Print flash compensation value for group A when using NikonFl6 |
291 | | static std::ostream& printFlashGroupADataFl6(std::ostream& os, const Value& value, const ExifData*); |
292 | | //! Print flash compensation value for group A when using NikonFl7 |
293 | | static std::ostream& printFlashGroupADataFl7(std::ostream& os, const Value& value, const ExifData*); |
294 | | //! Print flash compensation value for group B when using NikonFl6 |
295 | | static std::ostream& printFlashGroupBDataFl6(std::ostream& os, const Value& value, const ExifData*); |
296 | | //! Print flash compensation value for group B when using NikonFl7 |
297 | | static std::ostream& printFlashGroupBDataFl7(std::ostream& os, const Value& value, const ExifData*); |
298 | | //! Print flash compensation value for group C when using NikonFl6 |
299 | | static std::ostream& printFlashGroupCDataFl6(std::ostream& os, const Value& value, const ExifData*); |
300 | | //! Print flash compensation value for group C when using NikonFl7 |
301 | | static std::ostream& printFlashGroupCDataFl7(std::ostream& os, const Value& value, const ExifData*); |
302 | | //! Print external flash data 3 value |
303 | | static std::ostream& printExternalFlashData3(std::ostream& os, const Value& value, const ExifData*); |
304 | | //! Print flash camera exposure compensation values |
305 | | static std::ostream& printCameraExposureCompensation(std::ostream& os, const Value& value, const ExifData*); |
306 | | //! Print external flash data 4 value |
307 | | static std::ostream& printExternalFlashData4(std::ostream& os, const Value& value, const ExifData*); |
308 | | //! Print flash head zoom value |
309 | | static std::ostream& printFlashZoomHeadPosition(std::ostream& os, const Value& value, const ExifData*); |
310 | | //! Print time zone |
311 | | static std::ostream& printTimeZone(std::ostream& os, const Value& value, const ExifData*); |
312 | | //! Print picture control value |
313 | | static std::ostream& printPictureControl(std::ostream& os, const Value& value, const ExifData*); |
314 | | //@} |
315 | | |
316 | | private: |
317 | | //! Tag information |
318 | | static const TagInfo tagInfo_[]; |
319 | | //! Vibration Reduction tag information |
320 | | static const TagInfo tagInfoVr_[]; |
321 | | //! Picture Control tag information |
322 | | static const TagInfo tagInfoPc_[]; |
323 | | //! World Time tag information |
324 | | static const TagInfo tagInfoWt_[]; |
325 | | //! ISO info tag information |
326 | | static const TagInfo tagInfoIi_[]; |
327 | | //! Auto Focus tag information |
328 | | static const TagInfo tagInfoAf_[]; |
329 | | //! Auto Focus tag 2 information |
330 | | static const TagInfo tagInfoAf21_[]; |
331 | | //! Auto Focus tag 2 information |
332 | | static const TagInfo tagInfoAf22_[]; |
333 | | //! AF Fine Tune tag information |
334 | | static const TagInfo tagInfoAFT_[]; |
335 | | //! File Info tag information |
336 | | static const TagInfo tagInfoFi_[]; |
337 | | //! Multi Exposure tag information |
338 | | static const TagInfo tagInfoMe_[]; |
339 | | //! Flash Info 1 tag information |
340 | | static const TagInfo tagInfoFl1_[]; |
341 | | //! Flash Info 2 tag information |
342 | | static const TagInfo tagInfoFl2_[]; |
343 | | //! Flash Info 3 tag information |
344 | | static const TagInfo tagInfoFl3_[]; |
345 | | //! Flash Info 6 (0106) tag information |
346 | | static const TagInfo tagInfoFl6_[]; |
347 | | //! Flash Info 7 (0107 and 0108) tag information |
348 | | static const TagInfo tagInfoFl7_[]; |
349 | | //! Shot Info D80 tag information |
350 | | static const TagInfo tagInfoSi1_[]; |
351 | | //! Shot Info D40 tag information |
352 | | static const TagInfo tagInfoSi2_[]; |
353 | | //! Shot Info D300 (a) tag information |
354 | | static const TagInfo tagInfoSi3_[]; |
355 | | //! Shot Info D300 (b) tag information |
356 | | static const TagInfo tagInfoSi4_[]; |
357 | | //! Shot Info tag information |
358 | | static const TagInfo tagInfoSi5_[]; |
359 | | //! Color Balance 1 tag information |
360 | | static const TagInfo tagInfoCb1_[]; |
361 | | //! Color Balance 2 tag information |
362 | | static const TagInfo tagInfoCb2_[]; |
363 | | //! Color Balance 2a tag information |
364 | | static const TagInfo tagInfoCb2a_[]; |
365 | | //! Color Balance 2b tag information |
366 | | static const TagInfo tagInfoCb2b_[]; |
367 | | //! Color Balance 3 tag information |
368 | | static const TagInfo tagInfoCb3_[]; |
369 | | //! Color Balance 4 tag information |
370 | | static const TagInfo tagInfoCb4_[]; |
371 | | //! Lens Data 1 tag information |
372 | | static const TagInfo tagInfoLd1_[]; |
373 | | //! Lens Data 2 tag information |
374 | | static const TagInfo tagInfoLd2_[]; |
375 | | //! Lens Data 3 tag information |
376 | | static const TagInfo tagInfoLd3_[]; |
377 | | //! Lens Data 4 tag information |
378 | | static const TagInfo tagInfoLd4_[]; |
379 | | |
380 | | }; // class Nikon3MakerNote |
381 | | |
382 | | } // namespace Internal |
383 | | } // namespace Exiv2 |
384 | | |
385 | | #endif // #ifndef NIKONMN_INT_HPP_ |