source: josm/trunk/src/com/drew/metadata/exif/NikonType1MakernoteDirectory.java@ 7152

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

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

File size: 3.6 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 1) cameras. Type-1 is for E-Series cameras prior to (not including) E990.
30 *
31 * There are 3 formats of Nikon's MakerNote. MakerNote of E700/E800/E900/E900S/E910/E950
32 * starts from ASCII string "Nikon". Data format is the same as IFD, but it starts from
33 * offset 0x08. This is the same as Olympus except start string. Example of actual data
34 * structure is shown below.
35 * <pre><code>
36 * :0000: 4E 69 6B 6F 6E 00 01 00-05 00 02 00 02 00 06 00 Nikon...........
37 * :0010: 00 00 EC 02 00 00 03 00-03 00 01 00 00 00 06 00 ................
38 * </code></pre>
39 *
40 * @author Drew Noakes http://drewnoakes.com
41 */
42public class NikonType1MakernoteDirectory extends Directory
43{
44 public static final int TAG_NIKON_TYPE1_UNKNOWN_1 = 0x0002;
45 public static final int TAG_NIKON_TYPE1_QUALITY = 0x0003;
46 public static final int TAG_NIKON_TYPE1_COLOR_MODE = 0x0004;
47 public static final int TAG_NIKON_TYPE1_IMAGE_ADJUSTMENT = 0x0005;
48 public static final int TAG_NIKON_TYPE1_CCD_SENSITIVITY = 0x0006;
49 public static final int TAG_NIKON_TYPE1_WHITE_BALANCE = 0x0007;
50 public static final int TAG_NIKON_TYPE1_FOCUS = 0x0008;
51 public static final int TAG_NIKON_TYPE1_UNKNOWN_2 = 0x0009;
52 public static final int TAG_NIKON_TYPE1_DIGITAL_ZOOM = 0x000A;
53 public static final int TAG_NIKON_TYPE1_CONVERTER = 0x000B;
54 public static final int TAG_NIKON_TYPE1_UNKNOWN_3 = 0x0F00;
55
56 @NotNull
57 protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
58
59 static
60 {
61 _tagNameMap.put(TAG_NIKON_TYPE1_CCD_SENSITIVITY, "CCD Sensitivity");
62 _tagNameMap.put(TAG_NIKON_TYPE1_COLOR_MODE, "Color Mode");
63 _tagNameMap.put(TAG_NIKON_TYPE1_DIGITAL_ZOOM, "Digital Zoom");
64 _tagNameMap.put(TAG_NIKON_TYPE1_CONVERTER, "Fisheye Converter");
65 _tagNameMap.put(TAG_NIKON_TYPE1_FOCUS, "Focus");
66 _tagNameMap.put(TAG_NIKON_TYPE1_IMAGE_ADJUSTMENT, "Image Adjustment");
67 _tagNameMap.put(TAG_NIKON_TYPE1_QUALITY, "Quality");
68 _tagNameMap.put(TAG_NIKON_TYPE1_UNKNOWN_1, "Makernote Unknown 1");
69 _tagNameMap.put(TAG_NIKON_TYPE1_UNKNOWN_2, "Makernote Unknown 2");
70 _tagNameMap.put(TAG_NIKON_TYPE1_UNKNOWN_3, "Makernote Unknown 3");
71 _tagNameMap.put(TAG_NIKON_TYPE1_WHITE_BALANCE, "White Balance");
72 }
73
74 public NikonType1MakernoteDirectory()
75 {
76 this.setDescriptor(new NikonType1MakernoteDescriptor(this));
77 }
78
79 @NotNull
80 public String getName()
81 {
82 return "Nikon Makernote";
83 }
84
85 @NotNull
86 protected HashMap<Integer, String> getTagNameMap()
87 {
88 return _tagNameMap;
89 }
90}
Note: See TracBrowser for help on using the repository browser.