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

Last change on this file since 15744 was 15217, checked in by Don-vip, 7 years ago

see #17848 - update to metadata-extractor 2.12.0

File size: 36.3 KB
Line 
1/*
2 * Copyright 2002-2019 Drew Noakes and contributors
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_PHOTOSHOP_SETTINGS = 0x8649;
192 public static final int TAG_INTER_COLOR_PROFILE = 0x8773;
193 /**
194 * Exposure program that the camera used when image was taken. '1' means
195 * manual control, '2' program normal, '3' aperture priority, '4' shutter
196 * priority, '5' program creative (slow program), '6' program action
197 * (high-speed program), '7' portrait mode, '8' landscape mode.
198 */
199 public static final int TAG_EXPOSURE_PROGRAM = 0x8822;
200 public static final int TAG_SPECTRAL_SENSITIVITY = 0x8824;
201 public static final int TAG_ISO_EQUIVALENT = 0x8827;
202 /**
203 * Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524.
204 * <p>
205 * OECF is the relationship between the camera optical input and the image values.
206 * <p>
207 * The values are:
208 * <ul>
209 * <li>Two shorts, indicating respectively number of columns, and number of rows.</li>
210 * <li>For each column, the column name in a null-terminated ASCII string.</li>
211 * <li>For each cell, an SRATIONAL value.</li>
212 * </ul>
213 */
214 public static final int TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION = 0x8828;
215 public static final int TAG_INTERLACE = 0x8829;
216 public static final int TAG_TIME_ZONE_OFFSET_TIFF_EP = 0x882A;
217 public static final int TAG_SELF_TIMER_MODE_TIFF_EP = 0x882B;
218 /**
219 * Applies to ISO tag.
220 *
221 * 0 = Unknown
222 * 1 = Standard Output Sensitivity
223 * 2 = Recommended Exposure Index
224 * 3 = ISO Speed
225 * 4 = Standard Output Sensitivity and Recommended Exposure Index
226 * 5 = Standard Output Sensitivity and ISO Speed
227 * 6 = Recommended Exposure Index and ISO Speed
228 * 7 = Standard Output Sensitivity, Recommended Exposure Index and ISO Speed
229 */
230 public static final int TAG_SENSITIVITY_TYPE = 0x8830;
231 public static final int TAG_STANDARD_OUTPUT_SENSITIVITY = 0x8831;
232 public static final int TAG_RECOMMENDED_EXPOSURE_INDEX = 0x8832;
233 public static final int TAG_ISO_SPEED = 0x8833;
234 public static final int TAG_ISO_SPEED_LATITUDE_YYY = 0x8834;
235 public static final int TAG_ISO_SPEED_LATITUDE_ZZZ = 0x8835;
236
237 public static final int TAG_EXIF_VERSION = 0x9000;
238 public static final int TAG_DATETIME_ORIGINAL = 0x9003;
239 public static final int TAG_DATETIME_DIGITIZED = 0x9004;
240 public static final int TAG_OFFSET_TIME = 0x9010;
241 public static final int TAG_OFFSET_TIME_ORIGINAL = 0x9011;
242 public static final int TAG_OFFSET_TIME_DIGITIZED = 0x9012;
243
244 public static final int TAG_COMPONENTS_CONFIGURATION = 0x9101;
245 /**
246 * Average (rough estimate) compression level in JPEG bits per pixel.
247 * */
248 public static final int TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL = 0x9102;
249
250 /**
251 * Shutter speed by APEX value. To convert this value to ordinary 'Shutter Speed';
252 * calculate this value's power of 2, then reciprocal. For example, if the
253 * ShutterSpeedValue is '4', shutter speed is 1/(24)=1/16 second.
254 */
255 public static final int TAG_SHUTTER_SPEED = 0x9201;
256 /**
257 * The actual aperture value of lens when the image was taken. Unit is APEX.
258 * To convert this value to ordinary F-number (F-stop), calculate this value's
259 * power of root 2 (=1.4142). For example, if the ApertureValue is '5',
260 * F-number is 1.4142^5 = F5.6.
261 */
262 public static final int TAG_APERTURE = 0x9202;
263 public static final int TAG_BRIGHTNESS_VALUE = 0x9203;
264 public static final int TAG_EXPOSURE_BIAS = 0x9204;
265 /**
266 * Maximum aperture value of lens. You can convert to F-number by calculating
267 * power of root 2 (same process of ApertureValue:0x9202).
268 * The actual aperture value of lens when the image was taken. To convert this
269 * value to ordinary f-number(f-stop), calculate the value's power of root 2
270 * (=1.4142). For example, if the ApertureValue is '5', f-number is 1.41425^5 = F5.6.
271 */
272 public static final int TAG_MAX_APERTURE = 0x9205;
273 /**
274 * Indicates the distance the autofocus camera is focused to. Tends to be less accurate as distance increases.
275 */
276 public static final int TAG_SUBJECT_DISTANCE = 0x9206;
277 /**
278 * Exposure metering method. '0' means unknown, '1' average, '2' center
279 * weighted average, '3' spot, '4' multi-spot, '5' multi-segment, '6' partial,
280 * '255' other.
281 */
282 public static final int TAG_METERING_MODE = 0x9207;
283
284 /**
285 * @deprecated use {@link com.drew.metadata.exif.ExifDirectoryBase#TAG_WHITE_BALANCE} instead.
286 */
287 @Deprecated
288 public static final int TAG_LIGHT_SOURCE = 0x9208;
289 /**
290 * White balance (aka light source). '0' means unknown, '1' daylight,
291 * '2' fluorescent, '3' tungsten, '10' flash, '17' standard light A,
292 * '18' standard light B, '19' standard light C, '20' D55, '21' D65,
293 * '22' D75, '255' other.
294 */
295 public static final int TAG_WHITE_BALANCE = 0x9208;
296 /**
297 * 0x0 = 0000000 = No Flash
298 * 0x1 = 0000001 = Fired
299 * 0x5 = 0000101 = Fired, Return not detected
300 * 0x7 = 0000111 = Fired, Return detected
301 * 0x9 = 0001001 = On
302 * 0xd = 0001101 = On, Return not detected
303 * 0xf = 0001111 = On, Return detected
304 * 0x10 = 0010000 = Off
305 * 0x18 = 0011000 = Auto, Did not fire
306 * 0x19 = 0011001 = Auto, Fired
307 * 0x1d = 0011101 = Auto, Fired, Return not detected
308 * 0x1f = 0011111 = Auto, Fired, Return detected
309 * 0x20 = 0100000 = No flash function
310 * 0x41 = 1000001 = Fired, Red-eye reduction
311 * 0x45 = 1000101 = Fired, Red-eye reduction, Return not detected
312 * 0x47 = 1000111 = Fired, Red-eye reduction, Return detected
313 * 0x49 = 1001001 = On, Red-eye reduction
314 * 0x4d = 1001101 = On, Red-eye reduction, Return not detected
315 * 0x4f = 1001111 = On, Red-eye reduction, Return detected
316 * 0x59 = 1011001 = Auto, Fired, Red-eye reduction
317 * 0x5d = 1011101 = Auto, Fired, Red-eye reduction, Return not detected
318 * 0x5f = 1011111 = Auto, Fired, Red-eye reduction, Return detected
319 * 6543210 (positions)
320 *
321 * This is a bitmask.
322 * 0 = flash fired
323 * 1 = return detected
324 * 2 = return able to be detected
325 * 3 = unknown
326 * 4 = auto used
327 * 5 = unknown
328 * 6 = red eye reduction used
329 */
330 public static final int TAG_FLASH = 0x9209;
331 /**
332 * Focal length of lens used to take image. Unit is millimeter.
333 * Nice digital cameras actually save the focal length as a function of how far they are zoomed in.
334 */
335 public static final int TAG_FOCAL_LENGTH = 0x920A;
336
337 public static final int TAG_FLASH_ENERGY_TIFF_EP = 0x920B;
338 public static final int TAG_SPATIAL_FREQ_RESPONSE_TIFF_EP = 0x920C;
339 public static final int TAG_NOISE = 0x920D;
340 public static final int TAG_FOCAL_PLANE_X_RESOLUTION_TIFF_EP = 0x920E;
341 public static final int TAG_FOCAL_PLANE_Y_RESOLUTION_TIFF_EP = 0x920F;
342 public static final int TAG_IMAGE_NUMBER = 0x9211;
343 public static final int TAG_SECURITY_CLASSIFICATION = 0x9212;
344 public static final int TAG_IMAGE_HISTORY = 0x9213;
345 public static final int TAG_SUBJECT_LOCATION_TIFF_EP = 0x9214;
346 public static final int TAG_EXPOSURE_INDEX_TIFF_EP = 0x9215;
347 public static final int TAG_STANDARD_ID_TIFF_EP = 0x9216;
348
349 /**
350 * This tag holds the Exif Makernote. Makernotes are free to be in any format, though they are often IFDs.
351 * To determine the format, we consider the starting bytes of the makernote itself and sometimes the
352 * camera model and make.
353 * <p>
354 * The component count for this tag includes all of the bytes needed for the makernote.
355 */
356 public static final int TAG_MAKERNOTE = 0x927C;
357
358 public static final int TAG_USER_COMMENT = 0x9286;
359
360 public static final int TAG_SUBSECOND_TIME = 0x9290;
361 public static final int TAG_SUBSECOND_TIME_ORIGINAL = 0x9291;
362 public static final int TAG_SUBSECOND_TIME_DIGITIZED = 0x9292;
363
364 public static final int TAG_TEMPERATURE = 0x9400;
365 public static final int TAG_HUMIDITY = 0x9401;
366 public static final int TAG_PRESSURE = 0x9402;
367 public static final int TAG_WATER_DEPTH = 0x9403;
368 public static final int TAG_ACCELERATION = 0x9404;
369 public static final int TAG_CAMERA_ELEVATION_ANGLE = 0x9405;
370
371 /** The image title, as used by Windows XP. */
372 public static final int TAG_WIN_TITLE = 0x9C9B;
373 /** The image comment, as used by Windows XP. */
374 public static final int TAG_WIN_COMMENT = 0x9C9C;
375 /** The image author, as used by Windows XP (called Artist in the Windows shell). */
376 public static final int TAG_WIN_AUTHOR = 0x9C9D;
377 /** The image keywords, as used by Windows XP. */
378 public static final int TAG_WIN_KEYWORDS = 0x9C9E;
379 /** The image subject, as used by Windows XP. */
380 public static final int TAG_WIN_SUBJECT = 0x9C9F;
381
382 public static final int TAG_FLASHPIX_VERSION = 0xA000;
383 /**
384 * Defines Color Space. DCF image must use sRGB color space so value is
385 * always '1'. If the picture uses the other color space, value is
386 * '65535':Uncalibrated.
387 */
388 public static final int TAG_COLOR_SPACE = 0xA001;
389 public static final int TAG_EXIF_IMAGE_WIDTH = 0xA002;
390 public static final int TAG_EXIF_IMAGE_HEIGHT = 0xA003;
391 public static final int TAG_RELATED_SOUND_FILE = 0xA004;
392
393 public static final int TAG_FLASH_ENERGY = 0xA20B;
394 public static final int TAG_SPATIAL_FREQ_RESPONSE = 0xA20C;
395 public static final int TAG_FOCAL_PLANE_X_RESOLUTION = 0xA20E;
396 public static final int TAG_FOCAL_PLANE_Y_RESOLUTION = 0xA20F;
397 /**
398 * Unit of FocalPlaneXResolution/FocalPlaneYResolution. '1' means no-unit,
399 * '2' inch, '3' centimeter.
400 *
401 * Note: Some of Fujifilm's digicam(e.g.FX2700,FX2900,Finepix4700Z/40i etc)
402 * uses value '3' so it must be 'centimeter', but it seems that they use a
403 * '8.3mm?'(1/3in.?) to their ResolutionUnit. Fuji's BUG? Finepix4900Z has
404 * been changed to use value '2' but it doesn't match to actual value also.
405 */
406 public static final int TAG_FOCAL_PLANE_RESOLUTION_UNIT = 0xA210;
407 public static final int TAG_SUBJECT_LOCATION = 0xA214;
408 public static final int TAG_EXPOSURE_INDEX = 0xA215;
409 public static final int TAG_SENSING_METHOD = 0xA217;
410
411 public static final int TAG_FILE_SOURCE = 0xA300;
412 public static final int TAG_SCENE_TYPE = 0xA301;
413 public static final int TAG_CFA_PATTERN = 0xA302;
414
415 /**
416 * This tag indicates the use of special processing on image data, such as rendering
417 * geared to output. When special processing is performed, the reader is expected to
418 * disable or minimize any further processing.
419 * Tag = 41985 (A401.H)
420 * Type = SHORT
421 * Count = 1
422 * Default = 0
423 * 0 = Normal process
424 * 1 = Custom process
425 * Other = reserved
426 */
427 public static final int TAG_CUSTOM_RENDERED = 0xA401;
428 /**
429 * This tag indicates the exposure mode set when the image was shot. In auto-bracketing
430 * mode, the camera shoots a series of frames of the same scene at different exposure settings.
431 * Tag = 41986 (A402.H)
432 * Type = SHORT
433 * Count = 1
434 * Default = none
435 * 0 = Auto exposure
436 * 1 = Manual exposure
437 * 2 = Auto bracket
438 * Other = reserved
439 */
440 public static final int TAG_EXPOSURE_MODE = 0xA402;
441 /**
442 * This tag indicates the white balance mode set when the image was shot.
443 * Tag = 41987 (A403.H)
444 * Type = SHORT
445 * Count = 1
446 * Default = none
447 * 0 = Auto white balance
448 * 1 = Manual white balance
449 * Other = reserved
450 */
451 public static final int TAG_WHITE_BALANCE_MODE = 0xA403;
452 /**
453 * This tag indicates the digital zoom ratio when the image was shot. If the
454 * numerator of the recorded value is 0, this indicates that digital zoom was
455 * not used.
456 * Tag = 41988 (A404.H)
457 * Type = RATIONAL
458 * Count = 1
459 * Default = none
460 */
461 public static final int TAG_DIGITAL_ZOOM_RATIO = 0xA404;
462 /**
463 * This tag indicates the equivalent focal length assuming a 35mm film camera,
464 * in mm. A value of 0 means the focal length is unknown. Note that this tag
465 * differs from the FocalLength tag.
466 * Tag = 41989 (A405.H)
467 * Type = SHORT
468 * Count = 1
469 * Default = none
470 */
471 public static final int TAG_35MM_FILM_EQUIV_FOCAL_LENGTH = 0xA405;
472 /**
473 * This tag indicates the type of scene that was shot. It can also be used to
474 * record the mode in which the image was shot. Note that this differs from
475 * the scene type (SceneType) tag.
476 * Tag = 41990 (A406.H)
477 * Type = SHORT
478 * Count = 1
479 * Default = 0
480 * 0 = Standard
481 * 1 = Landscape
482 * 2 = Portrait
483 * 3 = Night scene
484 * Other = reserved
485 */
486 public static final int TAG_SCENE_CAPTURE_TYPE = 0xA406;
487 /**
488 * This tag indicates the degree of overall image gain adjustment.
489 * Tag = 41991 (A407.H)
490 * Type = SHORT
491 * Count = 1
492 * Default = none
493 * 0 = None
494 * 1 = Low gain up
495 * 2 = High gain up
496 * 3 = Low gain down
497 * 4 = High gain down
498 * Other = reserved
499 */
500 public static final int TAG_GAIN_CONTROL = 0xA407;
501 /**
502 * This tag indicates the direction of contrast processing applied by the camera
503 * when the image was shot.
504 * Tag = 41992 (A408.H)
505 * Type = SHORT
506 * Count = 1
507 * Default = 0
508 * 0 = Normal
509 * 1 = Soft
510 * 2 = Hard
511 * Other = reserved
512 */
513 public static final int TAG_CONTRAST = 0xA408;
514 /**
515 * This tag indicates the direction of saturation processing applied by the camera
516 * when the image was shot.
517 * Tag = 41993 (A409.H)
518 * Type = SHORT
519 * Count = 1
520 * Default = 0
521 * 0 = Normal
522 * 1 = Low saturation
523 * 2 = High saturation
524 * Other = reserved
525 */
526 public static final int TAG_SATURATION = 0xA409;
527 /**
528 * This tag indicates the direction of sharpness processing applied by the camera
529 * when the image was shot.
530 * Tag = 41994 (A40A.H)
531 * Type = SHORT
532 * Count = 1
533 * Default = 0
534 * 0 = Normal
535 * 1 = Soft
536 * 2 = Hard
537 * Other = reserved
538 */
539 public static final int TAG_SHARPNESS = 0xA40A;
540 /**
541 * This tag indicates information on the picture-taking conditions of a particular
542 * camera model. The tag is used only to indicate the picture-taking conditions in
543 * the reader.
544 * Tag = 41995 (A40B.H)
545 * Type = UNDEFINED
546 * Count = Any
547 * Default = none
548 *
549 * The information is recorded in the format shown below. The data is recorded
550 * in Unicode using SHORT type for the number of display rows and columns and
551 * UNDEFINED type for the camera settings. The Unicode (UCS-2) string including
552 * Signature is NULL terminated. The specifics of the Unicode string are as given
553 * in ISO/IEC 10464-1.
554 *
555 * Length Type Meaning
556 * ------+-----------+------------------
557 * 2 SHORT Display columns
558 * 2 SHORT Display rows
559 * Any UNDEFINED Camera setting-1
560 * Any UNDEFINED Camera setting-2
561 * : : :
562 * Any UNDEFINED Camera setting-n
563 */
564 public static final int TAG_DEVICE_SETTING_DESCRIPTION = 0xA40B;
565 /**
566 * This tag indicates the distance to the subject.
567 * Tag = 41996 (A40C.H)
568 * Type = SHORT
569 * Count = 1
570 * Default = none
571 * 0 = unknown
572 * 1 = Macro
573 * 2 = Close view
574 * 3 = Distant view
575 * Other = reserved
576 */
577 public static final int TAG_SUBJECT_DISTANCE_RANGE = 0xA40C;
578
579 /**
580 * This tag indicates an identifier assigned uniquely to each image. It is
581 * recorded as an ASCII string equivalent to hexadecimal notation and 128-bit
582 * fixed length.
583 * Tag = 42016 (A420.H)
584 * Type = ASCII
585 * Count = 33
586 * Default = none
587 */
588 public static final int TAG_IMAGE_UNIQUE_ID = 0xA420;
589 /** String. */
590 public static final int TAG_CAMERA_OWNER_NAME = 0xA430;
591 /** String. */
592 public static final int TAG_BODY_SERIAL_NUMBER = 0xA431;
593 /** An array of four Rational64u numbers giving focal and aperture ranges. */
594 public static final int TAG_LENS_SPECIFICATION = 0xA432;
595 /** String. */
596 public static final int TAG_LENS_MAKE = 0xA433;
597 /** String. */
598 public static final int TAG_LENS_MODEL = 0xA434;
599 /** String. */
600 public static final int TAG_LENS_SERIAL_NUMBER = 0xA435;
601 /** Rational64u. */
602 public static final int TAG_GAMMA = 0xA500;
603
604 public static final int TAG_PRINT_IMAGE_MATCHING_INFO = 0xC4A5;
605
606 public static final int TAG_PANASONIC_TITLE = 0xC6D2;
607 public static final int TAG_PANASONIC_TITLE_2 = 0xC6D3;
608
609 public static final int TAG_PADDING = 0xEA1C;
610
611 public static final int TAG_LENS = 0xFDEA;
612
613 protected static void addExifTagNames(HashMap<Integer, String> map)
614 {
615 map.put(TAG_INTEROP_INDEX, "Interoperability Index");
616 map.put(TAG_INTEROP_VERSION, "Interoperability Version");
617 map.put(TAG_NEW_SUBFILE_TYPE, "New Subfile Type");
618 map.put(TAG_SUBFILE_TYPE, "Subfile Type");
619 map.put(TAG_IMAGE_WIDTH, "Image Width");
620 map.put(TAG_IMAGE_HEIGHT, "Image Height");
621 map.put(TAG_BITS_PER_SAMPLE, "Bits Per Sample");
622 map.put(TAG_COMPRESSION, "Compression");
623 map.put(TAG_PHOTOMETRIC_INTERPRETATION, "Photometric Interpretation");
624 map.put(TAG_THRESHOLDING, "Thresholding");
625 map.put(TAG_FILL_ORDER, "Fill Order");
626 map.put(TAG_DOCUMENT_NAME, "Document Name");
627 map.put(TAG_IMAGE_DESCRIPTION, "Image Description");
628 map.put(TAG_MAKE, "Make");
629 map.put(TAG_MODEL, "Model");
630 map.put(TAG_STRIP_OFFSETS, "Strip Offsets");
631 map.put(TAG_ORIENTATION, "Orientation");
632 map.put(TAG_SAMPLES_PER_PIXEL, "Samples Per Pixel");
633 map.put(TAG_ROWS_PER_STRIP, "Rows Per Strip");
634 map.put(TAG_STRIP_BYTE_COUNTS, "Strip Byte Counts");
635 map.put(TAG_MIN_SAMPLE_VALUE, "Minimum Sample Value");
636 map.put(TAG_MAX_SAMPLE_VALUE, "Maximum Sample Value");
637 map.put(TAG_X_RESOLUTION, "X Resolution");
638 map.put(TAG_Y_RESOLUTION, "Y Resolution");
639 map.put(TAG_PLANAR_CONFIGURATION, "Planar Configuration");
640 map.put(TAG_PAGE_NAME, "Page Name");
641 map.put(TAG_RESOLUTION_UNIT, "Resolution Unit");
642 map.put(TAG_PAGE_NUMBER, "Page Number");
643 map.put(TAG_TRANSFER_FUNCTION, "Transfer Function");
644 map.put(TAG_SOFTWARE, "Software");
645 map.put(TAG_DATETIME, "Date/Time");
646 map.put(TAG_ARTIST, "Artist");
647 map.put(TAG_PREDICTOR, "Predictor");
648 map.put(TAG_HOST_COMPUTER, "Host Computer");
649 map.put(TAG_WHITE_POINT, "White Point");
650 map.put(TAG_PRIMARY_CHROMATICITIES, "Primary Chromaticities");
651 map.put(TAG_TILE_WIDTH, "Tile Width");
652 map.put(TAG_TILE_LENGTH, "Tile Length");
653 map.put(TAG_TILE_OFFSETS, "Tile Offsets");
654 map.put(TAG_TILE_BYTE_COUNTS, "Tile Byte Counts");
655 map.put(TAG_SUB_IFD_OFFSET, "Sub IFD Pointer(s)");
656 map.put(TAG_TRANSFER_RANGE, "Transfer Range");
657 map.put(TAG_JPEG_TABLES, "JPEG Tables");
658 map.put(TAG_JPEG_PROC, "JPEG Proc");
659
660 map.put(TAG_JPEG_RESTART_INTERVAL, "JPEG Restart Interval");
661 map.put(TAG_JPEG_LOSSLESS_PREDICTORS, "JPEG Lossless Predictors");
662 map.put(TAG_JPEG_POINT_TRANSFORMS, "JPEG Point Transforms");
663 map.put(TAG_JPEG_Q_TABLES, "JPEGQ Tables");
664 map.put(TAG_JPEG_DC_TABLES, "JPEGDC Tables");
665 map.put(TAG_JPEG_AC_TABLES, "JPEGAC Tables");
666
667 map.put(TAG_YCBCR_COEFFICIENTS, "YCbCr Coefficients");
668 map.put(TAG_YCBCR_SUBSAMPLING, "YCbCr Sub-Sampling");
669 map.put(TAG_YCBCR_POSITIONING, "YCbCr Positioning");
670 map.put(TAG_REFERENCE_BLACK_WHITE, "Reference Black/White");
671 map.put(TAG_STRIP_ROW_COUNTS, "Strip Row Counts");
672 map.put(TAG_APPLICATION_NOTES, "Application Notes");
673 map.put(TAG_RELATED_IMAGE_FILE_FORMAT, "Related Image File Format");
674 map.put(TAG_RELATED_IMAGE_WIDTH, "Related Image Width");
675 map.put(TAG_RELATED_IMAGE_HEIGHT, "Related Image Height");
676 map.put(TAG_RATING, "Rating");
677 map.put(TAG_CFA_REPEAT_PATTERN_DIM, "CFA Repeat Pattern Dim");
678 map.put(TAG_CFA_PATTERN_2, "CFA Pattern");
679 map.put(TAG_BATTERY_LEVEL, "Battery Level");
680 map.put(TAG_COPYRIGHT, "Copyright");
681 map.put(TAG_EXPOSURE_TIME, "Exposure Time");
682 map.put(TAG_FNUMBER, "F-Number");
683 map.put(TAG_IPTC_NAA, "IPTC/NAA");
684 map.put(TAG_PHOTOSHOP_SETTINGS, "Photoshop Settings");
685 map.put(TAG_INTER_COLOR_PROFILE, "Inter Color Profile");
686 map.put(TAG_EXPOSURE_PROGRAM, "Exposure Program");
687 map.put(TAG_SPECTRAL_SENSITIVITY, "Spectral Sensitivity");
688 map.put(TAG_ISO_EQUIVALENT, "ISO Speed Ratings");
689 map.put(TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION, "Opto-electric Conversion Function (OECF)");
690 map.put(TAG_INTERLACE, "Interlace");
691 map.put(TAG_TIME_ZONE_OFFSET_TIFF_EP, "Time Zone Offset");
692 map.put(TAG_SELF_TIMER_MODE_TIFF_EP, "Self Timer Mode");
693 map.put(TAG_SENSITIVITY_TYPE, "Sensitivity Type");
694 map.put(TAG_STANDARD_OUTPUT_SENSITIVITY, "Standard Output Sensitivity");
695 map.put(TAG_RECOMMENDED_EXPOSURE_INDEX, "Recommended Exposure Index");
696 map.put(TAG_ISO_SPEED, "ISO Speed");
697 map.put(TAG_ISO_SPEED_LATITUDE_YYY, "ISO Speed Latitude yyy");
698 map.put(TAG_ISO_SPEED_LATITUDE_ZZZ, "ISO Speed Latitude zzz");
699 map.put(TAG_EXIF_VERSION, "Exif Version");
700 map.put(TAG_DATETIME_ORIGINAL, "Date/Time Original");
701 map.put(TAG_DATETIME_DIGITIZED, "Date/Time Digitized");
702 map.put(TAG_OFFSET_TIME, "Offset Time");
703 map.put(TAG_OFFSET_TIME_ORIGINAL, "Offset Time Original");
704 map.put(TAG_OFFSET_TIME_DIGITIZED, "Offset Time Digitized");
705 map.put(TAG_COMPONENTS_CONFIGURATION, "Components Configuration");
706 map.put(TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL, "Compressed Bits Per Pixel");
707 map.put(TAG_SHUTTER_SPEED, "Shutter Speed Value");
708 map.put(TAG_APERTURE, "Aperture Value");
709 map.put(TAG_BRIGHTNESS_VALUE, "Brightness Value");
710 map.put(TAG_EXPOSURE_BIAS, "Exposure Bias Value");
711 map.put(TAG_MAX_APERTURE, "Max Aperture Value");
712 map.put(TAG_SUBJECT_DISTANCE, "Subject Distance");
713 map.put(TAG_METERING_MODE, "Metering Mode");
714 map.put(TAG_WHITE_BALANCE, "White Balance");
715 map.put(TAG_FLASH, "Flash");
716 map.put(TAG_FOCAL_LENGTH, "Focal Length");
717 map.put(TAG_FLASH_ENERGY_TIFF_EP, "Flash Energy");
718 map.put(TAG_SPATIAL_FREQ_RESPONSE_TIFF_EP, "Spatial Frequency Response");
719 map.put(TAG_NOISE, "Noise");
720 map.put(TAG_FOCAL_PLANE_X_RESOLUTION_TIFF_EP, "Focal Plane X Resolution");
721 map.put(TAG_FOCAL_PLANE_Y_RESOLUTION_TIFF_EP, "Focal Plane Y Resolution");
722 map.put(TAG_IMAGE_NUMBER, "Image Number");
723 map.put(TAG_SECURITY_CLASSIFICATION, "Security Classification");
724 map.put(TAG_IMAGE_HISTORY, "Image History");
725 map.put(TAG_SUBJECT_LOCATION_TIFF_EP, "Subject Location");
726 map.put(TAG_EXPOSURE_INDEX_TIFF_EP, "Exposure Index");
727 map.put(TAG_STANDARD_ID_TIFF_EP, "TIFF/EP Standard ID");
728 map.put(TAG_MAKERNOTE, "Makernote");
729 map.put(TAG_USER_COMMENT, "User Comment");
730 map.put(TAG_SUBSECOND_TIME, "Sub-Sec Time");
731 map.put(TAG_SUBSECOND_TIME_ORIGINAL, "Sub-Sec Time Original");
732 map.put(TAG_SUBSECOND_TIME_DIGITIZED, "Sub-Sec Time Digitized");
733 map.put(TAG_TEMPERATURE, "Temperature");
734 map.put(TAG_HUMIDITY, "Humidity");
735 map.put(TAG_PRESSURE, "Pressure");
736 map.put(TAG_WATER_DEPTH, "Water Depth");
737 map.put(TAG_ACCELERATION, "Acceleration");
738 map.put(TAG_CAMERA_ELEVATION_ANGLE, "Camera Elevation Angle");
739 map.put(TAG_WIN_TITLE, "Windows XP Title");
740 map.put(TAG_WIN_COMMENT, "Windows XP Comment");
741 map.put(TAG_WIN_AUTHOR, "Windows XP Author");
742 map.put(TAG_WIN_KEYWORDS, "Windows XP Keywords");
743 map.put(TAG_WIN_SUBJECT, "Windows XP Subject");
744 map.put(TAG_FLASHPIX_VERSION, "FlashPix Version");
745 map.put(TAG_COLOR_SPACE, "Color Space");
746 map.put(TAG_EXIF_IMAGE_WIDTH, "Exif Image Width");
747 map.put(TAG_EXIF_IMAGE_HEIGHT, "Exif Image Height");
748 map.put(TAG_RELATED_SOUND_FILE, "Related Sound File");
749 map.put(TAG_FLASH_ENERGY, "Flash Energy");
750 map.put(TAG_SPATIAL_FREQ_RESPONSE, "Spatial Frequency Response");
751 map.put(TAG_FOCAL_PLANE_X_RESOLUTION, "Focal Plane X Resolution");
752 map.put(TAG_FOCAL_PLANE_Y_RESOLUTION, "Focal Plane Y Resolution");
753 map.put(TAG_FOCAL_PLANE_RESOLUTION_UNIT, "Focal Plane Resolution Unit");
754 map.put(TAG_SUBJECT_LOCATION, "Subject Location");
755 map.put(TAG_EXPOSURE_INDEX, "Exposure Index");
756 map.put(TAG_SENSING_METHOD, "Sensing Method");
757 map.put(TAG_FILE_SOURCE, "File Source");
758 map.put(TAG_SCENE_TYPE, "Scene Type");
759 map.put(TAG_CFA_PATTERN, "CFA Pattern");
760 map.put(TAG_CUSTOM_RENDERED, "Custom Rendered");
761 map.put(TAG_EXPOSURE_MODE, "Exposure Mode");
762 map.put(TAG_WHITE_BALANCE_MODE, "White Balance Mode");
763 map.put(TAG_DIGITAL_ZOOM_RATIO, "Digital Zoom Ratio");
764 map.put(TAG_35MM_FILM_EQUIV_FOCAL_LENGTH, "Focal Length 35");
765 map.put(TAG_SCENE_CAPTURE_TYPE, "Scene Capture Type");
766 map.put(TAG_GAIN_CONTROL, "Gain Control");
767 map.put(TAG_CONTRAST, "Contrast");
768 map.put(TAG_SATURATION, "Saturation");
769 map.put(TAG_SHARPNESS, "Sharpness");
770 map.put(TAG_DEVICE_SETTING_DESCRIPTION, "Device Setting Description");
771 map.put(TAG_SUBJECT_DISTANCE_RANGE, "Subject Distance Range");
772 map.put(TAG_IMAGE_UNIQUE_ID, "Unique Image ID");
773 map.put(TAG_CAMERA_OWNER_NAME, "Camera Owner Name");
774 map.put(TAG_BODY_SERIAL_NUMBER, "Body Serial Number");
775 map.put(TAG_LENS_SPECIFICATION, "Lens Specification");
776 map.put(TAG_LENS_MAKE, "Lens Make");
777 map.put(TAG_LENS_MODEL, "Lens Model");
778 map.put(TAG_LENS_SERIAL_NUMBER, "Lens Serial Number");
779 map.put(TAG_GAMMA, "Gamma");
780 map.put(TAG_PRINT_IMAGE_MATCHING_INFO, "Print Image Matching (PIM) Info");
781 map.put(TAG_PANASONIC_TITLE, "Panasonic Title");
782 map.put(TAG_PANASONIC_TITLE_2, "Panasonic Title (2)");
783 map.put(TAG_PADDING, "Padding");
784 map.put(TAG_LENS, "Lens");
785 }
786}
Note: See TracBrowser for help on using the repository browser.