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