source: josm/trunk/src/com/drew/metadata/exif/OlympusMakernoteDirectory.java@ 4974

Last change on this file since 4974 was 4231, checked in by stoecker, 14 years ago

add signpost and metadata extractor code to repository directly

File size: 10.8 KB
Line 
1/*
2 * This is public domain software - that is, you can do whatever you want
3 * with it, and include it software that is licensed under the GNU or the
4 * BSD license, or whatever other licence you choose, including proprietary
5 * closed source licenses. I do ask that you leave this header in tact.
6 *
7 * If you make modifications to this code that you think would benefit the
8 * wider community, please send me a copy and I'll post it on my site.
9 *
10 * If you make use of this code, I'd appreciate hearing about it.
11 * drew@drewnoakes.com
12 * Latest version of this software kept at
13 * http://drewnoakes.com/
14 *
15 * Created by dnoakes on 27-Nov-2002 10:10:47 using IntelliJ IDEA.
16 */
17package com.drew.metadata.exif;
18
19import com.drew.metadata.Directory;
20
21import java.util.HashMap;
22
23/**
24 * The Olympus makernote is used by many manufacturers, and as such contains some tags that appear specific to
25 * those manufacturers. Other users include Konica, Minolta and Epson.
26 */
27public class OlympusMakernoteDirectory extends Directory
28{
29 /**
30 * Used by Konica / Minolta cameras.
31 */
32 public static final int TAG_OLYMPUS_MAKERNOTE_VERSION = 0x0000;
33
34 /**
35 * Used by Konica / Minolta cameras.
36 */
37 public static final int TAG_OLYMPUS_CAMERA_SETTINGS_1 = 0x0001;
38
39 /**
40 * Alternate Camera Settings Tag. Used by Konica / Minolta cameras.
41 */
42 public static final int TAG_OLYMPUS_CAMERA_SETTINGS_2 = 0x0003;
43
44 /**
45 * Used by Konica / Minolta cameras.
46 */
47 public static final int TAG_OLYMPUS_COMPRESSED_IMAGE_SIZE = 0x0040;
48
49 /**
50 * Used by Konica / Minolta cameras.
51 */
52 public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_1 = 0x0081;
53
54 /**
55 * Alternate Thumbnail Offset. Used by Konica / Minolta cameras.
56 */
57 public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_2 = 0x0088;
58
59 /**
60 * Length of thumbnail in bytes. Used by Konica / Minolta cameras.
61 */
62 public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_LENGTH = 0x0089;
63
64 /**
65 * Used by Konica / Minolta cameras
66 * 0 = Natural Colour
67 * 1 = Black & White
68 * 2 = Vivid colour
69 * 3 = Solarization
70 * 4 = AdobeRGB
71 */
72 public static final int TAG_OLYMPUS_COLOUR_MODE = 0x0101;
73
74 /**
75 * Used by Konica / Minolta cameras.
76 * 0 = Raw
77 * 1 = Super Fine
78 * 2 = Fine
79 * 3 = Standard
80 * 4 = Extra Fine
81 */
82 public static final int TAG_OLYMPUS_IMAGE_QUALITY_1 = 0x0102;
83
84 /**
85 * Not 100% sure about this tag.
86 *
87 * Used by Konica / Minolta cameras.
88 * 0 = Raw
89 * 1 = Super Fine
90 * 2 = Fine
91 * 3 = Standard
92 * 4 = Extra Fine
93 */
94 public static final int TAG_OLYMPUS_IMAGE_QUALITY_2 = 0x0103;
95
96
97 /**
98 * Three values:
99 * Value 1: 0=Normal, 2=Fast, 3=Panorama
100 * Value 2: Sequence Number Value 3:
101 * 1 = Panorama Direction: Left to Right
102 * 2 = Panorama Direction: Right to Left
103 * 3 = Panorama Direction: Bottom to Top
104 * 4 = Panorama Direction: Top to Bottom
105 */
106 public static final int TAG_OLYMPUS_SPECIAL_MODE = 0x0200;
107
108 /**
109 * 1 = Standard Quality
110 * 2 = High Quality
111 * 3 = Super High Quality
112 */
113 public static final int TAG_OLYMPUS_JPEG_QUALITY = 0x0201;
114
115 /**
116 * 0 = Normal (Not Macro)
117 * 1 = Macro
118 */
119 public static final int TAG_OLYMPUS_MACRO_MODE = 0x0202;
120
121 /**
122 *
123 */
124 public static final int TAG_OLYMPUS_UNKNOWN_1 = 0x0203;
125
126 /**
127 * Zoom Factor (0 or 1 = normal)
128 */
129 public static final int TAG_OLYMPUS_DIGI_ZOOM_RATIO = 0x0204;
130
131 /**
132 *
133 */
134 public static final int TAG_OLYMPUS_UNKNOWN_2 = 0x0205;
135
136 /**
137 *
138 */
139 public static final int TAG_OLYMPUS_UNKNOWN_3 = 0x0206;
140
141 /**
142 *
143 */
144 public static final int TAG_OLYMPUS_FIRMWARE_VERSION = 0x0207;
145
146 /**
147 *
148 */
149 public static final int TAG_OLYMPUS_PICT_INFO = 0x0208;
150
151 /**
152 *
153 */
154 public static final int TAG_OLYMPUS_CAMERA_ID = 0x0209;
155
156 /**
157 * Used by Epson cameras
158 * Units = pixels
159 */
160 public static final int TAG_OLYMPUS_IMAGE_WIDTH = 0x020B;
161
162 /**
163 * Used by Epson cameras
164 * Units = pixels
165 */
166 public static final int TAG_OLYMPUS_IMAGE_HEIGHT = 0x020C;
167
168 /**
169 * A string. Used by Epson cameras.
170 */
171 public static final int TAG_OLYMPUS_ORIGINAL_MANUFACTURER_MODEL = 0x020D;
172
173 /**
174 * See the PIM specification here:
175 * http://www.ozhiker.com/electronics/pjmt/jpeg_info/pim.html
176 */
177 public static final int TAG_OLYMPUS_PRINT_IMAGE_MATCHING_INFO = 0x0E00;
178
179 /**
180 *
181 */
182 public static final int TAG_OLYMPUS_DATA_DUMP = 0x0F00;
183
184 /**
185 *
186 */
187 public static final int TAG_OLYMPUS_FLASH_MODE = 0x1004;
188
189 /**
190 *
191 */
192 public static final int TAG_OLYMPUS_BRACKET = 0x1006;
193
194 /**
195 *
196 */
197 public static final int TAG_OLYMPUS_FOCUS_MODE = 0x100B;
198
199 /**
200 *
201 */
202 public static final int TAG_OLYMPUS_FOCUS_DISTANCE = 0x100C;
203
204 /**
205 *
206 */
207 public static final int TAG_OLYMPUS_ZOOM = 0x100D;
208
209 /**
210 *
211 */
212 public static final int TAG_OLYMPUS_MACRO_FOCUS = 0x100E;
213
214 /**
215 *
216 */
217 public static final int TAG_OLYMPUS_SHARPNESS = 0x100F;
218
219 /**
220 *
221 */
222 public static final int TAG_OLYMPUS_COLOUR_MATRIX = 0x1011;
223
224 /**
225 *
226 */
227 public static final int TAG_OLYMPUS_BLACK_LEVEL = 0x1012;
228
229 /**
230 *
231 */
232 public static final int TAG_OLYMPUS_WHITE_BALANCE = 0x1015;
233
234 /**
235 *
236 */
237 public static final int TAG_OLYMPUS_RED_BIAS = 0x1017;
238
239 /**
240 *
241 */
242 public static final int TAG_OLYMPUS_BLUE_BIAS = 0x1018;
243
244 /**
245 *
246 */
247 public static final int TAG_OLYMPUS_SERIAL_NUMBER = 0x101A;
248
249 /**
250 *
251 */
252 public static final int TAG_OLYMPUS_FLASH_BIAS = 0x1023;
253
254 /**
255 *
256 */
257 public static final int TAG_OLYMPUS_CONTRAST = 0x1029;
258
259 /**
260 *
261 */
262 public static final int TAG_OLYMPUS_SHARPNESS_FACTOR = 0x102A;
263
264 /**
265 *
266 */
267 public static final int TAG_OLYMPUS_COLOUR_CONTROL = 0x102B;
268
269 /**
270 *
271 */
272 public static final int TAG_OLYMPUS_VALID_BITS = 0x102C;
273
274 /**
275 *
276 */
277 public static final int TAG_OLYMPUS_CORING_FILTER = 0x102D;
278
279 /**
280 *
281 */
282 public static final int TAG_OLYMPUS_FINAL_WIDTH = 0x102E;
283
284 /**
285 *
286 */
287 public static final int TAG_OLYMPUS_FINAL_HEIGHT = 0x102F;
288
289 /**
290 *
291 */
292 public static final int TAG_OLYMPUS_COMPRESSION_RATIO = 0x1034;
293
294 protected static final HashMap tagNameMap = new HashMap();
295
296 static
297 {
298 tagNameMap.put(new Integer(TAG_OLYMPUS_SPECIAL_MODE), "Special Mode");
299 tagNameMap.put(new Integer(TAG_OLYMPUS_JPEG_QUALITY), "Jpeg Quality");
300 tagNameMap.put(new Integer(TAG_OLYMPUS_MACRO_MODE), "Macro");
301 tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_1), "Makernote Unknown 1");
302 tagNameMap.put(new Integer(TAG_OLYMPUS_DIGI_ZOOM_RATIO), "DigiZoom Ratio");
303 tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_2), "Makernote Unknown 2");
304 tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_3), "Makernote Unknown 3");
305 tagNameMap.put(new Integer(TAG_OLYMPUS_FIRMWARE_VERSION), "Firmware Version");
306 tagNameMap.put(new Integer(TAG_OLYMPUS_PICT_INFO), "Pict Info");
307 tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_ID), "Camera Id");
308 tagNameMap.put(new Integer(TAG_OLYMPUS_DATA_DUMP), "Data Dump");
309 tagNameMap.put(new Integer(TAG_OLYMPUS_MAKERNOTE_VERSION), "Makernote Version");
310 tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_SETTINGS_1), "Camera Settings");
311 tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_SETTINGS_2), "Camera Settings");
312 tagNameMap.put(new Integer(TAG_OLYMPUS_COMPRESSED_IMAGE_SIZE), "Compressed Image Size");
313 tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_1), "Thumbnail Offset");
314 tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_2), "Thumbnail Offset");
315 tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_LENGTH), "Thumbnail Length");
316 tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_MODE), "Colour Mode");
317 tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_QUALITY_1), "Image Quality");
318 tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_QUALITY_2), "Image Quality");
319 tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_HEIGHT), "Image Height");
320 tagNameMap.put(new Integer(TAG_OLYMPUS_ORIGINAL_MANUFACTURER_MODEL), "Original Manufacturer Model");
321 tagNameMap.put(new Integer(TAG_OLYMPUS_PRINT_IMAGE_MATCHING_INFO), "Print Image Matching (PIM) Info");
322 tagNameMap.put(new Integer(TAG_OLYMPUS_FLASH_MODE), "Flash Mode");
323 tagNameMap.put(new Integer(TAG_OLYMPUS_BRACKET), "Bracket");
324 tagNameMap.put(new Integer(TAG_OLYMPUS_FOCUS_MODE), "Focus Mode");
325 tagNameMap.put(new Integer(TAG_OLYMPUS_FOCUS_DISTANCE), "Focus Distance");
326 tagNameMap.put(new Integer(TAG_OLYMPUS_ZOOM), "Zoom");
327 tagNameMap.put(new Integer(TAG_OLYMPUS_MACRO_FOCUS), "Macro Focus");
328 tagNameMap.put(new Integer(TAG_OLYMPUS_SHARPNESS), "Sharpness");
329 tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_MATRIX), "Colour Matrix");
330 tagNameMap.put(new Integer(TAG_OLYMPUS_BLACK_LEVEL), "Black Level");
331 tagNameMap.put(new Integer(TAG_OLYMPUS_WHITE_BALANCE), "White Balance");
332 tagNameMap.put(new Integer(TAG_OLYMPUS_RED_BIAS), "Red Bias");
333 tagNameMap.put(new Integer(TAG_OLYMPUS_BLUE_BIAS), "Blue Bias");
334 tagNameMap.put(new Integer(TAG_OLYMPUS_SERIAL_NUMBER), "Serial Number");
335 tagNameMap.put(new Integer(TAG_OLYMPUS_FLASH_BIAS), "Flash Bias");
336 tagNameMap.put(new Integer(TAG_OLYMPUS_CONTRAST), "Contrast");
337 tagNameMap.put(new Integer(TAG_OLYMPUS_SHARPNESS_FACTOR), "Sharpness Factor");
338 tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_CONTROL), "Colour Control");
339 tagNameMap.put(new Integer(TAG_OLYMPUS_VALID_BITS), "Valid Bits");
340 tagNameMap.put(new Integer(TAG_OLYMPUS_CORING_FILTER), "Coring Filter");
341 tagNameMap.put(new Integer(TAG_OLYMPUS_FINAL_WIDTH), "Final Width");
342 tagNameMap.put(new Integer(TAG_OLYMPUS_FINAL_HEIGHT), "Final Height");
343 tagNameMap.put(new Integer(TAG_OLYMPUS_COMPRESSION_RATIO), "Compression Ratio");
344 }
345
346 public OlympusMakernoteDirectory()
347 {
348 this.setDescriptor(new OlympusMakernoteDescriptor(this));
349 }
350
351 public String getName()
352 {
353 return "Olympus Makernote";
354 }
355
356 protected HashMap getTagNameMap()
357 {
358 return tagNameMap;
359 }
360}
Note: See TracBrowser for help on using the repository browser.