source: josm/trunk/src/com/drew/metadata/exif/ExifDirectoryBase.java@ 8243

Last change on this file since 8243 was 8243, checked in by Don-vip, 9 years ago

fix #11359 - update to metadata-extractor 2.8.1

File size: 33.3 KB
Line 
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
22package com.drew.metadata.exif;
23
24import com.drew.metadata.Directory;
25
26import java.util.HashMap;
27
28/**
29 * Base class for several Exif format tag directories.
30 *
31 * @author Drew Noakes https://drewnoakes.com
32 */
33public abstract class ExifDirectoryBase extends Directory
34{
35 public static final int TAG_INTEROP_INDEX = 0x0001;
36 public static final int TAG_INTEROP_VERSION = 0x0002;
37
38 /**
39 * The new subfile type tag.
40 * 0 = Full-resolution Image
41 * 1 = Reduced-resolution image
42 * 2 = Single page of multi-page image
43 * 3 = Single page of multi-page reduced-resolution image
44 * 4 = Transparency mask
45 * 5 = Transparency mask of reduced-resolution image
46 * 6 = Transparency mask of multi-page image
47 * 7 = Transparency mask of reduced-resolution multi-page image
48 */
49 public static final int TAG_NEW_SUBFILE_TYPE = 0x00FE;
50 /**
51 * The old subfile type tag.
52 * 1 = Full-resolution image (Main image)
53 * 2 = Reduced-resolution image (Thumbnail)
54 * 3 = Single page of multi-page image
55 */
56 public static final int TAG_SUBFILE_TYPE = 0x00FF;
57
58 public static final int TAG_IMAGE_WIDTH = 0x0100;
59 public static final int TAG_IMAGE_HEIGHT = 0x0101;
60
61 /**
62 * When image format is no compression, this value shows the number of bits
63 * per component for each pixel. Usually this value is '8,8,8'.
64 */
65 public static final int TAG_BITS_PER_SAMPLE = 0x0102;
66 public static final int TAG_COMPRESSION = 0x0103;
67
68 /**
69 * Shows the color space of the image data components.
70 * 0 = WhiteIsZero
71 * 1 = BlackIsZero
72 * 2 = RGB
73 * 3 = RGB Palette
74 * 4 = Transparency Mask
75 * 5 = CMYK
76 * 6 = YCbCr
77 * 8 = CIELab
78 * 9 = ICCLab
79 * 10 = ITULab
80 * 32803 = Color Filter Array
81 * 32844 = Pixar LogL
82 * 32845 = Pixar LogLuv
83 * 34892 = Linear Raw
84 */
85 public static final int TAG_PHOTOMETRIC_INTERPRETATION = 0x0106;
86
87 /**
88 * 1 = No dithering or halftoning
89 * 2 = Ordered dither or halftone
90 * 3 = Randomized dither
91 */
92 public static final int TAG_THRESHOLDING = 0x0107;
93
94 /**
95 * 1 = Normal
96 * 2 = Reversed
97 */
98 public static final int TAG_FILL_ORDER = 0x010A;
99 public static final int TAG_DOCUMENT_NAME = 0x010D;
100
101 public static final int TAG_IMAGE_DESCRIPTION = 0x010E;
102
103 public static final int TAG_MAKE = 0x010F;
104 public static final int TAG_MODEL = 0x0110;
105 /** The position in the file of raster data. */
106 public static final int TAG_STRIP_OFFSETS = 0x0111;
107 public static final int TAG_ORIENTATION = 0x0112;
108 /** Each pixel is composed of this many samples. */
109 public static final int TAG_SAMPLES_PER_PIXEL = 0x0115;
110 /** The raster is codified by a single block of data holding this many rows. */
111 public static final int TAG_ROWS_PER_STRIP = 0x0116;
112 /** The size of the raster data in bytes. */
113 public static final int TAG_STRIP_BYTE_COUNTS = 0x0117;
114 public static final int TAG_MIN_SAMPLE_VALUE = 0x0118;
115 public static final int TAG_MAX_SAMPLE_VALUE = 0x0119;
116 public static final int TAG_X_RESOLUTION = 0x011A;
117 public static final int TAG_Y_RESOLUTION = 0x011B;
118 /**
119 * When image format is no compression YCbCr, this value shows byte aligns of
120 * YCbCr data. If value is '1', Y/Cb/Cr value is chunky format, contiguous for
121 * each subsampling pixel. If value is '2', Y/Cb/Cr value is separated and
122 * stored to Y plane/Cb plane/Cr plane format.
123 */
124 public static final int TAG_PLANAR_CONFIGURATION = 0x011C;
125 public static final int TAG_PAGE_NAME = 0x011D;
126
127 public static final int TAG_RESOLUTION_UNIT = 0x0128;
128 public static final int TAG_TRANSFER_FUNCTION = 0x012D;
129 public static final int TAG_SOFTWARE = 0x0131;
130 public static final int TAG_DATETIME = 0x0132;
131 public static final int TAG_ARTIST = 0x013B;
132 public static final int TAG_HOST_COMPUTER = 0x013C;
133 public static final int TAG_PREDICTOR = 0x013D;
134 public static final int TAG_WHITE_POINT = 0x013E;
135 public static final int TAG_PRIMARY_CHROMATICITIES = 0x013F;
136
137 public static final int TAG_TILE_WIDTH = 0x0142;
138 public static final int TAG_TILE_LENGTH = 0x0143;
139 public static final int TAG_TILE_OFFSETS = 0x0144;
140 public static final int TAG_TILE_BYTE_COUNTS = 0x0145;
141
142 public static final int TAG_SUB_IFD_OFFSET = 0x014a;
143
144 public static final int TAG_TRANSFER_RANGE = 0x0156;
145 public static final int TAG_JPEG_TABLES = 0x015B;
146 public static final int TAG_JPEG_PROC = 0x0200;
147
148 public static final int TAG_YCBCR_COEFFICIENTS = 0x0211;
149 public static final int TAG_YCBCR_SUBSAMPLING = 0x0212;
150 public static final int TAG_YCBCR_POSITIONING = 0x0213;
151 public static final int TAG_REFERENCE_BLACK_WHITE = 0x0214;
152
153 public static final int TAG_RELATED_IMAGE_FILE_FORMAT = 0x1000;
154 public static final int TAG_RELATED_IMAGE_WIDTH = 0x1001;
155 public static final int TAG_RELATED_IMAGE_HEIGHT = 0x1002;
156
157 public static final int TAG_RATING = 0x4746;
158
159 public static final int TAG_CFA_REPEAT_PATTERN_DIM = 0x828D;
160 /** There are two definitions for CFA pattern, I don't know the difference... */
161 public static final int TAG_CFA_PATTERN_2 = 0x828E;
162 public static final int TAG_BATTERY_LEVEL = 0x828F;
163 public static final int TAG_COPYRIGHT = 0x8298;
164 /**
165 * Exposure time (reciprocal of shutter speed). Unit is second.
166 */
167 public static final int TAG_EXPOSURE_TIME = 0x829A;
168 /**
169 * The actual F-number(F-stop) of lens when the image was taken.
170 */
171 public static final int TAG_FNUMBER = 0x829D;
172 public static final int TAG_IPTC_NAA = 0x83BB;
173 public static final int TAG_INTER_COLOR_PROFILE = 0x8773;
174 /**
175 * Exposure program that the camera used when image was taken. '1' means
176 * manual control, '2' program normal, '3' aperture priority, '4' shutter
177 * priority, '5' program creative (slow program), '6' program action
178 * (high-speed program), '7' portrait mode, '8' landscape mode.
179 */
180 public static final int TAG_EXPOSURE_PROGRAM = 0x8822;
181 public static final int TAG_SPECTRAL_SENSITIVITY = 0x8824;
182 public static final int TAG_ISO_EQUIVALENT = 0x8827;
183 /**
184 * Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524.
185 * <p>
186 * OECF is the relationship between the camera optical input and the image values.
187 * <p>
188 * The values are:
189 * <ul>
190 * <li>Two shorts, indicating respectively number of columns, and number of rows.</li>
191 * <li>For each column, the column name in a null-terminated ASCII string.</li>
192 * <li>For each cell, an SRATIONAL value.</li>
193 * </ul>
194 */
195 public static final int TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION = 0x8828;
196 public static final int TAG_INTERLACE = 0x8829;
197 public static final int TAG_TIME_ZONE_OFFSET_TIFF_EP = 0x882A;
198 public static final int TAG_SELF_TIMER_MODE_TIFF_EP = 0x882B;
199 /**
200 * Applies to ISO tag.
201 *
202 * 0 = Unknown
203 * 1 = Standard Output Sensitivity
204 * 2 = Recommended Exposure Index
205 * 3 = ISO Speed
206 * 4 = Standard Output Sensitivity and Recommended Exposure Index
207 * 5 = Standard Output Sensitivity and ISO Speed
208 * 6 = Recommended Exposure Index and ISO Speed
209 * 7 = Standard Output Sensitivity, Recommended Exposure Index and ISO Speed
210 */
211 public static final int TAG_SENSITIVITY_TYPE = 0x8830;
212 public static final int TAG_STANDARD_OUTPUT_SENSITIVITY = 0x8831;
213 public static final int TAG_RECOMMENDED_EXPOSURE_INDEX = 0x8832;
214 /** Non-standard, but in use. */
215 public static final int TAG_TIME_ZONE_OFFSET = 0x882A;
216 public static final int TAG_SELF_TIMER_MODE = 0x882B;
217
218 public static final int TAG_EXIF_VERSION = 0x9000;
219 public static final int TAG_DATETIME_ORIGINAL = 0x9003;
220 public static final int TAG_DATETIME_DIGITIZED = 0x9004;
221
222 public static final int TAG_COMPONENTS_CONFIGURATION = 0x9101;
223 /**
224 * Average (rough estimate) compression level in JPEG bits per pixel.
225 * */
226 public static final int TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL = 0x9102;
227
228 /**
229 * Shutter speed by APEX value. To convert this value to ordinary 'Shutter Speed';
230 * calculate this value's power of 2, then reciprocal. For example, if the
231 * ShutterSpeedValue is '4', shutter speed is 1/(24)=1/16 second.
232 */
233 public static final int TAG_SHUTTER_SPEED = 0x9201;
234 /**
235 * The actual aperture value of lens when the image was taken. Unit is APEX.
236 * To convert this value to ordinary F-number (F-stop), calculate this value's
237 * power of root 2 (=1.4142). For example, if the ApertureValue is '5',
238 * F-number is 1.4142^5 = F5.6.
239 */
240 public static final int TAG_APERTURE = 0x9202;
241 public static final int TAG_BRIGHTNESS_VALUE = 0x9203;
242 public static final int TAG_EXPOSURE_BIAS = 0x9204;
243 /**
244 * Maximum aperture value of lens. You can convert to F-number by calculating
245 * power of root 2 (same process of ApertureValue:0x9202).
246 * The actual aperture value of lens when the image was taken. To convert this
247 * value to ordinary f-number(f-stop), calculate the value's power of root 2
248 * (=1.4142). For example, if the ApertureValue is '5', f-number is 1.41425^5 = F5.6.
249 */
250 public static final int TAG_MAX_APERTURE = 0x9205;
251 /**
252 * Indicates the distance the autofocus camera is focused to. Tends to be less accurate as distance increases.
253 */
254 public static final int TAG_SUBJECT_DISTANCE = 0x9206;
255 /**
256 * Exposure metering method. '0' means unknown, '1' average, '2' center
257 * weighted average, '3' spot, '4' multi-spot, '5' multi-segment, '6' partial,
258 * '255' other.
259 */
260 public static final int TAG_METERING_MODE = 0x9207;
261
262 public static final int TAG_LIGHT_SOURCE = 0x9208; // TODO duplicate tag
263 /**
264 * White balance (aka light source). '0' means unknown, '1' daylight,
265 * '2' fluorescent, '3' tungsten, '10' flash, '17' standard light A,
266 * '18' standard light B, '19' standard light C, '20' D55, '21' D65,
267 * '22' D75, '255' other.
268 */
269 public static final int TAG_WHITE_BALANCE = 0x9208; // TODO duplicate tag
270 /**
271 * 0x0 = 0000000 = No Flash
272 * 0x1 = 0000001 = Fired
273 * 0x5 = 0000101 = Fired, Return not detected
274 * 0x7 = 0000111 = Fired, Return detected
275 * 0x9 = 0001001 = On
276 * 0xd = 0001101 = On, Return not detected
277 * 0xf = 0001111 = On, Return detected
278 * 0x10 = 0010000 = Off
279 * 0x18 = 0011000 = Auto, Did not fire
280 * 0x19 = 0011001 = Auto, Fired
281 * 0x1d = 0011101 = Auto, Fired, Return not detected
282 * 0x1f = 0011111 = Auto, Fired, Return detected
283 * 0x20 = 0100000 = No flash function
284 * 0x41 = 1000001 = Fired, Red-eye reduction
285 * 0x45 = 1000101 = Fired, Red-eye reduction, Return not detected
286 * 0x47 = 1000111 = Fired, Red-eye reduction, Return detected
287 * 0x49 = 1001001 = On, Red-eye reduction
288 * 0x4d = 1001101 = On, Red-eye reduction, Return not detected
289 * 0x4f = 1001111 = On, Red-eye reduction, Return detected
290 * 0x59 = 1011001 = Auto, Fired, Red-eye reduction
291 * 0x5d = 1011101 = Auto, Fired, Red-eye reduction, Return not detected
292 * 0x5f = 1011111 = Auto, Fired, Red-eye reduction, Return detected
293 * 6543210 (positions)
294 *
295 * This is a bitmask.
296 * 0 = flash fired
297 * 1 = return detected
298 * 2 = return able to be detected
299 * 3 = unknown
300 * 4 = auto used
301 * 5 = unknown
302 * 6 = red eye reduction used
303 */
304 public static final int TAG_FLASH = 0x9209;
305 /**
306 * Focal length of lens used to take image. Unit is millimeter.
307 * Nice digital cameras actually save the focal length as a function of how far they are zoomed in.
308 */
309 public static final int TAG_FOCAL_LENGTH = 0x920A;
310
311 public static final int TAG_FLASH_ENERGY_TIFF_EP = 0x920B;
312 public static final int TAG_SPATIAL_FREQ_RESPONSE_TIFF_EP = 0x920C;
313 public static final int TAG_NOISE = 0x920D;
314 public static final int TAG_FOCAL_PLANE_X_RESOLUTION_TIFF_EP = 0x920E;
315 public static final int TAG_FOCAL_PLANE_Y_RESOLUTION_TIFF_EP = 0x920F;
316 public static final int TAG_IMAGE_NUMBER = 0x9211;
317 public static final int TAG_SECURITY_CLASSIFICATION = 0x9212;
318 public static final int TAG_IMAGE_HISTORY = 0x9213;
319 public static final int TAG_SUBJECT_LOCATION_TIFF_EP = 0x9214;
320 public static final int TAG_EXPOSURE_INDEX_TIFF_EP = 0x9215;
321 public static final int TAG_STANDARD_ID_TIFF_EP = 0x9216;
322
323 /**
324 * This tag holds the Exif Makernote. Makernotes are free to be in any format, though they are often IFDs.
325 * To determine the format, we consider the starting bytes of the makernote itself and sometimes the
326 * camera model and make.
327 * <p>
328 * The component count for this tag includes all of the bytes needed for the makernote.
329 */
330 public static final int TAG_MAKERNOTE = 0x927C;
331
332 public static final int TAG_USER_COMMENT = 0x9286;
333
334 public static final int TAG_SUBSECOND_TIME = 0x9290;
335 public static final int TAG_SUBSECOND_TIME_ORIGINAL = 0x9291;
336 public static final int TAG_SUBSECOND_TIME_DIGITIZED = 0x9292;
337
338 /** The image title, as used by Windows XP. */
339 public static final int TAG_WIN_TITLE = 0x9C9B;
340 /** The image comment, as used by Windows XP. */
341 public static final int TAG_WIN_COMMENT = 0x9C9C;
342 /** The image author, as used by Windows XP (called Artist in the Windows shell). */
343 public static final int TAG_WIN_AUTHOR = 0x9C9D;
344 /** The image keywords, as used by Windows XP. */
345 public static final int TAG_WIN_KEYWORDS = 0x9C9E;
346 /** The image subject, as used by Windows XP. */
347 public static final int TAG_WIN_SUBJECT = 0x9C9F;
348
349 public static final int TAG_FLASHPIX_VERSION = 0xA000;
350 /**
351 * Defines Color Space. DCF image must use sRGB color space so value is
352 * always '1'. If the picture uses the other color space, value is
353 * '65535':Uncalibrated.
354 */
355 public static final int TAG_COLOR_SPACE = 0xA001;
356 public static final int TAG_EXIF_IMAGE_WIDTH = 0xA002;
357 public static final int TAG_EXIF_IMAGE_HEIGHT = 0xA003;
358 public static final int TAG_RELATED_SOUND_FILE = 0xA004;
359
360 public static final int TAG_FLASH_ENERGY = 0xA20B;
361 public static final int TAG_SPATIAL_FREQ_RESPONSE = 0xA20C;
362 public static final int TAG_FOCAL_PLANE_X_RESOLUTION = 0xA20E;
363 public static final int TAG_FOCAL_PLANE_Y_RESOLUTION = 0xA20F;
364 /**
365 * Unit of FocalPlaneXResolution/FocalPlaneYResolution. '1' means no-unit,
366 * '2' inch, '3' centimeter.
367 *
368 * Note: Some of Fujifilm's digicam(e.g.FX2700,FX2900,Finepix4700Z/40i etc)
369 * uses value '3' so it must be 'centimeter', but it seems that they use a
370 * '8.3mm?'(1/3in.?) to their ResolutionUnit. Fuji's BUG? Finepix4900Z has
371 * been changed to use value '2' but it doesn't match to actual value also.
372 */
373 public static final int TAG_FOCAL_PLANE_RESOLUTION_UNIT = 0xA210;
374 public static final int TAG_SUBJECT_LOCATION = 0xA214;
375 public static final int TAG_EXPOSURE_INDEX = 0xA215;
376 public static final int TAG_SENSING_METHOD = 0xA217;
377
378 public static final int TAG_FILE_SOURCE = 0xA300;
379 public static final int TAG_SCENE_TYPE = 0xA301;
380 public static final int TAG_CFA_PATTERN = 0xA302;
381
382 /**
383 * This tag indicates the use of special processing on image data, such as rendering
384 * geared to output. When special processing is performed, the reader is expected to
385 * disable or minimize any further processing.
386 * Tag = 41985 (A401.H)
387 * Type = SHORT
388 * Count = 1
389 * Default = 0
390 * 0 = Normal process
391 * 1 = Custom process
392 * Other = reserved
393 */
394 public static final int TAG_CUSTOM_RENDERED = 0xA401;
395 /**
396 * This tag indicates the exposure mode set when the image was shot. In auto-bracketing
397 * mode, the camera shoots a series of frames of the same scene at different exposure settings.
398 * Tag = 41986 (A402.H)
399 * Type = SHORT
400 * Count = 1
401 * Default = none
402 * 0 = Auto exposure
403 * 1 = Manual exposure
404 * 2 = Auto bracket
405 * Other = reserved
406 */
407 public static final int TAG_EXPOSURE_MODE = 0xA402;
408 /**
409 * This tag indicates the white balance mode set when the image was shot.
410 * Tag = 41987 (A403.H)
411 * Type = SHORT
412 * Count = 1
413 * Default = none
414 * 0 = Auto white balance
415 * 1 = Manual white balance
416 * Other = reserved
417 */
418 public static final int TAG_WHITE_BALANCE_MODE = 0xA403;
419 /**
420 * This tag indicates the digital zoom ratio when the image was shot. If the
421 * numerator of the recorded value is 0, this indicates that digital zoom was
422 * not used.
423 * Tag = 41988 (A404.H)
424 * Type = RATIONAL
425 * Count = 1
426 * Default = none
427 */
428 public static final int TAG_DIGITAL_ZOOM_RATIO = 0xA404;
429 /**
430 * This tag indicates the equivalent focal length assuming a 35mm film camera,
431 * in mm. A value of 0 means the focal length is unknown. Note that this tag
432 * differs from the FocalLength tag.
433 * Tag = 41989 (A405.H)
434 * Type = SHORT
435 * Count = 1
436 * Default = none
437 */
438 public static final int TAG_35MM_FILM_EQUIV_FOCAL_LENGTH = 0xA405;
439 /**
440 * This tag indicates the type of scene that was shot. It can also be used to
441 * record the mode in which the image was shot. Note that this differs from
442 * the scene type (SceneType) tag.
443 * Tag = 41990 (A406.H)
444 * Type = SHORT
445 * Count = 1
446 * Default = 0
447 * 0 = Standard
448 * 1 = Landscape
449 * 2 = Portrait
450 * 3 = Night scene
451 * Other = reserved
452 */
453 public static final int TAG_SCENE_CAPTURE_TYPE = 0xA406;
454 /**
455 * This tag indicates the degree of overall image gain adjustment.
456 * Tag = 41991 (A407.H)
457 * Type = SHORT
458 * Count = 1
459 * Default = none
460 * 0 = None
461 * 1 = Low gain up
462 * 2 = High gain up
463 * 3 = Low gain down
464 * 4 = High gain down
465 * Other = reserved
466 */
467 public static final int TAG_GAIN_CONTROL = 0xA407;
468 /**
469 * This tag indicates the direction of contrast processing applied by the camera
470 * when the image was shot.
471 * Tag = 41992 (A408.H)
472 * Type = SHORT
473 * Count = 1
474 * Default = 0
475 * 0 = Normal
476 * 1 = Soft
477 * 2 = Hard
478 * Other = reserved
479 */
480 public static final int TAG_CONTRAST = 0xA408;
481 /**
482 * This tag indicates the direction of saturation processing applied by the camera
483 * when the image was shot.
484 * Tag = 41993 (A409.H)
485 * Type = SHORT
486 * Count = 1
487 * Default = 0
488 * 0 = Normal
489 * 1 = Low saturation
490 * 2 = High saturation
491 * Other = reserved
492 */
493 public static final int TAG_SATURATION = 0xA409;
494 /**
495 * This tag indicates the direction of sharpness processing applied by the camera
496 * when the image was shot.
497 * Tag = 41994 (A40A.H)
498 * Type = SHORT
499 * Count = 1
500 * Default = 0
501 * 0 = Normal
502 * 1 = Soft
503 * 2 = Hard
504 * Other = reserved
505 */
506 public static final int TAG_SHARPNESS = 0xA40A;
507 /**
508 * This tag indicates information on the picture-taking conditions of a particular
509 * camera model. The tag is used only to indicate the picture-taking conditions in
510 * the reader.
511 * Tag = 41995 (A40B.H)
512 * Type = UNDEFINED
513 * Count = Any
514 * Default = none
515 *
516 * The information is recorded in the format shown below. The data is recorded
517 * in Unicode using SHORT type for the number of display rows and columns and
518 * UNDEFINED type for the camera settings. The Unicode (UCS-2) string including
519 * Signature is NULL terminated. The specifics of the Unicode string are as given
520 * in ISO/IEC 10464-1.
521 *
522 * Length Type Meaning
523 * ------+-----------+------------------
524 * 2 SHORT Display columns
525 * 2 SHORT Display rows
526 * Any UNDEFINED Camera setting-1
527 * Any UNDEFINED Camera setting-2
528 * : : :
529 * Any UNDEFINED Camera setting-n
530 */
531 public static final int TAG_DEVICE_SETTING_DESCRIPTION = 0xA40B;
532 /**
533 * This tag indicates the distance to the subject.
534 * Tag = 41996 (A40C.H)
535 * Type = SHORT
536 * Count = 1
537 * Default = none
538 * 0 = unknown
539 * 1 = Macro
540 * 2 = Close view
541 * 3 = Distant view
542 * Other = reserved
543 */
544 public static final int TAG_SUBJECT_DISTANCE_RANGE = 0xA40C;
545
546 /**
547 * This tag indicates an identifier assigned uniquely to each image. It is
548 * recorded as an ASCII string equivalent to hexadecimal notation and 128-bit
549 * fixed length.
550 * Tag = 42016 (A420.H)
551 * Type = ASCII
552 * Count = 33
553 * Default = none
554 */
555 public static final int TAG_IMAGE_UNIQUE_ID = 0xA420;
556 /** String. */
557 public static final int TAG_CAMERA_OWNER_NAME = 0xA430;
558 /** String. */
559 public static final int TAG_BODY_SERIAL_NUMBER = 0xA431;
560 /** An array of four Rational64u numbers giving focal and aperture ranges. */
561 public static final int TAG_LENS_SPECIFICATION = 0xA432;
562 /** String. */
563 public static final int TAG_LENS_MAKE = 0xA433;
564 /** String. */
565 public static final int TAG_LENS_MODEL = 0xA434;
566 /** String. */
567 public static final int TAG_LENS_SERIAL_NUMBER = 0xA435;
568 /** Rational64u. */
569 public static final int TAG_GAMMA = 0xA500;
570
571 public static final int TAG_PRINT_IM = 0xC4A5;
572
573 public static final int TAG_PANASONIC_TITLE = 0xC6D2;
574 public static final int TAG_PANASONIC_TITLE_2 = 0xC6D3;
575
576 public static final int TAG_PADDING = 0xEA1C;
577
578 public static final int TAG_LENS = 0xFDEA;
579
580 protected static void addExifTagNames(HashMap<Integer, String> map)
581 {
582 map.put(TAG_INTEROP_INDEX, "Interoperability Index");
583 map.put(TAG_INTEROP_VERSION, "Interoperability Version");
584 map.put(TAG_NEW_SUBFILE_TYPE, "New Subfile Type");
585 map.put(TAG_SUBFILE_TYPE, "Subfile Type");
586 map.put(TAG_IMAGE_WIDTH, "Image Width");
587 map.put(TAG_IMAGE_HEIGHT, "Image Height");
588 map.put(TAG_BITS_PER_SAMPLE, "Bits Per Sample");
589 map.put(TAG_COMPRESSION, "Compression");
590 map.put(TAG_PHOTOMETRIC_INTERPRETATION, "Photometric Interpretation");
591 map.put(TAG_THRESHOLDING, "Thresholding");
592 map.put(TAG_FILL_ORDER, "Fill Order");
593 map.put(TAG_DOCUMENT_NAME, "Document Name");
594 map.put(TAG_IMAGE_DESCRIPTION, "Image Description");
595 map.put(TAG_MAKE, "Make");
596 map.put(TAG_MODEL, "Model");
597 map.put(TAG_STRIP_OFFSETS, "Strip Offsets");
598 map.put(TAG_ORIENTATION, "Orientation");
599 map.put(TAG_SAMPLES_PER_PIXEL, "Samples Per Pixel");
600 map.put(TAG_ROWS_PER_STRIP, "Rows Per Strip");
601 map.put(TAG_STRIP_BYTE_COUNTS, "Strip Byte Counts");
602 map.put(TAG_MIN_SAMPLE_VALUE, "Minimum sample value");
603 map.put(TAG_MAX_SAMPLE_VALUE, "Maximum sample value");
604 map.put(TAG_X_RESOLUTION, "X Resolution");
605 map.put(TAG_Y_RESOLUTION, "Y Resolution");
606 map.put(TAG_PLANAR_CONFIGURATION, "Planar Configuration");
607 map.put(TAG_PAGE_NAME, "Page Name");
608 map.put(TAG_RESOLUTION_UNIT, "Resolution Unit");
609 map.put(TAG_TRANSFER_FUNCTION, "Transfer Function");
610 map.put(TAG_SOFTWARE, "Software");
611 map.put(TAG_DATETIME, "Date/Time");
612 map.put(TAG_ARTIST, "Artist");
613 map.put(TAG_PREDICTOR, "Predictor");
614 map.put(TAG_HOST_COMPUTER, "Host Computer");
615 map.put(TAG_WHITE_POINT, "White Point");
616 map.put(TAG_PRIMARY_CHROMATICITIES, "Primary Chromaticities");
617 map.put(TAG_TILE_WIDTH, "Tile Width");
618 map.put(TAG_TILE_LENGTH, "Tile Length");
619 map.put(TAG_TILE_OFFSETS, "Tile Offsets");
620 map.put(TAG_TILE_BYTE_COUNTS, "Tile Byte Counts");
621 map.put(TAG_SUB_IFD_OFFSET, "Sub IFD Pointer(s)");
622 map.put(TAG_TRANSFER_RANGE, "Transfer Range");
623 map.put(TAG_JPEG_TABLES, "JPEG Tables");
624 map.put(TAG_JPEG_PROC, "JPEG Proc");
625 map.put(TAG_YCBCR_COEFFICIENTS, "YCbCr Coefficients");
626 map.put(TAG_YCBCR_SUBSAMPLING, "YCbCr Sub-Sampling");
627 map.put(TAG_YCBCR_POSITIONING, "YCbCr Positioning");
628 map.put(TAG_REFERENCE_BLACK_WHITE, "Reference Black/White");
629 map.put(TAG_RELATED_IMAGE_FILE_FORMAT, "Related Image File Format");
630 map.put(TAG_RELATED_IMAGE_WIDTH, "Related Image Width");
631 map.put(TAG_RELATED_IMAGE_HEIGHT, "Related Image Height");
632 map.put(TAG_RATING, "Rating");
633 map.put(TAG_CFA_REPEAT_PATTERN_DIM, "CFA Repeat Pattern Dim");
634 map.put(TAG_CFA_PATTERN_2, "CFA Pattern");
635 map.put(TAG_BATTERY_LEVEL, "Battery Level");
636 map.put(TAG_COPYRIGHT, "Copyright");
637 map.put(TAG_EXPOSURE_TIME, "Exposure Time");
638 map.put(TAG_FNUMBER, "F-Number");
639 map.put(TAG_IPTC_NAA, "IPTC/NAA");
640 map.put(TAG_INTER_COLOR_PROFILE, "Inter Color Profile");
641 map.put(TAG_EXPOSURE_PROGRAM, "Exposure Program");
642 map.put(TAG_SPECTRAL_SENSITIVITY, "Spectral Sensitivity");
643 map.put(TAG_ISO_EQUIVALENT, "ISO Speed Ratings");
644 map.put(TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION, "Opto-electric Conversion Function (OECF)");
645 map.put(TAG_INTERLACE, "Interlace");
646 map.put(TAG_TIME_ZONE_OFFSET_TIFF_EP, "Time Zone Offset");
647 map.put(TAG_SELF_TIMER_MODE_TIFF_EP, "Self Timer Mode");
648 map.put(TAG_SENSITIVITY_TYPE, "Sensitivity Type");
649 map.put(TAG_STANDARD_OUTPUT_SENSITIVITY, "Standard Output Sensitivity");
650 map.put(TAG_RECOMMENDED_EXPOSURE_INDEX, "Recommended Exposure Index");
651 map.put(TAG_TIME_ZONE_OFFSET, "Time Zone Offset");
652 map.put(TAG_SELF_TIMER_MODE, "Self Timer Mode");
653 map.put(TAG_EXIF_VERSION, "Exif Version");
654 map.put(TAG_DATETIME_ORIGINAL, "Date/Time Original");
655 map.put(TAG_DATETIME_DIGITIZED, "Date/Time Digitized");
656 map.put(TAG_COMPONENTS_CONFIGURATION, "Components Configuration");
657 map.put(TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL, "Compressed Bits Per Pixel");
658 map.put(TAG_SHUTTER_SPEED, "Shutter Speed Value");
659 map.put(TAG_APERTURE, "Aperture Value");
660 map.put(TAG_BRIGHTNESS_VALUE, "Brightness Value");
661 map.put(TAG_EXPOSURE_BIAS, "Exposure Bias Value");
662 map.put(TAG_MAX_APERTURE, "Max Aperture Value");
663 map.put(TAG_SUBJECT_DISTANCE, "Subject Distance");
664 map.put(TAG_METERING_MODE, "Metering Mode");
665 map.put(TAG_LIGHT_SOURCE, "Light Source");
666 map.put(TAG_WHITE_BALANCE, "White Balance");
667 map.put(TAG_FLASH, "Flash");
668 map.put(TAG_FOCAL_LENGTH, "Focal Length");
669 map.put(TAG_FLASH_ENERGY_TIFF_EP, "Flash Energy");
670 map.put(TAG_SPATIAL_FREQ_RESPONSE_TIFF_EP, "Spatial Frequency Response");
671 map.put(TAG_NOISE, "Noise");
672 map.put(TAG_FOCAL_PLANE_X_RESOLUTION_TIFF_EP, "Focal Plane X Resolution");
673 map.put(TAG_FOCAL_PLANE_Y_RESOLUTION_TIFF_EP, "Focal Plane Y Resolution");
674 map.put(TAG_IMAGE_NUMBER, "Image Number");
675 map.put(TAG_SECURITY_CLASSIFICATION, "Security Classification");
676 map.put(TAG_IMAGE_HISTORY, "Image History");
677 map.put(TAG_SUBJECT_LOCATION_TIFF_EP, "Subject Location");
678 map.put(TAG_EXPOSURE_INDEX_TIFF_EP, "Exposure Index");
679 map.put(TAG_STANDARD_ID_TIFF_EP, "TIFF/EP Standard ID");
680 map.put(TAG_MAKERNOTE, "Makernote");
681 map.put(TAG_USER_COMMENT, "User Comment");
682 map.put(TAG_SUBSECOND_TIME, "Sub-Sec Time");
683 map.put(TAG_SUBSECOND_TIME_ORIGINAL, "Sub-Sec Time Original");
684 map.put(TAG_SUBSECOND_TIME_DIGITIZED, "Sub-Sec Time Digitized");
685 map.put(TAG_WIN_TITLE, "Windows XP Title");
686 map.put(TAG_WIN_COMMENT, "Windows XP Comment");
687 map.put(TAG_WIN_AUTHOR, "Windows XP Author");
688 map.put(TAG_WIN_KEYWORDS, "Windows XP Keywords");
689 map.put(TAG_WIN_SUBJECT, "Windows XP Subject");
690 map.put(TAG_FLASHPIX_VERSION, "FlashPix Version");
691 map.put(TAG_COLOR_SPACE, "Color Space");
692 map.put(TAG_EXIF_IMAGE_WIDTH, "Exif Image Width");
693 map.put(TAG_EXIF_IMAGE_HEIGHT, "Exif Image Height");
694 map.put(TAG_RELATED_SOUND_FILE, "Related Sound File");
695 map.put(TAG_FLASH_ENERGY, "Flash Energy");
696 map.put(TAG_SPATIAL_FREQ_RESPONSE, "Spatial Frequency Response");
697 map.put(TAG_FOCAL_PLANE_X_RESOLUTION, "Focal Plane X Resolution");
698 map.put(TAG_FOCAL_PLANE_Y_RESOLUTION, "Focal Plane Y Resolution");
699 map.put(TAG_FOCAL_PLANE_RESOLUTION_UNIT, "Focal Plane Resolution Unit");
700 map.put(TAG_SUBJECT_LOCATION, "Subject Location");
701 map.put(TAG_EXPOSURE_INDEX, "Exposure Index");
702 map.put(TAG_SENSING_METHOD, "Sensing Method");
703 map.put(TAG_FILE_SOURCE, "File Source");
704 map.put(TAG_SCENE_TYPE, "Scene Type");
705 map.put(TAG_CFA_PATTERN, "CFA Pattern");
706 map.put(TAG_CUSTOM_RENDERED, "Custom Rendered");
707 map.put(TAG_EXPOSURE_MODE, "Exposure Mode");
708 map.put(TAG_WHITE_BALANCE_MODE, "White Balance Mode");
709 map.put(TAG_DIGITAL_ZOOM_RATIO, "Digital Zoom Ratio");
710 map.put(TAG_35MM_FILM_EQUIV_FOCAL_LENGTH, "Focal Length 35");
711 map.put(TAG_SCENE_CAPTURE_TYPE, "Scene Capture Type");
712 map.put(TAG_GAIN_CONTROL, "Gain Control");
713 map.put(TAG_CONTRAST, "Contrast");
714 map.put(TAG_SATURATION, "Saturation");
715 map.put(TAG_SHARPNESS, "Sharpness");
716 map.put(TAG_DEVICE_SETTING_DESCRIPTION, "Device Setting Description");
717 map.put(TAG_SUBJECT_DISTANCE_RANGE, "Subject Distance Range");
718 map.put(TAG_IMAGE_UNIQUE_ID, "Unique Image ID");
719 map.put(TAG_CAMERA_OWNER_NAME, "Camera Owner Name");
720 map.put(TAG_BODY_SERIAL_NUMBER, "Body Serial Number");
721 map.put(TAG_LENS_SPECIFICATION, "Lens Specification");
722 map.put(TAG_LENS_MAKE, "Lens Make");
723 map.put(TAG_LENS_MODEL, "Lens Model");
724 map.put(TAG_LENS_SERIAL_NUMBER, "Lens Serial Number");
725 map.put(TAG_GAMMA, "Gamma");
726 map.put(TAG_PRINT_IM, "Print IM");
727 map.put(TAG_PANASONIC_TITLE, "Panasonic Title");
728 map.put(TAG_PANASONIC_TITLE_2, "Panasonic Title (2)");
729 map.put(TAG_PADDING, "Padding");
730 map.put(TAG_LENS, "Lens");
731 }
732}
Note: See TracBrowser for help on using the repository browser.