source: josm/trunk/src/com/drew/metadata/exif/NikonType2MakernoteDirectory.java@ 6127

Last change on this file since 6127 was 6127, checked in by bastiK, 11 years ago

applied #8895 - Upgrade metadata-extractor to v. 2.6.4 (patch by ebourg)

File size: 36.3 KB
Line 
1/*
2 * Copyright 2002-2012 Drew Noakes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * http://drewnoakes.com/code/exif/
19 * http://code.google.com/p/metadata-extractor/
20 */
21package com.drew.metadata.exif;
22
23import com.drew.lang.annotations.NotNull;
24import com.drew.metadata.Directory;
25
26import java.util.HashMap;
27
28/**
29 * Describes tags specific to Nikon (type 2) cameras. Type-2 applies to the E990 and D-series cameras such as the E990, D1,
30 * D70 and D100.
31 * <p/>
32 * Thanks to Fabrizio Giudici for publishing his reverse-engineering of the D100 makernote data.
33 * http://www.timelesswanderings.net/equipment/D100/NEF.html
34 * <p/>
35 * Note that the camera implements image protection (locking images) via the file's 'readonly' attribute. Similarly
36 * image hiding uses the 'hidden' attribute (observed on the D70). Consequently, these values are not available here.
37 * <p/>
38 * Additional sample images have been observed, and their tag values recorded in javadoc comments for each tag's field.
39 * New tags have subsequently been added since Fabrizio's observations.
40 * <p/>
41 * In earlier models (such as the E990 and D1), this directory begins at the first byte of the makernote IFD. In
42 * later models, the IFD was given the standard prefix to indicate the camera models (most other manufacturers also
43 * provide this prefix to aid in software decoding).
44 *
45 * @author Drew Noakes http://drewnoakes.com
46 */
47public class NikonType2MakernoteDirectory extends Directory
48{
49 /**
50 * Values observed
51 * - 0200 (D70)
52 * - 0200 (D1X)
53 */
54 public static final int TAG_NIKON_TYPE2_FIRMWARE_VERSION = 0x0001;
55
56 /**
57 * Values observed
58 * - 0 250
59 * - 0 400
60 */
61 public static final int TAG_NIKON_TYPE2_ISO_1 = 0x0002;
62
63 /**
64 * The camera's color mode, as an uppercase string. Examples include:
65 * <ul>
66 * <li><code>B & W</code></li>
67 * <li><code>COLOR</code></li>
68 * <li><code>COOL</code></li>
69 * <li><code>SEPIA</code></li>
70 * <li><code>VIVID</code></li>
71 * </ul>
72 */
73 public static final int TAG_NIKON_TYPE2_COLOR_MODE = 0x0003;
74
75 /**
76 * The camera's quality setting, as an uppercase string. Examples include:
77 * <ul>
78 * <li><code>BASIC</code></li>
79 * <li><code>FINE</code></li>
80 * <li><code>NORMAL</code></li>
81 * <li><code>RAW</code></li>
82 * <li><code>RAW2.7M</code></li>
83 * </ul>
84 */
85 public static final int TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT = 0x0004;
86
87 /**
88 * The camera's white balance setting, as an uppercase string. Examples include:
89 *
90 * <ul>
91 * <li><code>AUTO</code></li>
92 * <li><code>CLOUDY</code></li>
93 * <li><code>FLASH</code></li>
94 * <li><code>FLUORESCENT</code></li>
95 * <li><code>INCANDESCENT</code></li>
96 * <li><code>PRESET</code></li>
97 * <li><code>PRESET0</code></li>
98 * <li><code>PRESET1</code></li>
99 * <li><code>PRESET3</code></li>
100 * <li><code>SUNNY</code></li>
101 * <li><code>WHITE PRESET</code></li>
102 * <li><code>4350K</code></li>
103 * <li><code>5000K</code></li>
104 * <li><code>DAY WHITE FL</code></li>
105 * <li><code>SHADE</code></li>
106 * </ul>
107 */
108 public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE = 0x0005;
109
110 /**
111 * The camera's sharpening setting, as an uppercase string. Examples include:
112 *
113 * <ul>
114 * <li><code>AUTO</code></li>
115 * <li><code>HIGH</code></li>
116 * <li><code>LOW</code></li>
117 * <li><code>NONE</code></li>
118 * <li><code>NORMAL</code></li>
119 * <li><code>MED.H</code></li>
120 * <li><code>MED.L</code></li>
121 * </ul>
122 */
123 public static final int TAG_NIKON_TYPE2_CAMERA_SHARPENING = 0x0006;
124
125 /**
126 * The camera's auto-focus mode, as an uppercase string. Examples include:
127 *
128 * <ul>
129 * <li><code>AF-C</code></li>
130 * <li><code>AF-S</code></li>
131 * <li><code>MANUAL</code></li>
132 * <li><code>AF-A</code></li>
133 * </ul>
134 */
135 public static final int TAG_NIKON_TYPE2_AF_TYPE = 0x0007;
136
137 /**
138 * The camera's flash setting, as an uppercase string. Examples include:
139 *
140 * <ul>
141 * <li><code></code></li>
142 * <li><code>NORMAL</code></li>
143 * <li><code>RED-EYE</code></li>
144 * <li><code>SLOW</code></li>
145 * <li><code>NEW_TTL</code></li>
146 * <li><code>REAR</code></li>
147 * <li><code>REAR SLOW</code></li>
148 * </ul>
149 * Note: when TAG_NIKON_TYPE2_AUTO_FLASH_MODE is blank (whitespace), Nikon Browser displays "Flash Sync Mode: Not Attached"
150 */
151 public static final int TAG_NIKON_TYPE2_FLASH_SYNC_MODE = 0x0008;
152
153 /**
154 * The type of flash used in the photograph, as a string. Examples include:
155 *
156 * <ul>
157 * <li><code></code></li>
158 * <li><code>Built-in,TTL</code></li>
159 * <li><code>NEW_TTL</code> Nikon Browser interprets as "D-TTL"</li>
160 * <li><code>Built-in,M</code></li>
161 * <li><code>Optional,TTL</code> with speedlight SB800, flash sync mode as "NORMAL"</li>
162 * </ul>
163 */
164 public static final int TAG_NIKON_TYPE2_AUTO_FLASH_MODE = 0x0009;
165
166 /**
167 * An unknown tag, as a rational. Several values given here:
168 * http://gvsoft.homedns.org/exif/makernote-nikon-type2.html#0x000b
169 */
170 public static final int TAG_NIKON_TYPE2_UNKNOWN_34 = 0x000A;
171
172 /**
173 * The camera's white balance bias setting, as an uint16 array having either one or two elements.
174 *
175 * <ul>
176 * <li><code>0</code></li>
177 * <li><code>1</code></li>
178 * <li><code>-3</code></li>
179 * <li><code>-2</code></li>
180 * <li><code>-1</code></li>
181 * <li><code>0,0</code></li>
182 * <li><code>1,0</code></li>
183 * <li><code>5,-5</code></li>
184 * </ul>
185 */
186 public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE = 0x000B;
187
188 /**
189 * The first two numbers are coefficients to multiply red and blue channels according to white balance as set in the
190 * camera. The meaning of the third and the fourth numbers is unknown.
191 *
192 * Values observed
193 * - 2.25882352 1.76078431 0.0 0.0
194 * - 10242/1 34305/1 0/1 0/1
195 * - 234765625/100000000 1140625/1000000 1/1 1/1
196 */
197 public static final int TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_RB_COEFF = 0x000C;
198
199 /**
200 * The camera's program shift setting, as an array of four integers.
201 * The value, in EV, is calculated as <code>a*b/c</code>.
202 *
203 * <ul>
204 * <li><code>0,1,3,0</code> = 0 EV</li>
205 * <li><code>1,1,3,0</code> = 0.33 EV</li>
206 * <li><code>-3,1,3,0</code> = -1 EV</li>
207 * <li><code>1,1,2,0</code> = 0.5 EV</li>
208 * <li><code>2,1,6,0</code> = 0.33 EV</li>
209 * </ul>
210 */
211 public static final int TAG_NIKON_TYPE2_PROGRAM_SHIFT = 0x000D;
212
213 /**
214 * The exposure difference, as an array of four integers.
215 * The value, in EV, is calculated as <code>a*b/c</code>.
216 *
217 * <ul>
218 * <li><code>-105,1,12,0</code> = -8.75 EV</li>
219 * <li><code>-72,1,12,0</code> = -6.00 EV</li>
220 * <li><code>-11,1,12,0</code> = -0.92 EV</li>
221 * </ul>
222 */
223 public static final int TAG_NIKON_TYPE2_EXPOSURE_DIFFERENCE = 0x000E;
224
225 /**
226 * The camera's ISO mode, as an uppercase string.
227 *
228 * <ul>
229 * <li><code>AUTO</code></code></li>
230 * <li><code>MANUAL</code></li>
231 * </ul>
232 */
233 public static final int TAG_NIKON_TYPE2_ISO_MODE = 0x000F;
234
235 /**
236 * Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
237 */
238 public static final int TAG_NIKON_TYPE2_DATA_DUMP = 0x0010;
239
240 /**
241 * Preview to another IFD (?)
242 * <p/>
243 * Details here: http://gvsoft.homedns.org/exif/makernote-nikon-2-tag0x0011.html
244 * // TODO if this is another IFD, decode it
245 */
246 public static final int TAG_NIKON_TYPE2_PREVIEW_IFD = 0x0011;
247
248 /**
249 * The flash compensation, as an array of four integers.
250 * The value, in EV, is calculated as <code>a*b/c</code>.
251 *
252 * <ul>
253 * <li><code>-18,1,6,0</code> = -3 EV</li>
254 * <li><code>4,1,6,0</code> = 0.67 EV</li>
255 * <li><code>6,1,6,0</code> = 1 EV</li>
256 * </ul>
257 */
258 public static final int TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION = 0x0012;
259
260 /**
261 * The requested ISO value, as an array of two integers.
262 *
263 * <ul>
264 * <li><code>0,0</code></li>
265 * <li><code>0,125</code></li>
266 * <li><code>1,2500</code></li>
267 * </ul>
268 */
269 public static final int TAG_NIKON_TYPE2_ISO_REQUESTED = 0x0013;
270
271 /**
272 * Defines the photo corner coordinates, in 8 bytes. Treated as four 16-bit integers, they
273 * decode as: top-left (x,y); bot-right (x,y)
274 * - 0 0 49163 53255
275 * - 0 0 3008 2000 (the image dimensions were 3008x2000) (D70)
276 * <ul>
277 * <li><code>0,0,4288,2848</code> The max resolution of the D300 camera</li>
278 * <li><code>0,0,3008,2000</code> The max resolution of the D70 camera</li>
279 * <li><code>0,0,4256,2832</code> The max resolution of the D3 camera</li>
280 * </ul>
281 */
282 public static final int TAG_NIKON_TYPE2_IMAGE_BOUNDARY = 0x0016;
283
284 /**
285 * The flash exposure compensation, as an array of four integers.
286 * The value, in EV, is calculated as <code>a*b/c</code>.
287 *
288 * <ul>
289 * <li><code>0,0,0,0</code> = 0 EV</li>
290 * <li><code>0,1,6,0</code> = 0 EV</li>
291 * <li><code>4,1,6,0</code> = 0.67 EV</li>
292 * </ul>
293 */
294 public static final int TAG_NIKON_TYPE2_FLASH_EXPOSURE_COMPENSATION = 0x0017;
295
296 /**
297 * The flash bracket compensation, as an array of four integers.
298 * The value, in EV, is calculated as <code>a*b/c</code>.
299 *
300 * <ul>
301 * <li><code>0,0,0,0</code> = 0 EV</li>
302 * <li><code>0,1,6,0</code> = 0 EV</li>
303 * <li><code>4,1,6,0</code> = 0.67 EV</li>
304 * </ul>
305 */
306 public static final int TAG_NIKON_TYPE2_FLASH_BRACKET_COMPENSATION = 0x0018;
307
308 /**
309 * The AE bracket compensation, as a rational number.
310 *
311 * <ul>
312 * <li><code>0/0</code></li>
313 * <li><code>0/1</code></li>
314 * <li><code>0/6</code></li>
315 * <li><code>4/6</code></li>
316 * <li><code>6/6</code></li>
317 * </ul>
318 */
319 public static final int TAG_NIKON_TYPE2_AE_BRACKET_COMPENSATION = 0x0019;
320
321 /**
322 * Flash mode, as a string.
323 *
324 * <ul>
325 * <li><code></code></li>
326 * <li><code>Red Eye Reduction</code></li>
327 * <li><code>D-Lighting</code></li>
328 * <li><code>Distortion control</code></li>
329 * </ul>
330 */
331 public static final int TAG_NIKON_TYPE2_FLASH_MODE = 0x001a;
332
333 public static final int TAG_NIKON_TYPE2_CROP_HIGH_SPEED = 0x001b;
334 public static final int TAG_NIKON_TYPE2_EXPOSURE_TUNING = 0x001c;
335
336 /**
337 * The camera's serial number, as a string.
338 * Note that D200 is always blank, and D50 is always <code>"D50"</code>.
339 */
340 public static final int TAG_NIKON_TYPE2_CAMERA_SERIAL_NUMBER = 0x001d;
341
342 /**
343 * The camera's color space setting.
344 *
345 * <ul>
346 * <li><code>1</code> sRGB</li>
347 * <li><code>2</code> Adobe RGB</li>
348 * </ul>
349 */
350 public static final int TAG_NIKON_TYPE2_COLOR_SPACE = 0x001e;
351 public static final int TAG_NIKON_TYPE2_VR_INFO = 0x001f;
352 public static final int TAG_NIKON_TYPE2_IMAGE_AUTHENTICATION = 0x0020;
353 public static final int TAG_NIKON_TYPE2_UNKNOWN_35 = 0x0021;
354
355 /**
356 * The active D-Lighting setting.
357 *
358 * <ul>
359 * <li><code>0</code> Off</li>
360 * <li><code>1</code> Low</li>
361 * <li><code>3</code> Normal</li>
362 * <li><code>5</code> High</li>
363 * <li><code>7</code> Extra High</li>
364 * <li><code>65535</code> Auto</li>
365 * </ul>
366 */
367 public static final int TAG_NIKON_TYPE2_ACTIVE_D_LIGHTING = 0x0022;
368 public static final int TAG_NIKON_TYPE2_PICTURE_CONTROL = 0x0023;
369 public static final int TAG_NIKON_TYPE2_WORLD_TIME = 0x0024;
370 public static final int TAG_NIKON_TYPE2_ISO_INFO = 0x0025;
371 public static final int TAG_NIKON_TYPE2_UNKNOWN_36 = 0x0026;
372 public static final int TAG_NIKON_TYPE2_UNKNOWN_37 = 0x0027;
373 public static final int TAG_NIKON_TYPE2_UNKNOWN_38 = 0x0028;
374 public static final int TAG_NIKON_TYPE2_UNKNOWN_39 = 0x0029;
375
376 /**
377 * The camera's vignette control setting.
378 *
379 * <ul>
380 * <li><code>0</code> Off</li>
381 * <li><code>1</code> Low</li>
382 * <li><code>3</code> Normal</li>
383 * <li><code>5</code> High</li>
384 * </ul>
385 */
386 public static final int TAG_NIKON_TYPE2_VIGNETTE_CONTROL = 0x002a;
387 public static final int TAG_NIKON_TYPE2_UNKNOWN_40 = 0x002b;
388 public static final int TAG_NIKON_TYPE2_UNKNOWN_41 = 0x002c;
389 public static final int TAG_NIKON_TYPE2_UNKNOWN_42 = 0x002d;
390 public static final int TAG_NIKON_TYPE2_UNKNOWN_43 = 0x002e;
391 public static final int TAG_NIKON_TYPE2_UNKNOWN_44 = 0x002f;
392 public static final int TAG_NIKON_TYPE2_UNKNOWN_45 = 0x0030;
393 public static final int TAG_NIKON_TYPE2_UNKNOWN_46 = 0x0031;
394
395 /**
396 * The camera's image adjustment setting, as a string.
397 *
398 * <ul>
399 * <li><code>AUTO</code></li>
400 * <li><code>CONTRAST(+)</code></li>
401 * <li><code>CONTRAST(-)</code></li>
402 * <li><code>NORMAL</code></li>
403 * <li><code>B & W</code></li>
404 * <li><code>BRIGHTNESS(+)</code></li>
405 * <li><code>BRIGHTNESS(-)</code></li>
406 * <li><code>SEPIA</code></li>
407 * </ul>
408 */
409 public static final int TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT = 0x0080;
410
411 /**
412 * The camera's tone compensation setting, as a string.
413 *
414 * <ul>
415 * <li><code>NORMAL</code></li>
416 * <li><code>LOW</code></li>
417 * <li><code>MED.L</code></li>
418 * <li><code>MED.H</code></li>
419 * <li><code>HIGH</code></li>
420 * <li><code>AUTO</code></li>
421 * </ul>
422 */
423 public static final int TAG_NIKON_TYPE2_CAMERA_TONE_COMPENSATION = 0x0081;
424
425 /**
426 * A description of any auxiliary lens, as a string.
427 *
428 * <ul>
429 * <li><code>OFF</code></li>
430 * <li><code>FISHEYE 1</code></li>
431 * <li><code>FISHEYE 2</code></li>
432 * <li><code>TELEPHOTO 2</code></li>
433 * <li><code>WIDE ADAPTER</code></li>
434 * </ul>
435 */
436 public static final int TAG_NIKON_TYPE2_ADAPTER = 0x0082;
437
438 /**
439 * The type of lens used, as a byte.
440 *
441 * <ul>
442 * <li><code>0x00</code> AF</li>
443 * <li><code>0x01</code> MF</li>
444 * <li><code>0x02</code> D</li>
445 * <li><code>0x06</code> G, D</li>
446 * <li><code>0x08</code> VR</li>
447 * <li><code>0x0a</code> VR, D</li>
448 * <li><code>0x0e</code> VR, G, D</li>
449 * </ul>
450 */
451 public static final int TAG_NIKON_TYPE2_LENS_TYPE = 0x0083;
452
453 /**
454 * A pair of focal/max-fstop values that describe the lens used.
455 *
456 * Values observed
457 * - 180.0,180.0,2.8,2.8 (D100)
458 * - 240/10 850/10 35/10 45/10
459 * - 18-70mm f/3.5-4.5 (D70)
460 * - 17-35mm f/2.8-2.8 (D1X)
461 * - 70-200mm f/2.8-2.8 (D70)
462 *
463 * Nikon Browser identifies the lens as "18-70mm F/3.5-4.5 G" which
464 * is identical to metadata extractor, except for the "G". This must
465 * be coming from another tag...
466 */
467 public static final int TAG_NIKON_TYPE2_LENS = 0x0084;
468
469 /**
470 * Added during merge of Type2 & Type3. May apply to earlier models, such as E990 and D1.
471 */
472 public static final int TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE = 0x0085;
473
474 /**
475 * The amount of digital zoom used.
476 */
477 public static final int TAG_NIKON_TYPE2_DIGITAL_ZOOM = 0x0086;
478
479 /**
480 * Whether the flash was used in this image.
481 *
482 * <ul>
483 * <li><code>0</code> Flash Not Used</li>
484 * <li><code>1</code> Manual Flash</li>
485 * <li><code>3</code> Flash Not Ready</li>
486 * <li><code>7</code> External Flash</li>
487 * <li><code>8</code> Fired, Commander Mode</li>
488 * <li><code>9</code> Fired, TTL Mode</li>
489 * </ul>
490 */
491 public static final int TAG_NIKON_TYPE2_FLASH_USED = 0x0087;
492
493 /**
494 * The position of the autofocus target.
495 */
496 public static final int TAG_NIKON_TYPE2_AF_FOCUS_POSITION = 0x0088;
497
498 /**
499 * The camera's shooting mode.
500 * <p/>
501 * A bit-array with:
502 * <ul>
503 * <li><code>0</code> Single Frame</li>
504 * <li><code>1</code> Continuous</li>
505 * <li><code>2</code> Delay</li>
506 * <li><code>8</code> PC Control</li>
507 * <li><code>16</code> Exposure Bracketing</li>
508 * <li><code>32</code> Auto ISO</li>
509 * <li><code>64</code> White-Balance Bracketing</li>
510 * <li><code>128</code> IR Control</li>
511 * </ul>
512 */
513 public static final int TAG_NIKON_TYPE2_SHOOTING_MODE = 0x0089;
514
515 public static final int TAG_NIKON_TYPE2_UNKNOWN_20 = 0x008A;
516
517 /**
518 * Lens stops, as an array of four integers.
519 * The value, in EV, is calculated as <code>a*b/c</code>.
520 *
521 * <ul>
522 * <li><code>64,1,12,0</code> = 5.33 EV</li>
523 * <li><code>72,1,12,0</code> = 6 EV</li>
524 * </ul>
525 */
526 public static final int TAG_NIKON_TYPE2_LENS_STOPS = 0x008B;
527
528 public static final int TAG_NIKON_TYPE2_CONTRAST_CURVE = 0x008C;
529
530 /**
531 * The color space as set in the camera, as a string.
532 *
533 * <ul>
534 * <li><code>MODE1</code> = Mode 1 (sRGB)</li>
535 * <li><code>MODE1a</code> = Mode 1 (sRGB)</li>
536 * <li><code>MODE2</code> = Mode 2 (Adobe RGB)</li>
537 * <li><code>MODE3</code> = Mode 2 (sRGB): Higher Saturation</li>
538 * <li><code>MODE3a</code> = Mode 2 (sRGB): Higher Saturation</li>
539 * <li><code>B & W</code> = B & W</li>
540 * </ul>
541 */
542 public static final int TAG_NIKON_TYPE2_CAMERA_COLOR_MODE = 0x008D;
543 public static final int TAG_NIKON_TYPE2_UNKNOWN_47 = 0x008E;
544
545 /**
546 * The camera's scene mode, as a string. Examples include:
547 * <ul>
548 * <li><code>BEACH/SNOW</code></li>
549 * <li><code>CLOSE UP</code></li>
550 * <li><code>NIGHT PORTRAIT</code></li>
551 * <li><code>PORTRAIT</code></li>
552 * <li><code>ANTI-SHAKE</code></li>
553 * <li><code>BACK LIGHT</code></li>
554 * <li><code>BEST FACE</code></li>
555 * <li><code>BEST</code></li>
556 * <li><code>COPY</code></li>
557 * <li><code>DAWN/DUSK</code></li>
558 * <li><code>FACE-PRIORITY</code></li>
559 * <li><code>FIREWORKS</code></li>
560 * <li><code>FOOD</code></li>
561 * <li><code>HIGH SENS.</code></li>
562 * <li><code>LAND SCAPE</code></li>
563 * <li><code>MUSEUM</code></li>
564 * <li><code>PANORAMA ASSIST</code></li>
565 * <li><code>PARTY/INDOOR</code></li>
566 * <li><code>SCENE AUTO</code></li>
567 * <li><code>SMILE</code></li>
568 * <li><code>SPORT</code></li>
569 * <li><code>SPORT CONT.</code></li>
570 * <li><code>SUNSET</code></li>
571 * </ul>
572 */
573 public static final int TAG_NIKON_TYPE2_SCENE_MODE = 0x008F;
574
575 /**
576 * The lighting type, as a string. Examples include:
577 * <ul>
578 * <li><code></code></li>
579 * <li><code>NATURAL</code></li>
580 * <li><code>SPEEDLIGHT</code></li>
581 * <li><code>COLORED</code></li>
582 * <li><code>MIXED</code></li>
583 * <li><code>NORMAL</code></li>
584 * </ul>
585 */
586 public static final int TAG_NIKON_TYPE2_LIGHT_SOURCE = 0x0090;
587
588 /**
589 * Advertised as ASCII, but actually isn't. A variable number of bytes (eg. 18 to 533). Actual number of bytes
590 * appears fixed for a given camera model.
591 */
592 public static final int TAG_NIKON_TYPE2_SHOT_INFO = 0x0091;
593
594 /**
595 * The hue adjustment as set in the camera. Values observed are either 0 or 3.
596 */
597 public static final int TAG_NIKON_TYPE2_CAMERA_HUE_ADJUSTMENT = 0x0092;
598 /**
599 * The NEF (RAW) compression. Examples include:
600 * <ul>
601 * <li><code>1</code> Lossy (Type 1)</li>
602 * <li><code>2</code> Uncompressed</li>
603 * <li><code>3</code> Lossless</li>
604 * <li><code>4</code> Lossy (Type 2)</li>
605 * </ul>
606 */
607 public static final int TAG_NIKON_TYPE2_NEF_COMPRESSION = 0x0093;
608
609 /**
610 * The saturation level, as a signed integer. Examples include:
611 * <ul>
612 * <li><code>+3</code></li>
613 * <li><code>+2</code></li>
614 * <li><code>+1</code></li>
615 * <li><code>0</code> Normal</li>
616 * <li><code>-1</code></li>
617 * <li><code>-2</code></li>
618 * <li><code>-3</code> (B&W)</li>
619 * </ul>
620 */
621 public static final int TAG_NIKON_TYPE2_SATURATION = 0x0094;
622
623 /**
624 * The type of noise reduction, as a string. Examples include:
625 * <ul>
626 * <li><code>OFF</code></li>
627 * <li><code>FPNR</code></li>
628 * </ul>
629 */
630 public static final int TAG_NIKON_TYPE2_NOISE_REDUCTION = 0x0095;
631 public static final int TAG_NIKON_TYPE2_LINEARIZATION_TABLE = 0x0096;
632 public static final int TAG_NIKON_TYPE2_COLOR_BALANCE = 0x0097;
633 public static final int TAG_NIKON_TYPE2_LENS_DATA = 0x0098;
634
635 /** The NEF (RAW) thumbnail size, as an integer array with two items representing [width,height]. */
636 public static final int TAG_NIKON_TYPE2_NEF_THUMBNAIL_SIZE = 0x0099;
637
638 /** The sensor pixel size, as a pair of rational numbers. */
639 public static final int TAG_NIKON_TYPE2_SENSOR_PIXEL_SIZE = 0x009A;
640 public static final int TAG_NIKON_TYPE2_UNKNOWN_10 = 0x009B;
641 public static final int TAG_NIKON_TYPE2_SCENE_ASSIST = 0x009C;
642 public static final int TAG_NIKON_TYPE2_UNKNOWN_11 = 0x009D;
643 public static final int TAG_NIKON_TYPE2_RETOUCH_HISTORY = 0x009E;
644 public static final int TAG_NIKON_TYPE2_UNKNOWN_12 = 0x009F;
645
646 /**
647 * The camera serial number, as a string.
648 * <ul>
649 * <li><code>NO= 00002539</code></li>
650 * <li><code>NO= -1000d71</code></li>
651 * <li><code>PKG597230621263</code></li>
652 * <li><code>PKG5995671330625116</code></li>
653 * <li><code>PKG49981281631130677</code></li>
654 * <li><code>BU672230725063</code></li>
655 * <li><code>NO= 200332c7</code></li>
656 * <li><code>NO= 30045efe</code></li>
657 * </ul>
658 */
659 public static final int TAG_NIKON_TYPE2_CAMERA_SERIAL_NUMBER_2 = 0x00A0;
660
661 public static final int TAG_NIKON_TYPE2_IMAGE_DATA_SIZE = 0x00A2;
662
663 public static final int TAG_NIKON_TYPE2_UNKNOWN_27 = 0x00A3;
664 public static final int TAG_NIKON_TYPE2_UNKNOWN_28 = 0x00A4;
665 public static final int TAG_NIKON_TYPE2_IMAGE_COUNT = 0x00A5;
666 public static final int TAG_NIKON_TYPE2_DELETED_IMAGE_COUNT = 0x00A6;
667
668 /** The number of total shutter releases. This value increments for each exposure (observed on D70). */
669 public static final int TAG_NIKON_TYPE2_EXPOSURE_SEQUENCE_NUMBER = 0x00A7;
670
671 public static final int TAG_NIKON_TYPE2_FLASH_INFO = 0x00A8;
672 /**
673 * The camera's image optimisation, as a string.
674 * <ul>
675 * <li><code></code></li>
676 * <li><code>NORMAL</code></li>
677 * <li><code>CUSTOM</code></li>
678 * <li><code>BLACK AND WHITE</code></li>
679 * <li><code>LAND SCAPE</code></li>
680 * <li><code>MORE VIVID</code></li>
681 * <li><code>PORTRAIT</code></li>
682 * <li><code>SOFT</code></li>
683 * <li><code>VIVID</code></li>
684 * </ul>
685 */
686 public static final int TAG_NIKON_TYPE2_IMAGE_OPTIMISATION = 0x00A9;
687
688 /**
689 * The camera's saturation level, as a string.
690 * <ul>
691 * <li><code></code></li>
692 * <li><code>NORMAL</code></li>
693 * <li><code>AUTO</code></li>
694 * <li><code>ENHANCED</code></li>
695 * <li><code>MODERATE</code></li>
696 * </ul>
697 */
698 public static final int TAG_NIKON_TYPE2_SATURATION_2 = 0x00AA;
699
700 /**
701 * The camera's digital vari-program setting, as a string.
702 * <ul>
703 * <li><code></code></li>
704 * <li><code>AUTO</code></li>
705 * <li><code>AUTO(FLASH OFF)</code></li>
706 * <li><code>CLOSE UP</code></li>
707 * <li><code>LANDSCAPE</code></li>
708 * <li><code>NIGHT PORTRAIT</code></li>
709 * <li><code>PORTRAIT</code></li>
710 * <li><code>SPORT</code></li>
711 * </ul>
712 */
713 public static final int TAG_NIKON_TYPE2_DIGITAL_VARI_PROGRAM = 0x00AB;
714
715 /**
716 * The camera's digital vari-program setting, as a string.
717 * <ul>
718 * <li><code></code></li>
719 * <li><code>VR-ON</code></li>
720 * <li><code>VR-OFF</code></li>
721 * <li><code>VR-HYBRID</code></li>
722 * <li><code>VR-ACTIVE</code></li>
723 * </ul>
724 */
725 public static final int TAG_NIKON_TYPE2_IMAGE_STABILISATION = 0x00AC;
726
727 /**
728 * The camera's digital vari-program setting, as a string.
729 * <ul>
730 * <li><code></code></li>
731 * <li><code>HYBRID</code></li>
732 * <li><code>STANDARD</code></li>
733 * </ul>
734 */
735 public static final int TAG_NIKON_TYPE2_AF_RESPONSE = 0x00AD;
736 public static final int TAG_NIKON_TYPE2_UNKNOWN_29 = 0x00AE;
737 public static final int TAG_NIKON_TYPE2_UNKNOWN_30 = 0x00AF;
738 public static final int TAG_NIKON_TYPE2_MULTI_EXPOSURE = 0x00B0;
739
740 /**
741 * The camera's high ISO noise reduction setting, as an integer.
742 * <ul>
743 * <li><code>0</code> Off</li>
744 * <li><code>1</code> Minimal</li>
745 * <li><code>2</code> Low</li>
746 * <li><code>4</code> Normal</li>
747 * <li><code>6</code> High</li>
748 * </ul>
749 */
750 public static final int TAG_NIKON_TYPE2_HIGH_ISO_NOISE_REDUCTION = 0x00B1;
751 public static final int TAG_NIKON_TYPE2_UNKNOWN_31 = 0x00B2;
752 public static final int TAG_NIKON_TYPE2_UNKNOWN_32 = 0x00B3;
753 public static final int TAG_NIKON_TYPE2_UNKNOWN_33 = 0x00B4;
754 public static final int TAG_NIKON_TYPE2_UNKNOWN_48 = 0x00B5;
755 public static final int TAG_NIKON_TYPE2_POWER_UP_TIME = 0x00B6;
756 public static final int TAG_NIKON_TYPE2_AF_INFO_2 = 0x00B7;
757 public static final int TAG_NIKON_TYPE2_FILE_INFO = 0x00B8;
758 public static final int TAG_NIKON_TYPE2_AF_TUNE = 0x00B9;
759 public static final int TAG_NIKON_TYPE2_UNKNOWN_49 = 0x00BB;
760 public static final int TAG_NIKON_TYPE2_UNKNOWN_50 = 0x00BD;
761 public static final int TAG_NIKON_TYPE2_UNKNOWN_51 = 0x0103;
762 public static final int TAG_NIKON_TYPE2_PRINT_IM = 0x0E00;
763
764 /**
765 * Data about changes set by Nikon Capture Editor.
766 *
767 * Values observed
768 */
769 public static final int TAG_NIKON_TYPE2_NIKON_CAPTURE_DATA = 0x0E01;
770 public static final int TAG_NIKON_TYPE2_UNKNOWN_52 = 0x0E05;
771 public static final int TAG_NIKON_TYPE2_UNKNOWN_53 = 0x0E08;
772 public static final int TAG_NIKON_TYPE2_NIKON_CAPTURE_VERSION = 0x0E09;
773 public static final int TAG_NIKON_TYPE2_NIKON_CAPTURE_OFFSETS = 0x0E0E;
774 public static final int TAG_NIKON_TYPE2_NIKON_SCAN = 0x0E10;
775 public static final int TAG_NIKON_TYPE2_UNKNOWN_54 = 0x0E19;
776 public static final int TAG_NIKON_TYPE2_NEF_BIT_DEPTH = 0x0E22;
777 public static final int TAG_NIKON_TYPE2_UNKNOWN_55 = 0x0E23;
778
779 @NotNull
780 protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
781
782 static
783 {
784 _tagNameMap.put(TAG_NIKON_TYPE2_FIRMWARE_VERSION, "Firmware Version");
785 _tagNameMap.put(TAG_NIKON_TYPE2_ISO_1, "ISO");
786 _tagNameMap.put(TAG_NIKON_TYPE2_QUALITY_AND_FILE_FORMAT, "Quality & File Format");
787 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE, "White Balance");
788 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_SHARPENING, "Sharpening");
789 _tagNameMap.put(TAG_NIKON_TYPE2_AF_TYPE, "AF Type");
790 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_FINE, "White Balance Fine");
791 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_WHITE_BALANCE_RB_COEFF, "White Balance RB Coefficients");
792 _tagNameMap.put(TAG_NIKON_TYPE2_ISO_REQUESTED, "ISO");
793 _tagNameMap.put(TAG_NIKON_TYPE2_ISO_MODE, "ISO Mode");
794 _tagNameMap.put(TAG_NIKON_TYPE2_DATA_DUMP, "Data Dump");
795
796 _tagNameMap.put(TAG_NIKON_TYPE2_PROGRAM_SHIFT, "Program Shift");
797 _tagNameMap.put(TAG_NIKON_TYPE2_EXPOSURE_DIFFERENCE, "Exposure Difference");
798 _tagNameMap.put(TAG_NIKON_TYPE2_PREVIEW_IFD, "Preview IFD");
799 _tagNameMap.put(TAG_NIKON_TYPE2_LENS_TYPE, "Lens Type");
800 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_USED, "Flash Used");
801 _tagNameMap.put(TAG_NIKON_TYPE2_AF_FOCUS_POSITION, "AF Focus Position");
802 _tagNameMap.put(TAG_NIKON_TYPE2_SHOOTING_MODE, "Shooting Mode");
803 _tagNameMap.put(TAG_NIKON_TYPE2_LENS_STOPS, "Lens Stops");
804 _tagNameMap.put(TAG_NIKON_TYPE2_CONTRAST_CURVE, "Contrast Curve");
805 _tagNameMap.put(TAG_NIKON_TYPE2_LIGHT_SOURCE, "Light source");
806 _tagNameMap.put(TAG_NIKON_TYPE2_SHOT_INFO, "Shot Info");
807 _tagNameMap.put(TAG_NIKON_TYPE2_COLOR_BALANCE, "Color Balance");
808 _tagNameMap.put(TAG_NIKON_TYPE2_LENS_DATA, "Lens Data");
809 _tagNameMap.put(TAG_NIKON_TYPE2_NEF_THUMBNAIL_SIZE, "NEF Thumbnail Size");
810 _tagNameMap.put(TAG_NIKON_TYPE2_SENSOR_PIXEL_SIZE, "Sensor Pixel Size");
811 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_10, "Unknown 10");
812 _tagNameMap.put(TAG_NIKON_TYPE2_SCENE_ASSIST, "Scene Assist");
813 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_11, "Unknown 11");
814 _tagNameMap.put(TAG_NIKON_TYPE2_RETOUCH_HISTORY, "Retouch History");
815 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_12, "Unknown 12");
816 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_SYNC_MODE, "Flash Sync Mode");
817 _tagNameMap.put(TAG_NIKON_TYPE2_AUTO_FLASH_MODE, "Auto Flash Mode");
818 _tagNameMap.put(TAG_NIKON_TYPE2_AUTO_FLASH_COMPENSATION, "Auto Flash Compensation");
819 _tagNameMap.put(TAG_NIKON_TYPE2_EXPOSURE_SEQUENCE_NUMBER, "Exposure Sequence Number");
820 _tagNameMap.put(TAG_NIKON_TYPE2_COLOR_MODE, "Color Mode");
821
822 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_20, "Unknown 20");
823 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_BOUNDARY, "Image Boundary");
824 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_EXPOSURE_COMPENSATION, "Flash Exposure Compensation");
825 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_BRACKET_COMPENSATION, "Flash Bracket Compensation");
826 _tagNameMap.put(TAG_NIKON_TYPE2_AE_BRACKET_COMPENSATION, "AE Bracket Compensation");
827 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_MODE, "Flash Mode");
828 _tagNameMap.put(TAG_NIKON_TYPE2_CROP_HIGH_SPEED, "Crop High Speed");
829 _tagNameMap.put(TAG_NIKON_TYPE2_EXPOSURE_TUNING, "Exposure Tuning");
830 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_SERIAL_NUMBER, "Camera Serial Number");
831 _tagNameMap.put(TAG_NIKON_TYPE2_COLOR_SPACE, "Color Space");
832 _tagNameMap.put(TAG_NIKON_TYPE2_VR_INFO, "VR Info");
833 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_AUTHENTICATION, "Image Authentication");
834 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_35, "Unknown 35");
835 _tagNameMap.put(TAG_NIKON_TYPE2_ACTIVE_D_LIGHTING, "Active D-Lighting");
836 _tagNameMap.put(TAG_NIKON_TYPE2_PICTURE_CONTROL, "Picture Control");
837 _tagNameMap.put(TAG_NIKON_TYPE2_WORLD_TIME, "World Time");
838 _tagNameMap.put(TAG_NIKON_TYPE2_ISO_INFO, "ISO Info");
839 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_36, "Unknown 36");
840 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_37, "Unknown 37");
841 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_38, "Unknown 38");
842 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_39, "Unknown 39");
843 _tagNameMap.put(TAG_NIKON_TYPE2_VIGNETTE_CONTROL, "Vignette Control");
844 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_40, "Unknown 40");
845 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_41, "Unknown 41");
846 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_42, "Unknown 42");
847 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_43, "Unknown 43");
848 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_44, "Unknown 44");
849 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_45, "Unknown 45");
850 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_46, "Unknown 46");
851 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_47, "Unknown 47");
852 _tagNameMap.put(TAG_NIKON_TYPE2_SCENE_MODE, "Scene Mode");
853
854 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_SERIAL_NUMBER_2, "Camera Serial Number");
855 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_DATA_SIZE, "Image Data Size");
856 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_27, "Unknown 27");
857 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_28, "Unknown 28");
858 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_COUNT, "Image Count");
859 _tagNameMap.put(TAG_NIKON_TYPE2_DELETED_IMAGE_COUNT, "Deleted Image Count");
860 _tagNameMap.put(TAG_NIKON_TYPE2_SATURATION_2, "Saturation");
861 _tagNameMap.put(TAG_NIKON_TYPE2_DIGITAL_VARI_PROGRAM, "Digital Vari Program");
862 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_STABILISATION, "Image Stabilisation");
863 _tagNameMap.put(TAG_NIKON_TYPE2_AF_RESPONSE, "AF Response");
864 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_29, "Unknown 29");
865 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_30, "Unknown 30");
866 _tagNameMap.put(TAG_NIKON_TYPE2_MULTI_EXPOSURE, "Multi Exposure");
867 _tagNameMap.put(TAG_NIKON_TYPE2_HIGH_ISO_NOISE_REDUCTION, "High ISO Noise Reduction");
868 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_31, "Unknown 31");
869 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_32, "Unknown 32");
870 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_33, "Unknown 33");
871 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_48, "Unknown 48");
872 _tagNameMap.put(TAG_NIKON_TYPE2_POWER_UP_TIME, "Power Up Time");
873 _tagNameMap.put(TAG_NIKON_TYPE2_AF_INFO_2, "AF Info 2");
874 _tagNameMap.put(TAG_NIKON_TYPE2_FILE_INFO, "File Info");
875 _tagNameMap.put(TAG_NIKON_TYPE2_AF_TUNE, "AF Tune");
876 _tagNameMap.put(TAG_NIKON_TYPE2_FLASH_INFO, "Flash Info");
877 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_OPTIMISATION, "Image Optimisation");
878
879 _tagNameMap.put(TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT, "Image Adjustment");
880 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_TONE_COMPENSATION, "Tone Compensation");
881 _tagNameMap.put(TAG_NIKON_TYPE2_ADAPTER, "Adapter");
882 _tagNameMap.put(TAG_NIKON_TYPE2_LENS, "Lens");
883 _tagNameMap.put(TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE, "Manual Focus Distance");
884 _tagNameMap.put(TAG_NIKON_TYPE2_DIGITAL_ZOOM, "Digital Zoom");
885 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_COLOR_MODE, "Colour Mode");
886 _tagNameMap.put(TAG_NIKON_TYPE2_CAMERA_HUE_ADJUSTMENT, "Camera Hue Adjustment");
887 _tagNameMap.put(TAG_NIKON_TYPE2_NEF_COMPRESSION, "NEF Compression");
888 _tagNameMap.put(TAG_NIKON_TYPE2_SATURATION, "Saturation");
889 _tagNameMap.put(TAG_NIKON_TYPE2_NOISE_REDUCTION, "Noise Reduction");
890 _tagNameMap.put(TAG_NIKON_TYPE2_LINEARIZATION_TABLE, "Linearization Table");
891 _tagNameMap.put(TAG_NIKON_TYPE2_NIKON_CAPTURE_DATA, "Nikon Capture Data");
892 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_49, "Unknown 49");
893 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_50, "Unknown 50");
894 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_51, "Unknown 51");
895 _tagNameMap.put(TAG_NIKON_TYPE2_PRINT_IM, "Print IM");
896 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_52, "Unknown 52");
897 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_53, "Unknown 53");
898 _tagNameMap.put(TAG_NIKON_TYPE2_NIKON_CAPTURE_VERSION, "Nikon Capture Version");
899 _tagNameMap.put(TAG_NIKON_TYPE2_NIKON_CAPTURE_OFFSETS, "Nikon Capture Offsets");
900 _tagNameMap.put(TAG_NIKON_TYPE2_NIKON_SCAN, "Nikon Scan");
901 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_54, "Unknown 54");
902 _tagNameMap.put(TAG_NIKON_TYPE2_NEF_BIT_DEPTH, "NEF Bit Depth");
903 _tagNameMap.put(TAG_NIKON_TYPE2_UNKNOWN_55, "Unknown 55");
904 }
905
906 public NikonType2MakernoteDirectory()
907 {
908 this.setDescriptor(new NikonType2MakernoteDescriptor(this));
909 }
910
911 @NotNull
912 public String getName()
913 {
914 return "Nikon Makernote";
915 }
916
917 @NotNull
918 protected HashMap<Integer, String> getTagNameMap()
919 {
920 return _tagNameMap;
921 }
922}
Note: See TracBrowser for help on using the repository browser.