1 | /*
|
---|
2 | * Copyright 2002-2015 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 | * https://drewnoakes.com/code/exif/
|
---|
19 | * https://github.com/drewnoakes/metadata-extractor
|
---|
20 | */
|
---|
21 | package com.drew.metadata.exif.makernotes;
|
---|
22 |
|
---|
23 | import com.drew.lang.annotations.NotNull;
|
---|
24 | import com.drew.metadata.Directory;
|
---|
25 |
|
---|
26 | import java.util.HashMap;
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Describes tags specific to Fujifilm cameras.
|
---|
30 | *
|
---|
31 | * @author Drew Noakes https://drewnoakes.com
|
---|
32 | */
|
---|
33 | public class FujifilmMakernoteDirectory extends Directory
|
---|
34 | {
|
---|
35 | public static final int TAG_MAKERNOTE_VERSION = 0x0000;
|
---|
36 | public static final int TAG_SERIAL_NUMBER = 0x0010;
|
---|
37 |
|
---|
38 | public static final int TAG_QUALITY = 0x1000;
|
---|
39 | public static final int TAG_SHARPNESS = 0x1001;
|
---|
40 | public static final int TAG_WHITE_BALANCE = 0x1002;
|
---|
41 | public static final int TAG_COLOR_SATURATION = 0x1003;
|
---|
42 | public static final int TAG_TONE = 0x1004;
|
---|
43 | public static final int TAG_COLOR_TEMPERATURE = 0x1005;
|
---|
44 | public static final int TAG_CONTRAST = 0x1006;
|
---|
45 |
|
---|
46 | public static final int TAG_WHITE_BALANCE_FINE_TUNE = 0x100a;
|
---|
47 | public static final int TAG_NOISE_REDUCTION = 0x100b;
|
---|
48 | public static final int TAG_HIGH_ISO_NOISE_REDUCTION = 0x100e;
|
---|
49 |
|
---|
50 | public static final int TAG_FLASH_MODE = 0x1010;
|
---|
51 | public static final int TAG_FLASH_EV = 0x1011;
|
---|
52 |
|
---|
53 | public static final int TAG_MACRO = 0x1020;
|
---|
54 | public static final int TAG_FOCUS_MODE = 0x1021;
|
---|
55 | public static final int TAG_FOCUS_PIXEL = 0x1023;
|
---|
56 |
|
---|
57 | public static final int TAG_SLOW_SYNC = 0x1030;
|
---|
58 | public static final int TAG_PICTURE_MODE = 0x1031;
|
---|
59 | public static final int TAG_EXR_AUTO = 0x1033;
|
---|
60 | public static final int TAG_EXR_MODE = 0x1034;
|
---|
61 |
|
---|
62 | public static final int TAG_AUTO_BRACKETING = 0x1100;
|
---|
63 | public static final int TAG_SEQUENCE_NUMBER = 0x1101;
|
---|
64 |
|
---|
65 | public static final int TAG_FINE_PIX_COLOR = 0x1210;
|
---|
66 |
|
---|
67 | public static final int TAG_BLUR_WARNING = 0x1300;
|
---|
68 | public static final int TAG_FOCUS_WARNING = 0x1301;
|
---|
69 | public static final int TAG_AUTO_EXPOSURE_WARNING = 0x1302;
|
---|
70 | public static final int TAG_GE_IMAGE_SIZE = 0x1304;
|
---|
71 |
|
---|
72 | public static final int TAG_DYNAMIC_RANGE = 0x1400;
|
---|
73 | public static final int TAG_FILM_MODE = 0x1401;
|
---|
74 | public static final int TAG_DYNAMIC_RANGE_SETTING = 0x1402;
|
---|
75 | public static final int TAG_DEVELOPMENT_DYNAMIC_RANGE = 0x1403;
|
---|
76 | public static final int TAG_MIN_FOCAL_LENGTH = 0x1404;
|
---|
77 | public static final int TAG_MAX_FOCAL_LENGTH = 0x1405;
|
---|
78 | public static final int TAG_MAX_APERTURE_AT_MIN_FOCAL = 0x1406;
|
---|
79 | public static final int TAG_MAX_APERTURE_AT_MAX_FOCAL = 0x1407;
|
---|
80 |
|
---|
81 | public static final int TAG_AUTO_DYNAMIC_RANGE = 0x140b;
|
---|
82 |
|
---|
83 | public static final int TAG_FACES_DETECTED = 0x4100;
|
---|
84 | /**
|
---|
85 | * Left, top, right and bottom coordinates in full-sized image for each face detected.
|
---|
86 | */
|
---|
87 | public static final int TAG_FACE_POSITIONS = 0x4103;
|
---|
88 | public static final int TAG_FACE_REC_INFO = 0x4282;
|
---|
89 |
|
---|
90 | public static final int TAG_FILE_SOURCE = 0x8000;
|
---|
91 | public static final int TAG_ORDER_NUMBER = 0x8002;
|
---|
92 | public static final int TAG_FRAME_NUMBER = 0x8003;
|
---|
93 |
|
---|
94 | public static final int TAG_PARALLAX = 0xb211;
|
---|
95 |
|
---|
96 | @NotNull
|
---|
97 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
---|
98 |
|
---|
99 | static
|
---|
100 | {
|
---|
101 | _tagNameMap.put(TAG_MAKERNOTE_VERSION, "Makernote Version");
|
---|
102 | _tagNameMap.put(TAG_SERIAL_NUMBER, "Serial Number");
|
---|
103 |
|
---|
104 | _tagNameMap.put(TAG_QUALITY, "Quality");
|
---|
105 | _tagNameMap.put(TAG_SHARPNESS, "Sharpness");
|
---|
106 | _tagNameMap.put(TAG_WHITE_BALANCE, "White Balance");
|
---|
107 | _tagNameMap.put(TAG_COLOR_SATURATION, "Color Saturation");
|
---|
108 | _tagNameMap.put(TAG_TONE, "Tone (Contrast)");
|
---|
109 | _tagNameMap.put(TAG_COLOR_TEMPERATURE, "Color Temperature");
|
---|
110 | _tagNameMap.put(TAG_CONTRAST, "Contrast");
|
---|
111 |
|
---|
112 | _tagNameMap.put(TAG_WHITE_BALANCE_FINE_TUNE, "White Balance Fine Tune");
|
---|
113 | _tagNameMap.put(TAG_NOISE_REDUCTION, "Noise Reduction");
|
---|
114 | _tagNameMap.put(TAG_HIGH_ISO_NOISE_REDUCTION, "High ISO Noise Reduction");
|
---|
115 |
|
---|
116 | _tagNameMap.put(TAG_FLASH_MODE, "Flash Mode");
|
---|
117 | _tagNameMap.put(TAG_FLASH_EV, "Flash Strength");
|
---|
118 |
|
---|
119 | _tagNameMap.put(TAG_MACRO, "Macro");
|
---|
120 | _tagNameMap.put(TAG_FOCUS_MODE, "Focus Mode");
|
---|
121 | _tagNameMap.put(TAG_FOCUS_PIXEL, "Focus Pixel");
|
---|
122 |
|
---|
123 | _tagNameMap.put(TAG_SLOW_SYNC, "Slow Sync");
|
---|
124 | _tagNameMap.put(TAG_PICTURE_MODE, "Picture Mode");
|
---|
125 | _tagNameMap.put(TAG_EXR_AUTO, "EXR Auto");
|
---|
126 | _tagNameMap.put(TAG_EXR_MODE, "EXR Mode");
|
---|
127 |
|
---|
128 | _tagNameMap.put(TAG_AUTO_BRACKETING, "Auto Bracketing");
|
---|
129 | _tagNameMap.put(TAG_SEQUENCE_NUMBER, "Sequence Number");
|
---|
130 |
|
---|
131 | _tagNameMap.put(TAG_FINE_PIX_COLOR, "FinePix Color Setting");
|
---|
132 |
|
---|
133 | _tagNameMap.put(TAG_BLUR_WARNING, "Blur Warning");
|
---|
134 | _tagNameMap.put(TAG_FOCUS_WARNING, "Focus Warning");
|
---|
135 | _tagNameMap.put(TAG_AUTO_EXPOSURE_WARNING, "AE Warning");
|
---|
136 | _tagNameMap.put(TAG_GE_IMAGE_SIZE, "GE Image Size");
|
---|
137 |
|
---|
138 | _tagNameMap.put(TAG_DYNAMIC_RANGE, "Dynamic Range");
|
---|
139 | _tagNameMap.put(TAG_FILM_MODE, "Film Mode");
|
---|
140 | _tagNameMap.put(TAG_DYNAMIC_RANGE_SETTING, "Dynamic Range Setting");
|
---|
141 | _tagNameMap.put(TAG_DEVELOPMENT_DYNAMIC_RANGE, "Development Dynamic Range");
|
---|
142 | _tagNameMap.put(TAG_MIN_FOCAL_LENGTH, "Minimum Focal Length");
|
---|
143 | _tagNameMap.put(TAG_MAX_FOCAL_LENGTH, "Maximum Focal Length");
|
---|
144 | _tagNameMap.put(TAG_MAX_APERTURE_AT_MIN_FOCAL, "Maximum Aperture at Minimum Focal Length");
|
---|
145 | _tagNameMap.put(TAG_MAX_APERTURE_AT_MAX_FOCAL, "Maximum Aperture at Maximum Focal Length");
|
---|
146 |
|
---|
147 | _tagNameMap.put(TAG_AUTO_DYNAMIC_RANGE, "Auto Dynamic Range");
|
---|
148 |
|
---|
149 | _tagNameMap.put(TAG_FACES_DETECTED, "Faces Detected");
|
---|
150 | _tagNameMap.put(TAG_FACE_POSITIONS, "Face Positions");
|
---|
151 | _tagNameMap.put(TAG_FACE_REC_INFO, "Face Detection Data");
|
---|
152 |
|
---|
153 | _tagNameMap.put(TAG_FILE_SOURCE, "File Source");
|
---|
154 | _tagNameMap.put(TAG_ORDER_NUMBER, "Order Number");
|
---|
155 | _tagNameMap.put(TAG_FRAME_NUMBER, "Frame Number");
|
---|
156 |
|
---|
157 | _tagNameMap.put(TAG_PARALLAX, "Parallax");
|
---|
158 | }
|
---|
159 |
|
---|
160 | public FujifilmMakernoteDirectory()
|
---|
161 | {
|
---|
162 | this.setDescriptor(new FujifilmMakernoteDescriptor(this));
|
---|
163 | }
|
---|
164 |
|
---|
165 | @Override
|
---|
166 | @NotNull
|
---|
167 | public String getName()
|
---|
168 | {
|
---|
169 | return "Fujifilm Makernote";
|
---|
170 | }
|
---|
171 |
|
---|
172 | @Override
|
---|
173 | @NotNull
|
---|
174 | protected HashMap<Integer, String> getTagNameMap()
|
---|
175 | {
|
---|
176 | return _tagNameMap;
|
---|
177 | }
|
---|
178 | }
|
---|