1 /*
2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 package javax.imageio.plugins.tiff;
26 
27 import java.nio.charset.StandardCharsets;
28 import java.util.ArrayList;
29 import java.util.List;
30 
31 /**
32  * A class representing the tags found in an Exif IFD.  Exif is a
33  * standard for annotating images used by most digital camera
34  * manufacturers.  The Exif specification may be found at
35  * <a href="http://www.exif.org/Exif2-2.PDF">
36  * {@code http://www.exif.org/Exif2-2.PDF}
37  * </a>.
38  *
39  * <p> The definitions of the data types referenced by the field
40  * definitions may be found in the {@link TIFFTag TIFFTag} class.
41  *
42  * @since 9
43  */
44 public final class ExifTIFFTagSet extends TIFFTagSet {
45 
46     private static ExifTIFFTagSet theInstance = null;
47 
48     /**
49      * A tag pointing to a GPS info IFD (type LONG).  This tag has
50      * been superseded by {@link ExifParentTIFFTagSet#TAG_GPS_INFO_IFD_POINTER}.
51      */
52     public static final int TAG_GPS_INFO_IFD_POINTER = 34853;
53 
54     /** A tag pointing to an interoperability IFD (type LONG). */
55     public static final int TAG_INTEROPERABILITY_IFD_POINTER = 40965;
56 
57     /**
58      * A tag containing the Exif version number (type UNDEFINED, count =
59      * 4).  Conformance to the Exif 2.1 standard is indicated using
60      * the ASCII value "0210" (with no terminating NUL).
61      *
62      * @see #EXIF_VERSION_2_1
63      * @see #EXIF_VERSION_2_2
64      */
65     public static final int TAG_EXIF_VERSION = 36864;
66 
67     /**
68      * A value to be used with the "ExifVersion" tag to indicate Exif version
69      * 2.1.  The value equals the US-ASCII encoding of the byte array
70      * {@code {'0', '2', '1', '0'}}.
71      *
72      * @see #TAG_EXIF_VERSION
73      */
74     public static final String EXIF_VERSION_2_1 = "0210";
75 
76     /**
77      * A value to be used with the "ExifVersion" tag to indicate Exif version
78      * 2.2.  The value equals the US-ASCII encoding of the byte array
79      * {@code {'0', '2', '2', '0'}}.
80      *
81      * @see #TAG_EXIF_VERSION
82      */
83     public static final String EXIF_VERSION_2_2 = "0220";
84 
85     /**
86      * A tag indicating the FlashPix version number (type UNDEFINED,
87      * count = 4).
88      */
89     public static final int TAG_FLASHPIX_VERSION = 40960;
90 
91     /**
92      * A tag indicating the color space information (type SHORT).  The
93      * legal values are given by the {@code COLOR_SPACE_*}
94      * constants.
95      *
96      * @see #COLOR_SPACE_SRGB
97      * @see #COLOR_SPACE_UNCALIBRATED
98      */
99     public static final int TAG_COLOR_SPACE = 40961;
100 
101     /**
102      * A value to be used with the "ColorSpace" tag.
103      *
104      * @see #TAG_COLOR_SPACE
105      */
106     public static final int COLOR_SPACE_SRGB = 1;
107 
108     /**
109      * A value to be used with the "ColorSpace" tag.
110      *
111      * @see #TAG_COLOR_SPACE
112      */
113     public static final int COLOR_SPACE_UNCALIBRATED = 0xFFFF;
114 
115     /**
116      * A tag containing the components configuration information (type
117      * UNDEFINED, count = 4).
118      *
119      * @see #COMPONENTS_CONFIGURATION_DOES_NOT_EXIST
120      * @see #COMPONENTS_CONFIGURATION_Y
121      * @see #COMPONENTS_CONFIGURATION_CB
122      * @see #COMPONENTS_CONFIGURATION_CR
123      * @see #COMPONENTS_CONFIGURATION_R
124      * @see #COMPONENTS_CONFIGURATION_G
125      * @see #COMPONENTS_CONFIGURATION_B
126      */
127     public static final int TAG_COMPONENTS_CONFIGURATION = 37121;
128 
129     /**
130      * A value to be used with the "ComponentsConfiguration" tag.
131      *
132      * @see #TAG_COMPONENTS_CONFIGURATION
133      */
134     public static final int COMPONENTS_CONFIGURATION_DOES_NOT_EXIST = 0;
135 
136     /**
137      * A value to be used with the "ComponentsConfiguration" tag.
138      *
139      * @see #TAG_COMPONENTS_CONFIGURATION
140      */
141     public static final int COMPONENTS_CONFIGURATION_Y = 1;
142 
143     /**
144      * A value to be used with the "ComponentsConfiguration" tag.
145      *
146      * @see #TAG_COMPONENTS_CONFIGURATION
147      */
148     public static final int COMPONENTS_CONFIGURATION_CB = 2;
149 
150     /**
151      * A value to be used with the "ComponentsConfiguration" tag.
152      *
153      * @see #TAG_COMPONENTS_CONFIGURATION
154      */
155     public static final int COMPONENTS_CONFIGURATION_CR = 3;
156 
157     /**
158      * A value to be used with the "ComponentsConfiguration" tag.
159      *
160      * @see #TAG_COMPONENTS_CONFIGURATION
161      */
162     public static final int COMPONENTS_CONFIGURATION_R = 4;
163 
164     /**
165      * A value to be used with the "ComponentsConfiguration" tag.
166      *
167      * @see #TAG_COMPONENTS_CONFIGURATION
168      */
169     public static final int COMPONENTS_CONFIGURATION_G = 5;
170 
171     /**
172      * A value to be used with the "ComponentsConfiguration" tag.
173      *
174      * @see #TAG_COMPONENTS_CONFIGURATION
175      */
176     public static final int COMPONENTS_CONFIGURATION_B = 6;
177 
178     /**
179      * A tag indicating the number of compressed bits per pixel
180      * (type RATIONAL).
181      */
182     public static final int TAG_COMPRESSED_BITS_PER_PIXEL = 37122;
183 
184     /**
185      * A tag indicating the pixel X dimension (type SHORT or LONG).
186      * This value records the valid width of the meaningful image for
187      * a compressed file, whether or not there is padding or a restart
188      * marker.
189      */
190     public static final int TAG_PIXEL_X_DIMENSION = 40962;
191 
192     /**
193      * A tag indicating the pixel Y dimension (type SHORT or LONG).
194      * This value records the valid height of the meaningful image for
195      * a compressed file, whether or not there is padding or a restart
196      * marker.
197      */
198     public static final int TAG_PIXEL_Y_DIMENSION = 40963;
199 
200     /**
201      * A tag indicating a manufacturer-defined maker note (type
202      * UNDEFINED).
203      */
204     public static final int TAG_MAKER_NOTE = 37500;
205 
206     /**
207      * A tag indicating a manufacturer-defined marker note (type UNDEFINED).
208      * This tag has been superseded by {@link #TAG_MAKER_NOTE}.
209      */
210     public static final int TAG_MARKER_NOTE = TAG_MAKER_NOTE;
211 
212     /**
213      * A tag indicating a user comment (type UNDEFINED).  The first 8
214      * bytes are used to specify the character encoding.
215      */
216     public static final int TAG_USER_COMMENT = 37510;
217 
218     /**
219      * A tag indicating the name of a related sound file (type ASCII).
220      */
221     public static final int TAG_RELATED_SOUND_FILE = 40964;
222 
223     /**
224      * A tag indicating the date and time when the original image was
225      * generated (type ASCII).
226      */
227     public static final int TAG_DATE_TIME_ORIGINAL = 36867;
228 
229     /**
230      * A tag indicating the date and time when the image was stored as
231      * digital data (type ASCII).
232      */
233     public static final int TAG_DATE_TIME_DIGITIZED = 36868;
234 
235     /**
236      * A tag used to record fractions of seconds for the "DateTime" tag
237      * (type ASCII).
238      */
239     public static final int TAG_SUB_SEC_TIME = 37520;
240 
241     /**
242      * A tag used to record fractions of seconds for the
243      * "DateTimeOriginal" tag (type ASCII).
244      */
245     public static final int TAG_SUB_SEC_TIME_ORIGINAL = 37521;
246 
247     /**
248      * A tag used to record fractions of seconds for the
249      * "DateTimeDigitized" tag (type ASCII).
250      */
251     public static final int TAG_SUB_SEC_TIME_DIGITIZED = 37522;
252 
253     /**
254      * A tag indicating the exposure time, in seconds (type RATIONAL).
255      */
256     public static final int TAG_EXPOSURE_TIME = 33434;
257 
258     /**
259      * A tag indicating the F number (type RATIONAL).
260      */
261     public static final int TAG_F_NUMBER = 33437;
262 
263     /**
264      * A tag indicating the class of the programs used to set exposure
265      * when the picture was taken (type SHORT).
266      *
267      * @see #EXPOSURE_PROGRAM_NOT_DEFINED
268      * @see #EXPOSURE_PROGRAM_MANUAL
269      * @see #EXPOSURE_PROGRAM_NORMAL_PROGRAM
270      * @see #EXPOSURE_PROGRAM_APERTURE_PRIORITY
271      * @see #EXPOSURE_PROGRAM_SHUTTER_PRIORITY
272      * @see #EXPOSURE_PROGRAM_CREATIVE_PROGRAM
273      * @see #EXPOSURE_PROGRAM_ACTION_PROGRAM
274      * @see #EXPOSURE_PROGRAM_PORTRAIT_MODE
275      * @see #EXPOSURE_PROGRAM_LANDSCAPE_MODE
276      * @see #EXPOSURE_PROGRAM_MAX_RESERVED
277      */
278     public static final int TAG_EXPOSURE_PROGRAM = 34850;
279 
280     /**
281      * A value to be used with the "ExposureProgram" tag.
282      *
283      * @see #TAG_EXPOSURE_PROGRAM
284      */
285     public static final int EXPOSURE_PROGRAM_NOT_DEFINED = 0;
286 
287     /**
288      * A value to be used with the "ExposureProgram" tag.
289      *
290      * @see #TAG_EXPOSURE_PROGRAM
291      */
292     public static final int EXPOSURE_PROGRAM_MANUAL = 1;
293 
294     /**
295      * A value to be used with the "ExposureProgram" tag.
296      *
297      * @see #TAG_EXPOSURE_PROGRAM
298      */
299     public static final int EXPOSURE_PROGRAM_NORMAL_PROGRAM = 2;
300 
301     /**
302      * A value to be used with the "ExposureProgram" tag.
303      *
304      * @see #TAG_EXPOSURE_PROGRAM
305      */
306     public static final int EXPOSURE_PROGRAM_APERTURE_PRIORITY = 3;
307 
308     /**
309      * A value to be used with the "ExposureProgram" tag.
310      *
311      * @see #TAG_EXPOSURE_PROGRAM
312      */
313     public static final int EXPOSURE_PROGRAM_SHUTTER_PRIORITY = 4;
314 
315     /**
316      * A value to be used with the "ExposureProgram" tag.
317      *
318      * @see #TAG_EXPOSURE_PROGRAM
319      */
320     public static final int EXPOSURE_PROGRAM_CREATIVE_PROGRAM = 5;
321 
322     /**
323      * A value to be used with the "ExposureProgram" tag.
324      *
325      * @see #TAG_EXPOSURE_PROGRAM
326      */
327     public static final int EXPOSURE_PROGRAM_ACTION_PROGRAM = 6;
328 
329     /**
330      * A value to be used with the "ExposureProgram" tag.
331      *
332      * @see #TAG_EXPOSURE_PROGRAM
333      */
334     public static final int EXPOSURE_PROGRAM_PORTRAIT_MODE = 7;
335 
336     /**
337      * A value to be used with the "ExposureProgram" tag.
338      *
339      * @see #TAG_EXPOSURE_PROGRAM
340      */
341     public static final int EXPOSURE_PROGRAM_LANDSCAPE_MODE = 8;
342 
343     /**
344      * A value to be used with the "ExposureProgram" tag.
345      *
346      * @see #TAG_EXPOSURE_PROGRAM
347      */
348     public static final int EXPOSURE_PROGRAM_MAX_RESERVED = 255;
349 
350     /**
351      * A tag indicating the spectral sensitivity of each channel of
352      * the camera used (type ASCII).  The tag value is an ASCII string
353      * compatible with the ASTM standard.
354      */
355     public static final int TAG_SPECTRAL_SENSITIVITY = 34852;
356 
357     /**
358      * A tag indicating the ISO speed and ISO latitude of the camera
359      * or input device, as specified in ISO 12232<sup>xiv</sup> (type
360      * SHORT).
361      */
362     public static final int TAG_ISO_SPEED_RATINGS= 34855;
363 
364     /**
365      * A tag indicating the optoelectric conversion function,
366      * specified in ISO 14254<sup>xv</sup> (type UNDEFINED).  OECF is
367      * the relationship between the camera optical input and the image
368      * values.
369      */
370     public static final int TAG_OECF = 34856;
371 
372     /**
373      * A tag indicating the shutter speed (type SRATIONAL).
374      */
375     public static final int TAG_SHUTTER_SPEED_VALUE = 37377;
376 
377     /**
378      * A tag indicating the lens aperture (type RATIONAL).
379      */
380     public static final int TAG_APERTURE_VALUE = 37378;
381 
382     /**
383      * A tag indicating the value of brightness (type SRATIONAL).
384      */
385     public static final int TAG_BRIGHTNESS_VALUE = 37379;
386 
387     /**
388      * A tag indicating the exposure bias (type SRATIONAL).
389      */
390     public static final int TAG_EXPOSURE_BIAS_VALUE = 37380;
391 
392     /**
393      * A tag indicating the smallest F number of the lens (type
394      * RATIONAL).
395      */
396     public static final int TAG_MAX_APERTURE_VALUE = 37381;
397 
398     /**
399      * A tag indicating the distance to the subject, in meters (type
400      * RATIONAL).
401      */
402     public static final int TAG_SUBJECT_DISTANCE = 37382;
403 
404     /**
405      * A tag indicating the metering mode (type SHORT).
406      *
407      * @see #METERING_MODE_UNKNOWN
408      * @see #METERING_MODE_AVERAGE
409      * @see #METERING_MODE_CENTER_WEIGHTED_AVERAGE
410      * @see #METERING_MODE_SPOT
411      * @see #METERING_MODE_MULTI_SPOT
412      * @see #METERING_MODE_PATTERN
413      * @see #METERING_MODE_PARTIAL
414      * @see #METERING_MODE_MIN_RESERVED
415      * @see #METERING_MODE_MAX_RESERVED
416      * @see #METERING_MODE_OTHER
417      */
418     public static final int TAG_METERING_MODE = 37383;
419 
420     /**
421      * A value to be used with the "MeteringMode" tag.
422      *
423      * @see #TAG_METERING_MODE
424      */
425     public static final int METERING_MODE_UNKNOWN = 0;
426 
427     /**
428      * A value to be used with the "MeteringMode" tag.
429      *
430      * @see #TAG_METERING_MODE
431      */
432     public static final int METERING_MODE_AVERAGE = 1;
433 
434     /**
435      * A value to be used with the "MeteringMode" tag.
436      *
437      * @see #TAG_METERING_MODE
438      */
439     public static final int METERING_MODE_CENTER_WEIGHTED_AVERAGE = 2;
440 
441     /**
442      * A value to be used with the "MeteringMode" tag.
443      *
444      * @see #TAG_METERING_MODE
445      */
446     public static final int METERING_MODE_SPOT = 3;
447 
448     /**
449      * A value to be used with the "MeteringMode" tag.
450      *
451      * @see #TAG_METERING_MODE
452      */
453     public static final int METERING_MODE_MULTI_SPOT = 4;
454 
455     /**
456      * A value to be used with the "MeteringMode" tag.
457      *
458      * @see #TAG_METERING_MODE
459      */
460     public static final int METERING_MODE_PATTERN = 5;
461 
462     /**
463      * A value to be used with the "MeteringMode" tag.
464      *
465      * @see #TAG_METERING_MODE
466      */
467     public static final int METERING_MODE_PARTIAL = 6;
468 
469     /**
470      * A value to be used with the "MeteringMode" tag.
471      *
472      * @see #TAG_METERING_MODE
473      */
474     public static final int METERING_MODE_MIN_RESERVED = 7;
475 
476     /**
477      * A value to be used with the "MeteringMode" tag.
478      *
479      * @see #TAG_METERING_MODE
480      */
481     public static final int METERING_MODE_MAX_RESERVED = 254;
482 
483     /**
484      * A value to be used with the "MeteringMode" tag.
485      *
486      * @see #TAG_METERING_MODE
487      */
488     public static final int METERING_MODE_OTHER = 255;
489 
490     /**
491      * A tag indicatingthe kind of light source (type SHORT).
492      *
493      * @see #LIGHT_SOURCE_UNKNOWN
494      * @see #LIGHT_SOURCE_DAYLIGHT
495      * @see #LIGHT_SOURCE_FLUORESCENT
496      * @see #LIGHT_SOURCE_TUNGSTEN
497      * @see #LIGHT_SOURCE_STANDARD_LIGHT_A
498      * @see #LIGHT_SOURCE_STANDARD_LIGHT_B
499      * @see #LIGHT_SOURCE_STANDARD_LIGHT_C
500      * @see #LIGHT_SOURCE_D55
501      * @see #LIGHT_SOURCE_D65
502      * @see #LIGHT_SOURCE_D75
503      * @see #LIGHT_SOURCE_OTHER
504      */
505     public static final int TAG_LIGHT_SOURCE = 37384;
506 
507     /**
508      * A value to be used with the "LightSource" tag.
509      *
510      * @see #TAG_LIGHT_SOURCE
511      */
512     public static final int LIGHT_SOURCE_UNKNOWN = 0;
513 
514     /**
515      * A value to be used with the "LightSource" tag.
516      *
517      * @see #TAG_LIGHT_SOURCE
518      */
519     public static final int LIGHT_SOURCE_DAYLIGHT = 1;
520 
521     /**
522      * A value to be used with the "LightSource" tag.
523      *
524      * @see #TAG_LIGHT_SOURCE
525      */
526     public static final int LIGHT_SOURCE_FLUORESCENT = 2;
527 
528     /**
529      * A value to be used with the "LightSource" tag.
530      *
531      * @see #TAG_LIGHT_SOURCE
532      */
533     public static final int LIGHT_SOURCE_TUNGSTEN = 3;
534 
535     /**
536      * A value to be used with the "LightSource" tag.
537      *
538      * @see #TAG_LIGHT_SOURCE
539      */
540     public static final int LIGHT_SOURCE_FLASH = 4;
541 
542     /**
543      * A value to be used with the "LightSource" tag.
544      *
545      * @see #TAG_LIGHT_SOURCE
546      */
547     public static final int LIGHT_SOURCE_FINE_WEATHER = 9;
548 
549     /**
550      * A value to be used with the "LightSource" tag.
551      *
552      * @see #TAG_LIGHT_SOURCE
553      */
554     public static final int LIGHT_SOURCE_CLOUDY_WEATHER = 10;
555 
556     /**
557      * A value to be used with the "LightSource" tag.
558      *
559      * @see #TAG_LIGHT_SOURCE
560      */
561     public static final int LIGHT_SOURCE_SHADE = 11;
562 
563     /**
564      * A value to be used with the "LightSource" tag.
565      *
566      * @see #TAG_LIGHT_SOURCE
567      */
568     public static final int LIGHT_SOURCE_DAYLIGHT_FLUORESCENT = 12;
569 
570     /**
571      * A value to be used with the "LightSource" tag.
572      *
573      * @see #TAG_LIGHT_SOURCE
574      */
575     public static final int LIGHT_SOURCE_DAY_WHITE_FLUORESCENT = 13;
576 
577     /**
578      * A value to be used with the "LightSource" tag.
579      *
580      * @see #TAG_LIGHT_SOURCE
581      */
582     public static final int LIGHT_SOURCE_COOL_WHITE_FLUORESCENT = 14;
583 
584     /**
585      * A value to be used with the "LightSource" tag.
586      *
587      * @see #TAG_LIGHT_SOURCE
588      */
589     public static final int LIGHT_SOURCE_WHITE_FLUORESCENT = 15;
590 
591     /**
592      * A value to be used with the "LightSource" tag.
593      *
594      * @see #TAG_LIGHT_SOURCE
595      */
596     public static final int LIGHT_SOURCE_STANDARD_LIGHT_A = 17;
597 
598     /**
599      * A value to be used with the "LightSource" tag.
600      *
601      * @see #TAG_LIGHT_SOURCE
602      */
603     public static final int LIGHT_SOURCE_STANDARD_LIGHT_B = 18;
604 
605     /**
606      * A value to be used with the "LightSource" tag.
607      *
608      * @see #TAG_LIGHT_SOURCE
609      */
610     public static final int LIGHT_SOURCE_STANDARD_LIGHT_C = 19;
611 
612     /**
613      * A value to be used with the "LightSource" tag.
614      *
615      * @see #TAG_LIGHT_SOURCE
616      */
617     public static final int LIGHT_SOURCE_D55 = 20;
618 
619     /**
620      * A value to be used with the "LightSource" tag.
621      *
622      * @see #TAG_LIGHT_SOURCE
623      */
624     public static final int LIGHT_SOURCE_D65 = 21;
625 
626     /**
627      * A value to be used with the "LightSource" tag.
628      *
629      * @see #TAG_LIGHT_SOURCE
630      */
631     public static final int LIGHT_SOURCE_D75 = 22;
632 
633     /**
634      * A value to be used with the "LightSource" tag.
635      *
636      * @see #TAG_LIGHT_SOURCE
637      */
638     public static final int LIGHT_SOURCE_D50 = 23;
639 
640     /**
641      * A value to be used with the "LightSource" tag.
642      *
643      * @see #TAG_LIGHT_SOURCE
644      */
645     public static final int LIGHT_SOURCE_ISO_STUDIO_TUNGSTEN = 24;
646 
647     /**
648      * A value to be used with the "LightSource" tag.
649      *
650      * @see #TAG_LIGHT_SOURCE
651      */
652     public static final int LIGHT_SOURCE_OTHER = 255;
653 
654     /**
655      * A tag indicating the flash firing status and flash return
656      * status (type SHORT).
657      *
658      * @see #FLASH_DID_NOT_FIRE
659      * @see #FLASH_FIRED
660      * @see #FLASH_STROBE_RETURN_LIGHT_NOT_DETECTED
661      * @see #FLASH_STROBE_RETURN_LIGHT_DETECTED
662      */
663     public static final int TAG_FLASH = 37385;
664 
665     /**
666      * A value to be used with the "Flash" tag, indicating that the
667      * flash did not fire.
668      *
669      * @see #TAG_FLASH
670      */
671     public static final int FLASH_DID_NOT_FIRE = 0x0;
672 
673     /**
674      * A value to be used with the "Flash" tag, indicating that the
675      * flash fired, but the strobe return status is unknown.
676      *
677      * @see #TAG_FLASH
678      */
679     public static final int FLASH_FIRED = 0x1;
680 
681     /**
682      * A value to be used with the "Flash" tag, indicating that the
683      * flash fired, but the strobe return light was not detected.
684      *
685      * @see #TAG_FLASH
686      */
687     public static final int FLASH_STROBE_RETURN_LIGHT_NOT_DETECTED = 0x5;
688 
689     /**
690      * A value to be used with the "Flash" tag, indicating that the
691      * flash fired, and the strobe return light was detected.
692      *
693      * @see #TAG_FLASH
694      */
695     public static final int FLASH_STROBE_RETURN_LIGHT_DETECTED = 0x7;
696 
697     /**
698      * A mask to be used with the "Flash" tag, indicating that the
699      * flash fired.
700      *
701      * @see #TAG_FLASH
702      */
703     public static final int FLASH_MASK_FIRED = 0x1;
704 
705     /**
706      * A mask to be used with the "Flash" tag, indicating strobe return
707      * light not detected.
708      *
709      * @see #TAG_FLASH
710      */
711     public static final int FLASH_MASK_RETURN_NOT_DETECTED = 0x4;
712 
713     /**
714      * A mask to be used with the "Flash" tag, indicating strobe return
715      * light detected.
716      *
717      * @see #TAG_FLASH
718      */
719     public static final int FLASH_MASK_RETURN_DETECTED = 0x6;
720 
721     /**
722      * A mask to be used with the "Flash" tag, indicating compulsory flash
723      * firing mode.
724      *
725      * @see #TAG_FLASH
726      */
727     public static final int FLASH_MASK_MODE_FLASH_FIRING = 0x8;
728 
729     /**
730      * A mask to be used with the "Flash" tag, indicating compulsory flash
731      * suppression mode.
732      *
733      * @see #TAG_FLASH
734      */
735     public static final int FLASH_MASK_MODE_FLASH_SUPPRESSION = 0x10;
736 
737     /**
738      * A mask to be used with the "Flash" tag, indicating auto mode.
739      *
740      * @see #TAG_FLASH
741      */
742     public static final int FLASH_MASK_MODE_AUTO = 0x18;
743 
744     /**
745      * A mask to be used with the "Flash" tag, indicating no flash function
746      * present.
747      *
748      * @see #TAG_FLASH
749      */
750     public static final int FLASH_MASK_FUNCTION_NOT_PRESENT = 0x20;
751 
752     /**
753      * A mask to be used with the "Flash" tag, indicating red-eye reduction
754      * supported.
755      *
756      * @see #TAG_FLASH
757      */
758     public static final int FLASH_MASK_RED_EYE_REDUCTION = 0x40;
759 
760     /**
761      * A tag indicating the actual focal length of the lens, in
762      * millimeters (type RATIONAL).
763      */
764     public static final int TAG_FOCAL_LENGTH = 37386;
765 
766     /**
767      * A tag indicating the location and area of the main subject in
768      * the overall scene.
769      */
770     public static final int TAG_SUBJECT_AREA = 37396;
771 
772     /**
773      * A tag indicating the strobe energy at the time the image was
774      * captured, as measured in Beam Candle Power Seconds (BCPS) (type
775      * RATIONAL).
776      */
777     public static final int TAG_FLASH_ENERGY = 41483;
778 
779     /**
780      * A tag indicating the camera or input device spatial frequency
781      * table and SFR values in the direction of image width, image
782      * height, and diagonal direction, as specified in ISO
783      * 12233<sup>xvi</sup> (type UNDEFINED).
784      */
785     public static final int TAG_SPATIAL_FREQUENCY_RESPONSE = 41484;
786 
787     /**
788      * Indicates the number of pixels in the image width (X) direction
789      * per FocalPlaneResolutionUnit on the camera focal plane (type
790      * RATIONAL).
791      */
792     public static final int TAG_FOCAL_PLANE_X_RESOLUTION = 41486;
793 
794     /**
795      * Indicate the number of pixels in the image height (Y) direction
796      * per FocalPlaneResolutionUnit on the camera focal plane (type
797      * RATIONAL).
798      */
799     public static final int TAG_FOCAL_PLANE_Y_RESOLUTION = 41487;
800 
801     /**
802      * Indicates the unit for measuring FocalPlaneXResolution and
803      * FocalPlaneYResolution (type SHORT).
804      *
805      * @see #FOCAL_PLANE_RESOLUTION_UNIT_NONE
806      * @see #FOCAL_PLANE_RESOLUTION_UNIT_INCH
807      * @see #FOCAL_PLANE_RESOLUTION_UNIT_CENTIMETER
808      */
809     public static final int TAG_FOCAL_PLANE_RESOLUTION_UNIT = 41488;
810 
811     /**
812      * A value to be used with the "FocalPlaneResolutionUnit" tag.
813      *
814      * @see #TAG_FOCAL_PLANE_RESOLUTION_UNIT
815      */
816     public static final int FOCAL_PLANE_RESOLUTION_UNIT_NONE = 1;
817 
818     /**
819      * A value to be used with the "FocalPlaneXResolution" tag.
820      *
821      * @see #TAG_FOCAL_PLANE_RESOLUTION_UNIT
822      */
823     public static final int FOCAL_PLANE_RESOLUTION_UNIT_INCH = 2;
824 
825     /**
826      * A value to be used with the "FocalPlaneXResolution" tag.
827      *
828      * @see #TAG_FOCAL_PLANE_RESOLUTION_UNIT
829      */
830     public static final int FOCAL_PLANE_RESOLUTION_UNIT_CENTIMETER = 3;
831 
832     /**
833      * A tag indicating the column and row of the center pixel of the
834      * main subject in the scene (type SHORT, count = 2).
835      */
836     public static final int TAG_SUBJECT_LOCATION = 41492;
837 
838     /**
839      * A tag indicating the exposure index selected on the camera or
840      * input device at the time the image was captured (type
841      * RATIONAL).
842      */
843     public static final int TAG_EXPOSURE_INDEX = 41493;
844 
845     /**
846      * A tag indicating the sensor type on the camera or input device
847      * (type SHORT).
848      *
849      * @see #SENSING_METHOD_NOT_DEFINED
850      * @see #SENSING_METHOD_ONE_CHIP_COLOR_AREA_SENSOR
851      * @see #SENSING_METHOD_TWO_CHIP_COLOR_AREA_SENSOR
852      * @see #SENSING_METHOD_THREE_CHIP_COLOR_AREA_SENSOR
853      * @see #SENSING_METHOD_COLOR_SEQUENTIAL_AREA_SENSOR
854      * @see #SENSING_METHOD_TRILINEAR_SENSOR
855      * @see #SENSING_METHOD_COLOR_SEQUENTIAL_LINEAR_SENSOR
856      */
857     public static final int TAG_SENSING_METHOD = 41495;
858 
859     /**
860      * A value to be used with the "SensingMethod" tag.
861      *
862      * @see #TAG_SENSING_METHOD
863      */
864     public static final int SENSING_METHOD_NOT_DEFINED = 1;
865 
866     /**
867      * A value to be used with the "SensingMethod" tag.
868      *
869      * @see #TAG_SENSING_METHOD
870      */
871     public static final int SENSING_METHOD_ONE_CHIP_COLOR_AREA_SENSOR = 2;
872 
873     /**
874      * A value to be used with the "SensingMethod" tag.
875      *
876      * @see #TAG_SENSING_METHOD
877      */
878     public static final int SENSING_METHOD_TWO_CHIP_COLOR_AREA_SENSOR = 3;
879 
880     /**
881      * A value to be used with the "SensingMethod" tag.
882      *
883      * @see #TAG_SENSING_METHOD
884      */
885     public static final int SENSING_METHOD_THREE_CHIP_COLOR_AREA_SENSOR = 4;
886 
887     /**
888      * A value to be used with the "SensingMethod" tag.
889      *
890      * @see #TAG_SENSING_METHOD
891      */
892     public static final int SENSING_METHOD_COLOR_SEQUENTIAL_AREA_SENSOR = 5;
893 
894     /**
895      * A value to be used with the "SensingMethod" tag.
896      *
897      * @see #TAG_SENSING_METHOD
898      */
899     public static final int SENSING_METHOD_TRILINEAR_SENSOR = 7;
900 
901     /**
902      * A value to be used with the "SensingMethod" tag.
903      *
904      * @see #TAG_SENSING_METHOD
905      */
906     public static final int SENSING_METHOD_COLOR_SEQUENTIAL_LINEAR_SENSOR = 8;
907 
908     /**
909      * A tag indicating the image source (type UNDEFINED).
910      *
911      * @see #FILE_SOURCE_DSC
912      */
913     public static final int TAG_FILE_SOURCE = 41728;
914 
915     /**
916      * A value to be used with the "FileSource" tag.
917      *
918      * @see #TAG_FILE_SOURCE
919      */
920     public static final int FILE_SOURCE_DSC = 3;
921 
922     /**
923      * A tag indicating the type of scene (type UNDEFINED).
924      *
925      * @see #SCENE_TYPE_DSC
926      */
927     public static final int TAG_SCENE_TYPE = 41729;
928 
929     /**
930      * A value to be used with the "SceneType" tag.
931      *
932      * @see #TAG_SCENE_TYPE
933      */
934     public static final int SCENE_TYPE_DSC = 1;
935 
936     /**
937      * A tag indicating the color filter array geometric pattern of
938      * the image sensor when a one-chip color area sensor if used
939      * (type UNDEFINED).
940      */
941     public static final int TAG_CFA_PATTERN = 41730;
942 
943     /**
944      * A tag indicating the use of special processing on image data,
945      * such as rendering geared to output.
946      */
947     public static final int TAG_CUSTOM_RENDERED = 41985;
948 
949     /**
950      * A value to be used with the "CustomRendered" tag.
951      *
952      * @see #TAG_CUSTOM_RENDERED
953      */
954     public static final int CUSTOM_RENDERED_NORMAL = 0;
955 
956     /**
957      * A value to be used with the "CustomRendered" tag.
958      *
959      * @see #TAG_CUSTOM_RENDERED
960      */
961     public static final int CUSTOM_RENDERED_CUSTOM = 1;
962 
963     /**
964      * A tag indicating the exposure mode set when the image was shot.
965      */
966     public static final int TAG_EXPOSURE_MODE = 41986;
967 
968     /**
969      * A value to be used with the "ExposureMode" tag.
970      *
971      * @see #TAG_EXPOSURE_MODE
972      */
973     public static final int EXPOSURE_MODE_AUTO_EXPOSURE = 0;
974 
975     /**
976      * A value to be used with the "ExposureMode" tag.
977      *
978      * @see #TAG_EXPOSURE_MODE
979      */
980     public static final int EXPOSURE_MODE_MANUAL_EXPOSURE = 1;
981 
982     /**
983      * A value to be used with the "ExposureMode" tag.
984      *
985      * @see #TAG_EXPOSURE_MODE
986      */
987     public static final int EXPOSURE_MODE_AUTO_BRACKET = 2;
988 
989     /**
990      * A tag indicating the white balance mode set when the image was shot.
991      */
992     public static final int TAG_WHITE_BALANCE = 41987;
993 
994     /**
995      * A value to be used with the "WhiteBalance" tag.
996      *
997      * @see #TAG_WHITE_BALANCE
998      */
999     public static final int WHITE_BALANCE_AUTO = 0;
1000 
1001     /**
1002      * A value to be used with the "WhiteBalance" tag.
1003      *
1004      * @see #TAG_WHITE_BALANCE
1005      */
1006     public static final int WHITE_BALANCE_MANUAL = 1;
1007 
1008     /**
1009      * A tag indicating the digital zoom ratio when the image was shot.
1010      */
1011     public static final int TAG_DIGITAL_ZOOM_RATIO = 41988;
1012 
1013     /**
1014      * A tag indicating the equivalent focal length assuming a 35mm film
1015      * camera, in millimeters.
1016      */
1017     public static final int TAG_FOCAL_LENGTH_IN_35MM_FILM = 41989;
1018 
1019     /**
1020      * A tag indicating the type of scene that was shot.
1021      */
1022     public static final int TAG_SCENE_CAPTURE_TYPE = 41990;
1023 
1024     /**
1025      * A value to be used with the "SceneCaptureType" tag.
1026      *
1027      * @see #TAG_SCENE_CAPTURE_TYPE
1028      */
1029     public static final int SCENE_CAPTURE_TYPE_STANDARD = 0;
1030 
1031     /**
1032      * A value to be used with the "SceneCaptureType" tag.
1033      *
1034      * @see #TAG_SCENE_CAPTURE_TYPE
1035      */
1036     public static final int SCENE_CAPTURE_TYPE_LANDSCAPE = 1;
1037 
1038     /**
1039      * A value to be used with the "SceneCaptureType" tag.
1040      *
1041      * @see #TAG_SCENE_CAPTURE_TYPE
1042      */
1043     public static final int SCENE_CAPTURE_TYPE_PORTRAIT = 2;
1044 
1045     /**
1046      * A value to be used with the "SceneCaptureType" tag.
1047      *
1048      * @see #TAG_SCENE_CAPTURE_TYPE
1049      */
1050     public static final int SCENE_CAPTURE_TYPE_NIGHT_SCENE = 3;
1051 
1052     /**
1053      * A tag indicating the degree of overall image gain adjustment.
1054      */
1055     public static final int TAG_GAIN_CONTROL = 41991;
1056 
1057     /**
1058      * A value to be used with the "GainControl" tag.
1059      *
1060      * @see #TAG_GAIN_CONTROL
1061      */
1062     public static final int GAIN_CONTROL_NONE = 0;
1063 
1064     /**
1065      * A value to be used with the "GainControl" tag.
1066      *
1067      * @see #TAG_GAIN_CONTROL
1068      */
1069     public static final int GAIN_CONTROL_LOW_GAIN_UP = 1;
1070 
1071     /**
1072      * A value to be used with the "GainControl" tag.
1073      *
1074      * @see #TAG_GAIN_CONTROL
1075      */
1076     public static final int GAIN_CONTROL_HIGH_GAIN_UP = 2;
1077 
1078     /**
1079      * A value to be used with the "GainControl" tag.
1080      *
1081      * @see #TAG_GAIN_CONTROL
1082      */
1083     public static final int GAIN_CONTROL_LOW_GAIN_DOWN = 3;
1084 
1085     /**
1086      * A value to be used with the "GainControl" tag.
1087      *
1088      * @see #TAG_GAIN_CONTROL
1089      */
1090     public static final int GAIN_CONTROL_HIGH_GAIN_DOWN = 4;
1091 
1092     /**
1093      * A tag indicating the direction of contrast processing applied
1094      * by the camera when the image was shot.
1095      */
1096     public static final int TAG_CONTRAST = 41992;
1097 
1098     /**
1099      * A value to be used with the "Contrast" tag.
1100      *
1101      * @see #TAG_CONTRAST
1102      */
1103     public static final int CONTRAST_NORMAL = 0;
1104 
1105     /**
1106      * A value to be used with the "Contrast" tag.
1107      *
1108      * @see #TAG_CONTRAST
1109      */
1110     public static final int CONTRAST_SOFT = 1;
1111 
1112     /**
1113      * A value to be used with the "Contrast" tag.
1114      *
1115      * @see #TAG_CONTRAST
1116      */
1117     public static final int CONTRAST_HARD = 2;
1118 
1119     /**
1120      * A tag indicating the direction of saturation processing
1121      * applied by the camera when the image was shot.
1122      */
1123     public static final int TAG_SATURATION = 41993;
1124 
1125     /**
1126      * A value to be used with the "Saturation" tag.
1127      *
1128      * @see #TAG_SATURATION
1129      */
1130     public static final int SATURATION_NORMAL = 0;
1131 
1132     /**
1133      * A value to be used with the "Saturation" tag.
1134      *
1135      * @see #TAG_SATURATION
1136      */
1137     public static final int SATURATION_LOW = 1;
1138 
1139     /**
1140      * A value to be used with the "Saturation" tag.
1141      *
1142      * @see #TAG_SATURATION
1143      */
1144     public static final int SATURATION_HIGH = 2;
1145 
1146     /**
1147      * A tag indicating the direction of sharpness processing
1148      * applied by the camera when the image was shot.
1149      */
1150     public static final int TAG_SHARPNESS = 41994;
1151 
1152     /**
1153      * A value to be used with the "Sharpness" tag.
1154      *
1155      * @see #TAG_SHARPNESS
1156      */
1157     public static final int SHARPNESS_NORMAL = 0;
1158 
1159     /**
1160      * A value to be used with the "Sharpness" tag.
1161      *
1162      * @see #TAG_SHARPNESS
1163      */
1164     public static final int SHARPNESS_SOFT = 1;
1165 
1166     /**
1167      * A value to be used with the "Sharpness" tag.
1168      *
1169      * @see #TAG_SHARPNESS
1170      */
1171     public static final int SHARPNESS_HARD = 2;
1172 
1173     /**
1174      * A tag indicating information on the picture-taking conditions
1175      * of a particular camera model.
1176      */
1177     public static final int TAG_DEVICE_SETTING_DESCRIPTION = 41995;
1178 
1179     /**
1180      * A tag indicating the distance to the subject.
1181      */
1182     public static final int TAG_SUBJECT_DISTANCE_RANGE = 41996;
1183 
1184     /**
1185      * A value to be used with the "SubjectDistanceRange" tag.
1186      *
1187      * @see #TAG_SUBJECT_DISTANCE_RANGE
1188      */
1189     public static final int SUBJECT_DISTANCE_RANGE_UNKNOWN = 0;
1190 
1191     /**
1192      * A value to be used with the "SubjectDistanceRange" tag.
1193      *
1194      * @see #TAG_SUBJECT_DISTANCE_RANGE
1195      */
1196     public static final int SUBJECT_DISTANCE_RANGE_MACRO = 1;
1197 
1198     /**
1199      * A value to be used with the "SubjectDistanceRange" tag.
1200      *
1201      * @see #TAG_SUBJECT_DISTANCE_RANGE
1202      */
1203     public static final int SUBJECT_DISTANCE_RANGE_CLOSE_VIEW = 2;
1204 
1205     /**
1206      * A value to be used with the "SubjectDistanceRange" tag.
1207      *
1208      * @see #TAG_SUBJECT_DISTANCE_RANGE
1209      */
1210     public static final int SUBJECT_DISTANCE_RANGE_DISTANT_VIEW = 3;
1211 
1212     /**
1213      * A tag indicating an identifier assigned uniquely to each image.
1214      */
1215     public static final int TAG_IMAGE_UNIQUE_ID = 42016;
1216 
1217     // Exif 2.1 private
1218 
1219     // GPS Attribute Information
1220     //     0 - GPSVersionID                       (BYTE/4)
1221     //     1 - GPSLatitudeRef                     (ASCII/2)
1222     //     2 - GPSLatitude                        (RATIONAL/3)
1223     //     3 - GPSLongitudeRef                    (ASCII/2)
1224     //     4 - GPSLongitude                       (RATIONAL/3)
1225     //     5 - GPSAltitudeRef                     (BYTE/1)
1226     //     6 - GPSAltitude                        (RATIONAL/1)
1227     //     7 - GPSTimeStamp                       (RATIONAL/3)
1228     //     8 - GPSSatellites                      (ASCII/any)
1229     //     9 - GPSStatus                          (ASCII/2)
1230     //    10 - GPSMeasureMode                     (ASCII/2)
1231     //    11 - GPSDOP                             (RATIONAL/1)
1232     //    12 - GPSSpeedRef                        (ASCII/2)
1233     //    13 - GPSSpeed                           (RATIONAL/1)
1234     //    14 - GPSTrackRef                        (ASCII/2)
1235     //    15 - GPSTrack                           (RATIONAL/1)
1236     //    16 - GPSImgDirectionRef                 (ASCII/2)
1237     //    17 - GPSImgDirection                    (RATIONAL/1)
1238     //    18 - GPSMapDatum                        (ASCII/any)
1239     //    19 - GPSDestLatitudeRef                 (ASCII/2)
1240     //    20 - GPSDestLatitude                    (RATIONAL/3)
1241     //    21 - GPSDestLongitudeRef                (ASCII/2)
1242     //    22 - GPSDestLongitude                   (RATIONAL/3)
1243     //    23 - GPSDestBearingRef                  (ASCII/2)
1244     //    24 - GPSDestBearing                     (RATIONAL/1)
1245     //    25 - GPSDestDistanceRef                 (ASCII/2)
1246     //    26 - GPSDestDistance                    (RATIONAL/1)
1247 
1248     //     0 - Interoperability Index             (ASCII/any)
1249 
1250     // Exif tags
1251 
1252     static class ExifVersion extends TIFFTag {
1253 
ExifVersion()1254         public ExifVersion() {
1255             super("ExifVersion",
1256                   TAG_EXIF_VERSION,
1257                   1 << TIFFTag.TIFF_UNDEFINED,
1258                   4);
1259         }
1260     }
1261 
1262     static class FlashPixVersion extends TIFFTag {
1263 
FlashPixVersion()1264         public FlashPixVersion() {
1265             super("FlashPixVersion",
1266                   TAG_FLASHPIX_VERSION,
1267                   1 << TIFFTag.TIFF_UNDEFINED,
1268                   4);
1269         }
1270     }
1271 
1272     static class ColorSpace extends TIFFTag {
1273 
ColorSpace()1274         public ColorSpace() {
1275             super("ColorSpace",
1276                   TAG_COLOR_SPACE,
1277                   1 << TIFFTag.TIFF_SHORT,
1278                   1);
1279 
1280             addValueName(COLOR_SPACE_SRGB, "sRGB");
1281             addValueName(COLOR_SPACE_UNCALIBRATED, "Uncalibrated");
1282         }
1283     }
1284 
1285     static class ComponentsConfiguration extends TIFFTag {
1286 
ComponentsConfiguration()1287         public ComponentsConfiguration() {
1288             super("ComponentsConfiguration",
1289                   TAG_COMPONENTS_CONFIGURATION,
1290                   1 << TIFFTag.TIFF_UNDEFINED,
1291                   4);
1292 
1293             addValueName(COMPONENTS_CONFIGURATION_DOES_NOT_EXIST,
1294                          "DoesNotExist");
1295             addValueName(COMPONENTS_CONFIGURATION_Y, "Y");
1296             addValueName(COMPONENTS_CONFIGURATION_CB, "Cb");
1297             addValueName(COMPONENTS_CONFIGURATION_CR, "Cr");
1298             addValueName(COMPONENTS_CONFIGURATION_R, "R");
1299             addValueName(COMPONENTS_CONFIGURATION_G, "G");
1300             addValueName(COMPONENTS_CONFIGURATION_B, "B");
1301         }
1302     }
1303 
1304     static class CompressedBitsPerPixel extends TIFFTag {
1305 
CompressedBitsPerPixel()1306         public CompressedBitsPerPixel() {
1307             super("CompressedBitsPerPixel",
1308                   TAG_COMPRESSED_BITS_PER_PIXEL,
1309                   1 << TIFFTag.TIFF_RATIONAL,
1310                   1);
1311         }
1312     }
1313 
1314     static class PixelXDimension extends TIFFTag {
1315 
PixelXDimension()1316         public PixelXDimension() {
1317             super("PixelXDimension",
1318                   TAG_PIXEL_X_DIMENSION,
1319                   (1 << TIFFTag.TIFF_SHORT) |
1320                   (1 << TIFFTag.TIFF_LONG),
1321                   1);
1322         }
1323     }
1324 
1325     static class PixelYDimension extends TIFFTag {
1326 
PixelYDimension()1327         public PixelYDimension() {
1328             super("PixelYDimension",
1329                   TAG_PIXEL_Y_DIMENSION,
1330                   (1 << TIFFTag.TIFF_SHORT) |
1331                   (1 << TIFFTag.TIFF_LONG),
1332                   1);
1333         }
1334     }
1335 
1336     static class MakerNote extends TIFFTag {
1337 
MakerNote()1338         public MakerNote() {
1339             super("MakerNote",
1340                   TAG_MAKER_NOTE,
1341                   1 << TIFFTag.TIFF_UNDEFINED);
1342         }
1343     }
1344 
1345     static class UserComment extends TIFFTag {
1346 
UserComment()1347         public UserComment() {
1348             super("UserComment",
1349                   TAG_USER_COMMENT,
1350                   1 << TIFFTag.TIFF_UNDEFINED);
1351         }
1352     }
1353 
1354     static class RelatedSoundFile extends TIFFTag {
1355 
RelatedSoundFile()1356         public RelatedSoundFile() {
1357             super("RelatedSoundFile",
1358                   TAG_RELATED_SOUND_FILE,
1359                   1 << TIFFTag.TIFF_ASCII,
1360                   13);
1361         }
1362     }
1363 
1364     static class DateTimeOriginal extends TIFFTag {
1365 
DateTimeOriginal()1366         public DateTimeOriginal() {
1367             super("DateTimeOriginal",
1368                   TAG_DATE_TIME_ORIGINAL,
1369                   1 << TIFFTag.TIFF_ASCII,
1370                   20);
1371         }
1372     }
1373 
1374     static class DateTimeDigitized extends TIFFTag {
1375 
DateTimeDigitized()1376         public DateTimeDigitized() {
1377             super("DateTimeDigitized",
1378                   TAG_DATE_TIME_DIGITIZED,
1379                   1 << TIFFTag.TIFF_ASCII,
1380                   20);
1381         }
1382     }
1383 
1384     static class SubSecTime extends TIFFTag {
1385 
SubSecTime()1386         public SubSecTime() {
1387             super("SubSecTime",
1388                   TAG_SUB_SEC_TIME,
1389                   1 << TIFFTag.TIFF_ASCII);
1390         }
1391     }
1392 
1393     static class SubSecTimeOriginal extends TIFFTag {
1394 
SubSecTimeOriginal()1395         public SubSecTimeOriginal() {
1396             super("SubSecTimeOriginal",
1397                   TAG_SUB_SEC_TIME_ORIGINAL,
1398                   1 << TIFFTag.TIFF_ASCII);
1399         }
1400     }
1401 
1402     static class SubSecTimeDigitized extends TIFFTag {
1403 
SubSecTimeDigitized()1404         public SubSecTimeDigitized() {
1405             super("SubSecTimeDigitized",
1406                   TAG_SUB_SEC_TIME_DIGITIZED,
1407                   1 << TIFFTag.TIFF_ASCII);
1408         }
1409     }
1410 
1411     static class ExposureTime extends TIFFTag {
1412 
ExposureTime()1413         public ExposureTime() {
1414             super("ExposureTime",
1415                   TAG_EXPOSURE_TIME,
1416                   1 << TIFFTag.TIFF_RATIONAL,
1417                   1);
1418         }
1419     }
1420 
1421     static class FNumber extends TIFFTag {
1422 
FNumber()1423         public FNumber() {
1424             super("FNumber",
1425                   TAG_F_NUMBER,
1426                   1 << TIFFTag.TIFF_RATIONAL,
1427                   1);
1428         }
1429     }
1430 
1431     static class ExposureProgram extends TIFFTag {
1432 
ExposureProgram()1433         public ExposureProgram() {
1434             super("ExposureProgram",
1435                   TAG_EXPOSURE_PROGRAM,
1436                   1 << TIFFTag.TIFF_SHORT,
1437                   1);
1438 
1439             addValueName(EXPOSURE_PROGRAM_NOT_DEFINED, "Not Defined");
1440             addValueName(EXPOSURE_PROGRAM_MANUAL, "Manual");
1441             addValueName(EXPOSURE_PROGRAM_NORMAL_PROGRAM, "Normal Program");
1442             addValueName(EXPOSURE_PROGRAM_APERTURE_PRIORITY,
1443                          "Aperture Priority");
1444             addValueName(EXPOSURE_PROGRAM_SHUTTER_PRIORITY,
1445                          "Shutter Priority");
1446             addValueName(EXPOSURE_PROGRAM_CREATIVE_PROGRAM,
1447                          "Creative Program");
1448             addValueName(EXPOSURE_PROGRAM_ACTION_PROGRAM, "Action Program");
1449             addValueName(EXPOSURE_PROGRAM_PORTRAIT_MODE, "Portrait Mode");
1450             addValueName(EXPOSURE_PROGRAM_LANDSCAPE_MODE, "Landscape Mode");
1451         }
1452     }
1453 
1454     static class SpectralSensitivity extends TIFFTag {
SpectralSensitivity()1455         public SpectralSensitivity() {
1456             super("SpectralSensitivity",
1457                   TAG_SPECTRAL_SENSITIVITY,
1458                   1 << TIFFTag.TIFF_ASCII);
1459         }
1460     }
1461 
1462     static class ISOSpeedRatings extends TIFFTag {
1463 
ISOSpeedRatings()1464         public ISOSpeedRatings() {
1465             super("ISOSpeedRatings",
1466                   TAG_ISO_SPEED_RATINGS,
1467                   1 << TIFFTag.TIFF_SHORT);
1468         }
1469     }
1470 
1471     static class OECF extends TIFFTag {
1472 
OECF()1473         public OECF() {
1474             super("OECF",
1475                   TAG_OECF,
1476                   1 << TIFFTag.TIFF_UNDEFINED);
1477         }
1478     }
1479 
1480     static class ShutterSpeedValue extends TIFFTag {
1481 
ShutterSpeedValue()1482         public ShutterSpeedValue() {
1483             super("ShutterSpeedValue",
1484                   TAG_SHUTTER_SPEED_VALUE,
1485                   1 << TIFFTag.TIFF_SRATIONAL,
1486                   1);
1487         }
1488     }
1489 
1490     static class ApertureValue extends TIFFTag {
1491 
ApertureValue()1492         public ApertureValue() {
1493             super("ApertureValue",
1494                   TAG_APERTURE_VALUE,
1495                   1 << TIFFTag.TIFF_RATIONAL,
1496                   1);
1497         }
1498     }
1499 
1500     static class BrightnessValue extends TIFFTag {
1501 
BrightnessValue()1502         public BrightnessValue() {
1503             super("BrightnessValue",
1504                   TAG_BRIGHTNESS_VALUE,
1505                   1 << TIFFTag.TIFF_SRATIONAL,
1506                   1);
1507         }
1508     }
1509 
1510     static class ExposureBiasValue extends TIFFTag {
1511 
ExposureBiasValue()1512         public ExposureBiasValue() {
1513             super("ExposureBiasValue",
1514                   TAG_EXPOSURE_BIAS_VALUE,
1515                   1 << TIFFTag.TIFF_SRATIONAL,
1516                   1);
1517         }
1518     }
1519 
1520     static class MaxApertureValue extends TIFFTag {
1521 
MaxApertureValue()1522         public MaxApertureValue() {
1523             super("MaxApertureValue",
1524                   TAG_MAX_APERTURE_VALUE,
1525                   1 << TIFFTag.TIFF_RATIONAL,
1526                   1);
1527         }
1528     }
1529 
1530     static class SubjectDistance extends TIFFTag {
1531 
SubjectDistance()1532         public SubjectDistance() {
1533             super("SubjectDistance",
1534                   TAG_SUBJECT_DISTANCE,
1535                   1 << TIFFTag.TIFF_RATIONAL,
1536                   1);
1537         }
1538     }
1539 
1540     static class MeteringMode extends TIFFTag {
1541 
MeteringMode()1542         public MeteringMode() {
1543             super("MeteringMode",
1544                   TAG_METERING_MODE,
1545                   1 << TIFFTag.TIFF_SHORT,
1546                   1);
1547 
1548             addValueName(METERING_MODE_UNKNOWN, "Unknown");
1549             addValueName(METERING_MODE_AVERAGE, "Average");
1550             addValueName(METERING_MODE_CENTER_WEIGHTED_AVERAGE,
1551                          "CenterWeightedAverage");
1552             addValueName(METERING_MODE_SPOT, "Spot");
1553             addValueName(METERING_MODE_MULTI_SPOT, "MultiSpot");
1554             addValueName(METERING_MODE_PATTERN, "Pattern");
1555             addValueName(METERING_MODE_PARTIAL, "Partial");
1556             addValueName(METERING_MODE_OTHER, "Other");
1557         }
1558     }
1559 
1560     static class LightSource extends TIFFTag {
1561 
LightSource()1562         public LightSource() {
1563             super("LightSource",
1564                   TAG_LIGHT_SOURCE,
1565                   1 << TIFFTag.TIFF_SHORT,
1566                   1);
1567 
1568             addValueName(LIGHT_SOURCE_UNKNOWN, "Unknown");
1569             addValueName(LIGHT_SOURCE_DAYLIGHT, "Daylight");
1570             addValueName(LIGHT_SOURCE_FLUORESCENT, "Fluorescent");
1571             addValueName(LIGHT_SOURCE_TUNGSTEN, "Tungsten");
1572             addValueName(LIGHT_SOURCE_STANDARD_LIGHT_A, "Standard Light A");
1573             addValueName(LIGHT_SOURCE_STANDARD_LIGHT_B, "Standard Light B");
1574             addValueName(LIGHT_SOURCE_STANDARD_LIGHT_C, "Standard Light C");
1575             addValueName(LIGHT_SOURCE_D55, "D55");
1576             addValueName(LIGHT_SOURCE_D65, "D65");
1577             addValueName(LIGHT_SOURCE_D75, "D75");
1578             addValueName(LIGHT_SOURCE_OTHER, "Other");
1579         }
1580     }
1581 
1582     static class Flash extends TIFFTag {
1583 
Flash()1584         public Flash() {
1585             super("Flash",
1586                   TAG_FLASH,
1587                   1 << TIFFTag.TIFF_SHORT,
1588                   1);
1589 
1590             addValueName(FLASH_DID_NOT_FIRE, "Flash Did Not Fire");
1591             addValueName(FLASH_FIRED, "Flash Fired");
1592             addValueName(FLASH_STROBE_RETURN_LIGHT_NOT_DETECTED,
1593                          "Strobe Return Light Not Detected");
1594             addValueName(FLASH_STROBE_RETURN_LIGHT_DETECTED,
1595                          "Strobe Return Light Detected");
1596         }
1597     }
1598 
1599     static class FocalLength extends TIFFTag {
1600 
FocalLength()1601         public FocalLength() {
1602             super("FocalLength",
1603                   TAG_FOCAL_LENGTH,
1604                   1 << TIFFTag.TIFF_RATIONAL,
1605                   1);
1606         }
1607     }
1608 
1609     static class SubjectArea extends TIFFTag {
1610 
SubjectArea()1611         public SubjectArea() {
1612             super("SubjectArea",
1613                   TAG_SUBJECT_AREA,
1614                   1 << TIFFTag.TIFF_SHORT);
1615         }
1616     }
1617 
1618     static class FlashEnergy extends TIFFTag {
1619 
FlashEnergy()1620         public FlashEnergy() {
1621             super("FlashEnergy",
1622                   TAG_FLASH_ENERGY,
1623                   1 << TIFFTag.TIFF_RATIONAL,
1624                   1);
1625         }
1626     }
1627 
1628     static class SpatialFrequencyResponse extends TIFFTag {
1629 
SpatialFrequencyResponse()1630         public SpatialFrequencyResponse() {
1631             super("SpatialFrequencyResponse",
1632                   TAG_SPATIAL_FREQUENCY_RESPONSE,
1633                   1 << TIFFTag.TIFF_UNDEFINED);
1634         }
1635     }
1636 
1637     static class FocalPlaneXResolution extends TIFFTag {
1638 
FocalPlaneXResolution()1639         public FocalPlaneXResolution() {
1640             super("FocalPlaneXResolution",
1641                   TAG_FOCAL_PLANE_X_RESOLUTION,
1642                   1 << TIFFTag.TIFF_RATIONAL,
1643                   1);
1644         }
1645     }
1646 
1647     static class FocalPlaneYResolution extends TIFFTag {
1648 
FocalPlaneYResolution()1649         public FocalPlaneYResolution() {
1650             super("FocalPlaneYResolution",
1651                   TAG_FOCAL_PLANE_Y_RESOLUTION,
1652                   1 << TIFFTag.TIFF_RATIONAL,
1653                   1);
1654         }
1655     }
1656 
1657     static class FocalPlaneResolutionUnit extends TIFFTag {
1658 
FocalPlaneResolutionUnit()1659         public FocalPlaneResolutionUnit() {
1660             super("FocalPlaneResolutionUnit",
1661                   TAG_FOCAL_PLANE_RESOLUTION_UNIT,
1662                   1 << TIFFTag.TIFF_SHORT,
1663                   1);
1664 
1665             addValueName(FOCAL_PLANE_RESOLUTION_UNIT_NONE, "None");
1666             addValueName(FOCAL_PLANE_RESOLUTION_UNIT_INCH, "Inch");
1667             addValueName(FOCAL_PLANE_RESOLUTION_UNIT_CENTIMETER, "Centimeter");
1668         }
1669     }
1670 
1671     static class SubjectLocation extends TIFFTag {
1672 
SubjectLocation()1673         public SubjectLocation() {
1674             super("SubjectLocation",
1675                   TAG_SUBJECT_LOCATION,
1676                   1 << TIFFTag.TIFF_SHORT,
1677                   2);
1678         }
1679     }
1680 
1681     static class ExposureIndex extends TIFFTag {
1682 
ExposureIndex()1683         public ExposureIndex() {
1684             super("ExposureIndex",
1685                   TAG_EXPOSURE_INDEX,
1686                   1 << TIFFTag.TIFF_RATIONAL,
1687                   1);
1688         }
1689     }
1690 
1691     static class SensingMethod extends TIFFTag {
1692 
SensingMethod()1693         public SensingMethod() {
1694             super("SensingMethod",
1695                   TAG_SENSING_METHOD,
1696                   1 << TIFFTag.TIFF_SHORT,
1697                   1);
1698 
1699             addValueName(SENSING_METHOD_NOT_DEFINED, "Not Defined");
1700             addValueName(SENSING_METHOD_ONE_CHIP_COLOR_AREA_SENSOR,
1701                          "One-chip color area sensor");
1702             addValueName(SENSING_METHOD_TWO_CHIP_COLOR_AREA_SENSOR,
1703                          "Two-chip color area sensor");
1704             addValueName(SENSING_METHOD_THREE_CHIP_COLOR_AREA_SENSOR,
1705                          "Three-chip color area sensor");
1706             addValueName(SENSING_METHOD_COLOR_SEQUENTIAL_AREA_SENSOR,
1707                          "Color sequential area sensor");
1708             addValueName(SENSING_METHOD_TRILINEAR_SENSOR, "Trilinear sensor");
1709             addValueName(SENSING_METHOD_COLOR_SEQUENTIAL_LINEAR_SENSOR,
1710                          "Color sequential linear sensor");
1711         }
1712     }
1713 
1714     static class FileSource extends TIFFTag {
1715 
FileSource()1716         public FileSource() {
1717             super("FileSource",
1718                   TAG_FILE_SOURCE,
1719                   1 << TIFFTag.TIFF_UNDEFINED,
1720                   1);
1721 
1722             addValueName(FILE_SOURCE_DSC, "DSC");
1723         }
1724     }
1725 
1726     static class SceneType extends TIFFTag {
1727 
SceneType()1728         public SceneType() {
1729             super("SceneType",
1730                   TAG_SCENE_TYPE,
1731                   1 << TIFFTag.TIFF_UNDEFINED,
1732                   1);
1733 
1734             addValueName(SCENE_TYPE_DSC, "A directly photographed image");
1735         }
1736     }
1737 
1738     static class CFAPattern extends TIFFTag {
1739 
CFAPattern()1740         public CFAPattern() {
1741             super("CFAPattern",
1742                   TAG_CFA_PATTERN,
1743                   1 << TIFFTag.TIFF_UNDEFINED);
1744         }
1745     }
1746 
1747     static class CustomRendered extends TIFFTag {
1748 
CustomRendered()1749         public CustomRendered() {
1750             super("CustomRendered",
1751                   TAG_CUSTOM_RENDERED,
1752                   1 << TIFFTag.TIFF_SHORT,
1753                   1);
1754 
1755             addValueName(CUSTOM_RENDERED_NORMAL, "Normal process");
1756             addValueName(CUSTOM_RENDERED_CUSTOM, "Custom process");
1757         }
1758     }
1759 
1760     static class ExposureMode extends TIFFTag {
1761 
ExposureMode()1762         public ExposureMode() {
1763             super("ExposureMode",
1764                   TAG_EXPOSURE_MODE,
1765                   1 << TIFFTag.TIFF_SHORT,
1766                   1);
1767 
1768             addValueName(EXPOSURE_MODE_AUTO_EXPOSURE, "Auto exposure");
1769             addValueName(EXPOSURE_MODE_MANUAL_EXPOSURE, "Manual exposure");
1770             addValueName(EXPOSURE_MODE_AUTO_BRACKET, "Auto bracket");
1771         }
1772     }
1773 
1774     static class WhiteBalance extends TIFFTag {
1775 
WhiteBalance()1776         public WhiteBalance() {
1777             super("WhiteBalance",
1778                   TAG_WHITE_BALANCE,
1779                   1 << TIFFTag.TIFF_SHORT,
1780                   1);
1781 
1782             addValueName(WHITE_BALANCE_AUTO, "Auto white balance");
1783             addValueName(WHITE_BALANCE_MANUAL, "Manual white balance");
1784         }
1785     }
1786 
1787     static class DigitalZoomRatio extends TIFFTag {
1788 
DigitalZoomRatio()1789         public DigitalZoomRatio() {
1790             super("DigitalZoomRatio",
1791                   TAG_DIGITAL_ZOOM_RATIO,
1792                   1 << TIFFTag.TIFF_RATIONAL,
1793                   1);
1794         }
1795     }
1796 
1797     static class FocalLengthIn35mmFilm extends TIFFTag {
1798 
FocalLengthIn35mmFilm()1799         public FocalLengthIn35mmFilm() {
1800             super("FocalLengthIn35mmFilm",
1801                   TAG_FOCAL_LENGTH_IN_35MM_FILM,
1802                   1 << TIFFTag.TIFF_SHORT,
1803                   1);
1804         }
1805     }
1806 
1807     static class SceneCaptureType extends TIFFTag {
1808 
SceneCaptureType()1809         public SceneCaptureType() {
1810             super("SceneCaptureType",
1811                   TAG_SCENE_CAPTURE_TYPE,
1812                   1 << TIFFTag.TIFF_SHORT,
1813                   1);
1814 
1815             addValueName(SCENE_CAPTURE_TYPE_STANDARD, "Standard");
1816             addValueName(SCENE_CAPTURE_TYPE_LANDSCAPE, "Landscape");
1817             addValueName(SCENE_CAPTURE_TYPE_PORTRAIT, "Portrait");
1818             addValueName(SCENE_CAPTURE_TYPE_NIGHT_SCENE, "Night scene");
1819         }
1820     }
1821 
1822     static class GainControl extends TIFFTag {
1823 
GainControl()1824         public GainControl() {
1825             super("GainControl",
1826                   TAG_GAIN_CONTROL,
1827                   1 << TIFFTag.TIFF_SHORT,
1828                   1);
1829 
1830             addValueName(GAIN_CONTROL_NONE, "None");
1831             addValueName(GAIN_CONTROL_LOW_GAIN_UP, "Low gain up");
1832             addValueName(GAIN_CONTROL_HIGH_GAIN_UP, "High gain up");
1833             addValueName(GAIN_CONTROL_LOW_GAIN_DOWN, "Low gain down");
1834             addValueName(GAIN_CONTROL_HIGH_GAIN_DOWN, "High gain down");
1835         }
1836     }
1837 
1838     static class Contrast extends TIFFTag {
1839 
Contrast()1840         public Contrast() {
1841             super("Contrast",
1842                   TAG_CONTRAST,
1843                   1 << TIFFTag.TIFF_SHORT,
1844                   1);
1845 
1846             addValueName(CONTRAST_NORMAL, "Normal");
1847             addValueName(CONTRAST_SOFT, "Soft");
1848             addValueName(CONTRAST_HARD, "Hard");
1849         }
1850     }
1851 
1852     static class Saturation extends TIFFTag {
1853 
Saturation()1854         public Saturation() {
1855             super("Saturation",
1856                   TAG_SATURATION,
1857                   1 << TIFFTag.TIFF_SHORT,
1858                   1);
1859 
1860             addValueName(SATURATION_NORMAL, "Normal");
1861             addValueName(SATURATION_LOW, "Low saturation");
1862             addValueName(SATURATION_HIGH, "High saturation");
1863         }
1864     }
1865 
1866     static class Sharpness extends TIFFTag {
1867 
Sharpness()1868         public Sharpness() {
1869             super("Sharpness",
1870                   TAG_SHARPNESS,
1871                   1 << TIFFTag.TIFF_SHORT,
1872                   1);
1873 
1874             addValueName(SHARPNESS_NORMAL, "Normal");
1875             addValueName(SHARPNESS_SOFT, "Soft");
1876             addValueName(SHARPNESS_HARD, "Hard");
1877         }
1878     }
1879 
1880     static class DeviceSettingDescription extends TIFFTag {
1881 
DeviceSettingDescription()1882         public DeviceSettingDescription() {
1883             super("DeviceSettingDescription",
1884                   TAG_DEVICE_SETTING_DESCRIPTION,
1885                   1 << TIFFTag.TIFF_UNDEFINED);
1886         }
1887     }
1888 
1889     static class SubjectDistanceRange extends TIFFTag {
1890 
SubjectDistanceRange()1891         public SubjectDistanceRange() {
1892             super("SubjectDistanceRange",
1893                   TAG_SUBJECT_DISTANCE_RANGE,
1894                   1 << TIFFTag.TIFF_SHORT,
1895                   1);
1896 
1897             addValueName(SUBJECT_DISTANCE_RANGE_UNKNOWN, "unknown");
1898             addValueName(SUBJECT_DISTANCE_RANGE_MACRO, "Macro");
1899             addValueName(SUBJECT_DISTANCE_RANGE_CLOSE_VIEW, "Close view");
1900             addValueName(SUBJECT_DISTANCE_RANGE_DISTANT_VIEW, "Distant view");
1901         }
1902     }
1903 
1904     static class ImageUniqueID extends TIFFTag {
1905 
ImageUniqueID()1906         public ImageUniqueID() {
1907             super("ImageUniqueID",
1908                   TAG_IMAGE_UNIQUE_ID,
1909                   1 << TIFFTag.TIFF_ASCII,
1910                   33);
1911         }
1912     }
1913 
1914     static class InteroperabilityIFD extends TIFFTag {
InteroperabilityIFD()1915         public InteroperabilityIFD() {
1916             super("InteroperabilityIFD",
1917                   TAG_INTEROPERABILITY_IFD_POINTER,
1918                   ExifInteroperabilityTagSet.getInstance());
1919         }
1920     }
1921 
1922     private static List<TIFFTag> tags;
1923 
initTags()1924     private static void initTags() {
1925         tags = new ArrayList<TIFFTag>(42);
1926 
1927         tags.add(new ExifTIFFTagSet.ExifVersion());
1928         tags.add(new ExifTIFFTagSet.FlashPixVersion());
1929         tags.add(new ExifTIFFTagSet.ColorSpace());
1930         tags.add(new ExifTIFFTagSet.ComponentsConfiguration());
1931         tags.add(new ExifTIFFTagSet.CompressedBitsPerPixel());
1932         tags.add(new ExifTIFFTagSet.PixelXDimension());
1933         tags.add(new ExifTIFFTagSet.PixelYDimension());
1934         tags.add(new ExifTIFFTagSet.MakerNote());
1935         tags.add(new ExifTIFFTagSet.UserComment());
1936         tags.add(new ExifTIFFTagSet.RelatedSoundFile());
1937         tags.add(new ExifTIFFTagSet.DateTimeOriginal());
1938         tags.add(new ExifTIFFTagSet.DateTimeDigitized());
1939         tags.add(new ExifTIFFTagSet.SubSecTime());
1940         tags.add(new ExifTIFFTagSet.SubSecTimeOriginal());
1941         tags.add(new ExifTIFFTagSet.SubSecTimeDigitized());
1942         tags.add(new ExifTIFFTagSet.ExposureTime());
1943         tags.add(new ExifTIFFTagSet.FNumber());
1944         tags.add(new ExifTIFFTagSet.ExposureProgram());
1945         tags.add(new ExifTIFFTagSet.SpectralSensitivity());
1946         tags.add(new ExifTIFFTagSet.ISOSpeedRatings());
1947         tags.add(new ExifTIFFTagSet.OECF());
1948         tags.add(new ExifTIFFTagSet.ShutterSpeedValue());
1949         tags.add(new ExifTIFFTagSet.ApertureValue());
1950         tags.add(new ExifTIFFTagSet.BrightnessValue());
1951         tags.add(new ExifTIFFTagSet.ExposureBiasValue());
1952         tags.add(new ExifTIFFTagSet.MaxApertureValue());
1953         tags.add(new ExifTIFFTagSet.SubjectDistance());
1954         tags.add(new ExifTIFFTagSet.MeteringMode());
1955         tags.add(new ExifTIFFTagSet.LightSource());
1956         tags.add(new ExifTIFFTagSet.Flash());
1957         tags.add(new ExifTIFFTagSet.FocalLength());
1958         tags.add(new ExifTIFFTagSet.SubjectArea());
1959         tags.add(new ExifTIFFTagSet.FlashEnergy());
1960         tags.add(new ExifTIFFTagSet.SpatialFrequencyResponse());
1961         tags.add(new ExifTIFFTagSet.FocalPlaneXResolution());
1962         tags.add(new ExifTIFFTagSet.FocalPlaneYResolution());
1963         tags.add(new ExifTIFFTagSet.FocalPlaneResolutionUnit());
1964         tags.add(new ExifTIFFTagSet.SubjectLocation());
1965         tags.add(new ExifTIFFTagSet.ExposureIndex());
1966         tags.add(new ExifTIFFTagSet.SensingMethod());
1967         tags.add(new ExifTIFFTagSet.FileSource());
1968         tags.add(new ExifTIFFTagSet.SceneType());
1969         tags.add(new ExifTIFFTagSet.CFAPattern());
1970         tags.add(new ExifTIFFTagSet.CustomRendered());
1971         tags.add(new ExifTIFFTagSet.ExposureMode());
1972         tags.add(new ExifTIFFTagSet.WhiteBalance());
1973         tags.add(new ExifTIFFTagSet.DigitalZoomRatio());
1974         tags.add(new ExifTIFFTagSet.FocalLengthIn35mmFilm());
1975         tags.add(new ExifTIFFTagSet.SceneCaptureType());
1976         tags.add(new ExifTIFFTagSet.GainControl());
1977         tags.add(new ExifTIFFTagSet.Contrast());
1978         tags.add(new ExifTIFFTagSet.Saturation());
1979         tags.add(new ExifTIFFTagSet.Sharpness());
1980         tags.add(new ExifTIFFTagSet.DeviceSettingDescription());
1981         tags.add(new ExifTIFFTagSet.SubjectDistanceRange());
1982         tags.add(new ExifTIFFTagSet.ImageUniqueID());
1983         tags.add(new ExifTIFFTagSet.InteroperabilityIFD());
1984     }
1985 
ExifTIFFTagSet()1986     private ExifTIFFTagSet() {
1987         super(tags);
1988     }
1989 
1990     /**
1991      * Returns a shared instance of an {@code ExifTIFFTagSet}.
1992      *
1993      * @return an {@code ExifTIFFTagSet} instance.
1994      */
getInstance()1995     public synchronized static ExifTIFFTagSet getInstance() {
1996         if (theInstance == null) {
1997             initTags();
1998             theInstance = new ExifTIFFTagSet();
1999             tags = null;
2000         }
2001         return theInstance;
2002     }
2003 }
2004