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

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

fix #15505 - update to metadata-extractor 2.10.1

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