1 /* 2 * Copyright (c) 2005, 2018, 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.util.ArrayList; 28 import java.util.List; 29 30 /** 31 * A class representing the set of tags found in the baseline TIFF 32 * specification as well as some common additional tags. 33 * 34 * <p> The non-baseline tags included in this class are: 35 * <ul> 36 * <li> {@link #TAG_JPEG_TABLES JPEGTables} 37 * <li> {@link #TAG_ICC_PROFILE ICC Profile} 38 * </ul> 39 * 40 * <p> The non-baseline values of baseline tags included in this class are 41 * <ul> 42 * <li>{@link #TAG_COMPRESSION Compression} tag values: 43 * <ul> 44 * <li>{@link #COMPRESSION_JPEG JPEG-in-TIFF compression}</li> 45 * <li>{@link #COMPRESSION_ZLIB Zlib-in-TIFF compression}</li> 46 * <li>{@link #COMPRESSION_DEFLATE Deflate compression}</li> 47 * </ul> 48 * </li> 49 * <li>{@link #TAG_PHOTOMETRIC_INTERPRETATION PhotometricInterpretation} 50 * tag values: 51 * <ul> 52 * <li>{@link #PHOTOMETRIC_INTERPRETATION_ICCLAB ICCLAB 53 * photometric interpretation}</li> 54 * </ul> 55 * </li> 56 * </ul> 57 * 58 * @since 9 59 * @see <a href="https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf"> TIFF 6.0 Specification</a> 60 */ 61 public final class BaselineTIFFTagSet extends TIFFTagSet { 62 63 private static BaselineTIFFTagSet theInstance = null; 64 65 // Tags from TIFF 6.0 specification 66 67 /** 68 * Constant specifying the "NewSubfileType" tag. 69 * 70 * @see #NEW_SUBFILE_TYPE_REDUCED_RESOLUTION 71 * @see #NEW_SUBFILE_TYPE_SINGLE_PAGE 72 * @see #NEW_SUBFILE_TYPE_TRANSPARENCY 73 */ 74 public static final int TAG_NEW_SUBFILE_TYPE = 254; 75 76 /** 77 * A mask to be used with the "NewSubfileType" tag. 78 * 79 * @see #TAG_NEW_SUBFILE_TYPE 80 */ 81 public static final int NEW_SUBFILE_TYPE_REDUCED_RESOLUTION = 1; 82 83 /** 84 * A mask to be used with the "NewSubfileType" tag. 85 * 86 * @see #TAG_NEW_SUBFILE_TYPE 87 */ 88 public static final int NEW_SUBFILE_TYPE_SINGLE_PAGE = 2; 89 90 /** 91 * A mask to be used with the "NewSubfileType" tag. 92 * 93 * @see #TAG_NEW_SUBFILE_TYPE 94 */ 95 public static final int NEW_SUBFILE_TYPE_TRANSPARENCY = 4; 96 97 /** 98 * Constant specifying the "SubfileType" tag. 99 * 100 * @see #SUBFILE_TYPE_FULL_RESOLUTION 101 * @see #SUBFILE_TYPE_REDUCED_RESOLUTION 102 * @see #SUBFILE_TYPE_SINGLE_PAGE 103 */ 104 public static final int TAG_SUBFILE_TYPE = 255; 105 106 /** 107 * A value to be used with the "SubfileType" tag. 108 * 109 * @see #TAG_SUBFILE_TYPE 110 */ 111 public static final int SUBFILE_TYPE_FULL_RESOLUTION = 1; 112 113 /** 114 * A value to be used with the "SubfileType" tag. 115 * 116 * @see #TAG_SUBFILE_TYPE 117 */ 118 public static final int SUBFILE_TYPE_REDUCED_RESOLUTION = 2; 119 120 /** 121 * A value to be used with the "SubfileType" tag. 122 * 123 * @see #TAG_SUBFILE_TYPE 124 */ 125 public static final int SUBFILE_TYPE_SINGLE_PAGE = 3; 126 127 /** 128 * Constant specifying the "ImageWidth" tag. 129 */ 130 public static final int TAG_IMAGE_WIDTH = 256; 131 132 /** 133 * Constant specifying the "ImageLength" tag. 134 */ 135 public static final int TAG_IMAGE_LENGTH = 257; 136 137 /** 138 * Constant specifying the "BitsPerSample" tag. 139 */ 140 public static final int TAG_BITS_PER_SAMPLE = 258; 141 142 /** 143 * Constant specifying the "Compression" tag. 144 * 145 * @see #COMPRESSION_NONE 146 * @see #COMPRESSION_CCITT_RLE 147 * @see #COMPRESSION_CCITT_T_4 148 * @see #COMPRESSION_CCITT_T_6 149 * @see #COMPRESSION_LZW 150 * @see #COMPRESSION_OLD_JPEG 151 * @see #COMPRESSION_JPEG 152 * @see #COMPRESSION_ZLIB 153 * @see #COMPRESSION_PACKBITS 154 * @see #COMPRESSION_DEFLATE 155 */ 156 public static final int TAG_COMPRESSION = 259; 157 158 /** 159 * A value to be used with the "Compression" tag. 160 * 161 * @see #TAG_COMPRESSION 162 */ 163 public static final int COMPRESSION_NONE = 1; 164 165 /** 166 * A value to be used with the "Compression" tag. 167 * 168 * @see #TAG_COMPRESSION 169 */ 170 public static final int COMPRESSION_CCITT_RLE = 2; 171 172 /** 173 * A value to be used with the "Compression" tag. 174 * 175 * @see #TAG_COMPRESSION 176 */ 177 public static final int COMPRESSION_CCITT_T_4 = 3; 178 179 /** 180 * A value to be used with the "Compression" tag. 181 * 182 * @see #TAG_COMPRESSION 183 */ 184 public static final int COMPRESSION_CCITT_T_6 = 4; 185 186 /** 187 * A value to be used with the "Compression" tag. 188 * 189 * @see #TAG_COMPRESSION 190 */ 191 public static final int COMPRESSION_LZW = 5; 192 193 /** 194 * A value to be used with the "Compression" tag. 195 * 196 * @see #TAG_COMPRESSION 197 */ 198 public static final int COMPRESSION_OLD_JPEG = 6; 199 200 /** 201 * A value to be used with the "Compression" tag. 202 * 203 * @see #TAG_COMPRESSION 204 */ 205 public static final int COMPRESSION_JPEG = 7; 206 207 /** 208 * A value to be used with the "Compression" tag. 209 * 210 * @see #TAG_COMPRESSION 211 */ 212 public static final int COMPRESSION_ZLIB = 8; 213 214 /** 215 * A value to be used with the "Compression" tag. 216 * 217 * @see #TAG_COMPRESSION 218 */ 219 public static final int COMPRESSION_PACKBITS = 32773; 220 221 /** 222 * A value to be used with the "Compression" tag. 223 * 224 * @see #TAG_COMPRESSION 225 * @see <a href="https://tools.ietf.org/html/rfc1951">DEFLATE specification</a> 226 */ 227 public static final int COMPRESSION_DEFLATE = 32946; 228 229 /** 230 * Constant specifying the "PhotometricInterpretation" tag. 231 * 232 * @see #PHOTOMETRIC_INTERPRETATION_WHITE_IS_ZERO 233 * @see #PHOTOMETRIC_INTERPRETATION_BLACK_IS_ZERO 234 * @see #PHOTOMETRIC_INTERPRETATION_RGB 235 * @see #PHOTOMETRIC_INTERPRETATION_PALETTE_COLOR 236 * @see #PHOTOMETRIC_INTERPRETATION_TRANSPARENCY_MASK 237 * @see #PHOTOMETRIC_INTERPRETATION_Y_CB_CR 238 * @see #PHOTOMETRIC_INTERPRETATION_CIELAB 239 * @see #PHOTOMETRIC_INTERPRETATION_ICCLAB 240 */ 241 public static final int TAG_PHOTOMETRIC_INTERPRETATION = 262; 242 243 /** 244 * A value to be used with the "PhotometricInterpretation" tag. 245 * 246 * @see #TAG_PHOTOMETRIC_INTERPRETATION 247 */ 248 public static final int PHOTOMETRIC_INTERPRETATION_WHITE_IS_ZERO = 0; 249 250 /** 251 * A value to be used with the "PhotometricInterpretation" tag. 252 * 253 * @see #TAG_PHOTOMETRIC_INTERPRETATION 254 */ 255 public static final int PHOTOMETRIC_INTERPRETATION_BLACK_IS_ZERO = 1; 256 257 /** 258 * A value to be used with the "PhotometricInterpretation" tag. 259 * 260 * @see #TAG_PHOTOMETRIC_INTERPRETATION 261 */ 262 public static final int PHOTOMETRIC_INTERPRETATION_RGB = 2; 263 264 /** 265 * A value to be used with the "PhotometricInterpretation" tag. 266 * 267 * @see #TAG_PHOTOMETRIC_INTERPRETATION 268 */ 269 public static final int PHOTOMETRIC_INTERPRETATION_PALETTE_COLOR = 3; 270 271 /** 272 * A value to be used with the "PhotometricInterpretation" tag. 273 * 274 * @see #TAG_PHOTOMETRIC_INTERPRETATION 275 */ 276 public static final int PHOTOMETRIC_INTERPRETATION_TRANSPARENCY_MASK = 4; 277 278 /** 279 * A value to be used with the "PhotometricInterpretation" tag. 280 * 281 * @see #TAG_PHOTOMETRIC_INTERPRETATION 282 */ 283 public static final int PHOTOMETRIC_INTERPRETATION_CMYK = 5; 284 285 /** 286 * A value to be used with the "PhotometricInterpretation" tag. 287 * 288 * @see #TAG_PHOTOMETRIC_INTERPRETATION 289 */ 290 public static final int PHOTOMETRIC_INTERPRETATION_Y_CB_CR = 6; 291 292 /** 293 * A value to be used with the "PhotometricInterpretation" tag. 294 * 295 * @see #TAG_PHOTOMETRIC_INTERPRETATION 296 */ 297 public static final int PHOTOMETRIC_INTERPRETATION_CIELAB = 8; 298 299 /** 300 * A value to be used with the "PhotometricInterpretation" tag. 301 * 302 * @see #TAG_PHOTOMETRIC_INTERPRETATION 303 */ 304 public static final int PHOTOMETRIC_INTERPRETATION_ICCLAB = 9; 305 306 /** 307 * Constant specifying the "Threshholding" tag. 308 * 309 * @see #THRESHHOLDING_NONE 310 * @see #THRESHHOLDING_ORDERED_DITHER 311 * @see #THRESHHOLDING_RANDOMIZED_DITHER 312 */ 313 public static final int TAG_THRESHHOLDING = 263; 314 315 /** 316 * A value to be used with the "Thresholding" tag. 317 * 318 * @see #TAG_THRESHHOLDING 319 */ 320 public static final int THRESHHOLDING_NONE = 1; 321 322 /** 323 * A value to be used with the "Thresholding" tag. 324 * 325 * @see #TAG_THRESHHOLDING 326 */ 327 public static final int THRESHHOLDING_ORDERED_DITHER = 2; 328 329 /** 330 * A value to be used with the "Thresholding" tag. 331 * 332 * @see #TAG_THRESHHOLDING 333 */ 334 public static final int THRESHHOLDING_RANDOMIZED_DITHER = 3; 335 336 /** 337 * Constant specifying the "Cell_Width" tag. 338 */ 339 public static final int TAG_CELL_WIDTH = 264; 340 341 /** 342 * Constant specifying the "cell_length" tag. 343 */ 344 public static final int TAG_CELL_LENGTH = 265; 345 346 /** 347 * Constant specifying the "fill_order" tag. 348 * 349 * @see #FILL_ORDER_LEFT_TO_RIGHT 350 * @see #FILL_ORDER_RIGHT_TO_LEFT 351 */ 352 public static final int TAG_FILL_ORDER = 266; 353 354 /** 355 * A value to be used with the "FillOrder" tag. 356 * 357 * @see #TAG_FILL_ORDER 358 */ 359 public static final int FILL_ORDER_LEFT_TO_RIGHT = 1; 360 361 /** 362 * A value to be used with the "FillOrder" tag. 363 * 364 * @see #TAG_FILL_ORDER 365 */ 366 public static final int FILL_ORDER_RIGHT_TO_LEFT = 2; 367 368 /** 369 * Constant specifying the "document_name" tag. 370 */ 371 public static final int TAG_DOCUMENT_NAME = 269; 372 373 /** 374 * Constant specifying the "Image_description" tag. 375 */ 376 public static final int TAG_IMAGE_DESCRIPTION = 270; 377 378 /** 379 * Constant specifying the "Make" tag. 380 */ 381 public static final int TAG_MAKE = 271; 382 383 /** 384 * Constant specifying the "Model" tag. 385 */ 386 public static final int TAG_MODEL = 272; 387 388 /** 389 * Constant specifying the "Strip_offsets" tag. 390 */ 391 public static final int TAG_STRIP_OFFSETS = 273; 392 393 /** 394 * Constant specifying the "Orientation" tag. 395 * 396 * @see #ORIENTATION_ROW_0_TOP_COLUMN_0_LEFT 397 * @see #ORIENTATION_ROW_0_TOP_COLUMN_0_RIGHT 398 * @see #ORIENTATION_ROW_0_BOTTOM_COLUMN_0_RIGHT 399 * @see #ORIENTATION_ROW_0_BOTTOM_COLUMN_0_LEFT 400 * @see #ORIENTATION_ROW_0_LEFT_COLUMN_0_TOP 401 * @see #ORIENTATION_ROW_0_RIGHT_COLUMN_0_TOP 402 * @see #ORIENTATION_ROW_0_RIGHT_COLUMN_0_BOTTOM 403 * @see #ORIENTATION_ROW_0_LEFT_COLUMN_0_BOTTOM 404 */ 405 public static final int TAG_ORIENTATION = 274; 406 407 /** 408 * A value to be used with the "Orientation" tag. 409 * 410 * @see #TAG_ORIENTATION 411 */ 412 public static final int ORIENTATION_ROW_0_TOP_COLUMN_0_LEFT = 1; 413 414 /** 415 * A value to be used with the "Orientation" tag. 416 * 417 * @see #TAG_ORIENTATION 418 */ 419 public static final int ORIENTATION_ROW_0_TOP_COLUMN_0_RIGHT = 2; 420 421 /** 422 * A value to be used with the "Orientation" tag. 423 * 424 * @see #TAG_ORIENTATION 425 */ 426 public static final int ORIENTATION_ROW_0_BOTTOM_COLUMN_0_RIGHT = 3; 427 428 /** 429 * A value to be used with the "Orientation" tag. 430 * 431 * @see #TAG_ORIENTATION 432 */ 433 public static final int ORIENTATION_ROW_0_BOTTOM_COLUMN_0_LEFT = 4; 434 435 /** 436 * A value to be used with the "Orientation" tag. 437 * 438 * @see #TAG_ORIENTATION 439 */ 440 public static final int ORIENTATION_ROW_0_LEFT_COLUMN_0_TOP = 5; 441 442 /** 443 * A value to be used with the "Orientation" tag. 444 * 445 * @see #TAG_ORIENTATION 446 */ 447 public static final int ORIENTATION_ROW_0_RIGHT_COLUMN_0_TOP = 6; 448 449 /** 450 * A value to be used with the "Orientation" tag. 451 * 452 * @see #TAG_ORIENTATION 453 */ 454 public static final int ORIENTATION_ROW_0_RIGHT_COLUMN_0_BOTTOM = 7; 455 456 /** 457 * A value to be used with the "Orientation" tag. 458 * 459 * @see #TAG_ORIENTATION 460 */ 461 public static final int ORIENTATION_ROW_0_LEFT_COLUMN_0_BOTTOM = 8; 462 463 /** 464 * Constant specifying the "Samples_per_pixel" tag. 465 */ 466 public static final int TAG_SAMPLES_PER_PIXEL = 277; 467 468 /** 469 * Constant specifying the "Rows_per_strip" tag. 470 */ 471 public static final int TAG_ROWS_PER_STRIP = 278; 472 473 /** 474 * Constant specifying the "Strip_byte_counts" tag. 475 */ 476 public static final int TAG_STRIP_BYTE_COUNTS = 279; 477 478 /** 479 * Constant specifying the "Min_sample_value" tag. 480 */ 481 public static final int TAG_MIN_SAMPLE_VALUE = 280; 482 483 /** 484 * Constant specifying the "Max_sample_value" tag. 485 */ 486 public static final int TAG_MAX_SAMPLE_VALUE = 281; 487 488 /** 489 * Constant specifying the "XResolution" tag. 490 */ 491 public static final int TAG_X_RESOLUTION = 282; 492 493 /** 494 * Constant specifying the "YResolution" tag. 495 */ 496 public static final int TAG_Y_RESOLUTION = 283; 497 498 /** 499 * Constant specifying the "PlanarConfiguration" tag. 500 * 501 * @see #PLANAR_CONFIGURATION_CHUNKY 502 * @see #PLANAR_CONFIGURATION_PLANAR 503 */ 504 public static final int TAG_PLANAR_CONFIGURATION = 284; 505 506 /** 507 * A value to be used with the "PlanarConfiguration" tag. 508 * 509 * @see #TAG_PLANAR_CONFIGURATION 510 */ 511 public static final int PLANAR_CONFIGURATION_CHUNKY = 1; 512 513 /** 514 * A value to be used with the "PlanarConfiguration" tag. 515 * 516 * @see #TAG_PLANAR_CONFIGURATION 517 */ 518 public static final int PLANAR_CONFIGURATION_PLANAR = 2; 519 520 /** 521 * Constant specifying the "PageName" tag. 522 */ 523 public static final int TAG_PAGE_NAME = 285; 524 525 /** 526 * Constant specifying the "XPosition" tag. 527 */ 528 public static final int TAG_X_POSITION = 286; 529 530 /** 531 * Constant specifying the "YPosition" tag. 532 */ 533 public static final int TAG_Y_POSITION = 287; 534 535 /** 536 * Constant specifying the "FreeOffsets" tag. 537 */ 538 public static final int TAG_FREE_OFFSETS = 288; 539 540 /** 541 * Constant specifying the "FreeByteCounts" tag. 542 */ 543 public static final int TAG_FREE_BYTE_COUNTS = 289; 544 545 /** 546 * Constant specifying the "GrayResponseUnit" tag. 547 * 548 * @see #GRAY_RESPONSE_UNIT_TENTHS 549 * @see #GRAY_RESPONSE_UNIT_HUNDREDTHS 550 * @see #GRAY_RESPONSE_UNIT_THOUSANDTHS 551 * @see #GRAY_RESPONSE_UNIT_TEN_THOUSANDTHS 552 * @see #GRAY_RESPONSE_UNIT_HUNDRED_THOUSANDTHS 553 */ 554 public static final int TAG_GRAY_RESPONSE_UNIT = 290; 555 556 /** 557 * A value to be used with the "GrayResponseUnit" tag. 558 * 559 * @see #TAG_GRAY_RESPONSE_UNIT 560 */ 561 public static final int GRAY_RESPONSE_UNIT_TENTHS = 1; 562 563 /** 564 * A value to be used with the "GrayResponseUnit" tag. 565 * 566 * @see #TAG_GRAY_RESPONSE_UNIT 567 */ 568 public static final int GRAY_RESPONSE_UNIT_HUNDREDTHS = 2; 569 570 /** 571 * A value to be used with the "GrayResponseUnit" tag. 572 * 573 * @see #TAG_GRAY_RESPONSE_UNIT 574 */ 575 public static final int GRAY_RESPONSE_UNIT_THOUSANDTHS = 3; 576 577 /** 578 * A value to be used with the "GrayResponseUnit" tag. 579 * 580 * @see #TAG_GRAY_RESPONSE_UNIT 581 */ 582 public static final int GRAY_RESPONSE_UNIT_TEN_THOUSANDTHS = 4; 583 584 /** 585 * A value to be used with the "GrayResponseUnit" tag. 586 * 587 * @see #TAG_GRAY_RESPONSE_UNIT 588 */ 589 public static final int GRAY_RESPONSE_UNIT_HUNDRED_THOUSANDTHS = 5; 590 591 /** 592 * Constant specifying the "GrayResponseCurve" tag. 593 */ 594 public static final int TAG_GRAY_RESPONSE_CURVE = 291; 595 596 /** 597 * Constant specifying the "T4Options" tag. 598 * 599 * @see #T4_OPTIONS_2D_CODING 600 * @see #T4_OPTIONS_UNCOMPRESSED 601 * @see #T4_OPTIONS_EOL_BYTE_ALIGNED 602 */ 603 public static final int TAG_T4_OPTIONS = 292; 604 605 /** 606 * A mask to be used with the "T4Options" tag. 607 * 608 * @see #TAG_T4_OPTIONS 609 */ 610 public static final int T4_OPTIONS_2D_CODING = 1; 611 612 /** 613 * A mask to be used with the "T4Options" tag. 614 * 615 * @see #TAG_T4_OPTIONS 616 */ 617 public static final int T4_OPTIONS_UNCOMPRESSED = 2; 618 619 /** 620 * A mask to be used with the "T4Options" tag. 621 * 622 * @see #TAG_T4_OPTIONS 623 */ 624 public static final int T4_OPTIONS_EOL_BYTE_ALIGNED = 4; 625 626 /** 627 * Constant specifying the "T6Options" tag. 628 * 629 * @see #T6_OPTIONS_UNCOMPRESSED 630 */ 631 public static final int TAG_T6_OPTIONS = 293; 632 633 /** 634 * A mask to be used with the "T6Options" tag. 635 * 636 * @see #TAG_T6_OPTIONS 637 */ 638 public static final int T6_OPTIONS_UNCOMPRESSED = 2; 639 640 /** 641 * Constant specifying the "ResolutionUnit" tag. 642 * 643 * @see #RESOLUTION_UNIT_NONE 644 * @see #RESOLUTION_UNIT_INCH 645 * @see #RESOLUTION_UNIT_CENTIMETER 646 */ 647 public static final int TAG_RESOLUTION_UNIT = 296; 648 649 /** 650 * A value to be used with the "ResolutionUnit" tag. 651 * 652 * @see #TAG_RESOLUTION_UNIT 653 */ 654 public static final int RESOLUTION_UNIT_NONE = 1; 655 656 /** 657 * A value to be used with the "ResolutionUnit" tag. 658 * 659 * @see #TAG_RESOLUTION_UNIT 660 */ 661 public static final int RESOLUTION_UNIT_INCH = 2; 662 663 /** 664 * A value to be used with the "ResolutionUnit" tag. 665 * 666 * @see #TAG_RESOLUTION_UNIT 667 */ 668 public static final int RESOLUTION_UNIT_CENTIMETER = 3; 669 670 671 /** 672 * Constant specifying the "PageNumber" tag. 673 */ 674 public static final int TAG_PAGE_NUMBER = 297; 675 676 /** 677 * Constant specifying the "TransferFunction" tag. 678 */ 679 public static final int TAG_TRANSFER_FUNCTION = 301; 680 681 /** 682 * Constant specifying the "Software" tag. 683 */ 684 public static final int TAG_SOFTWARE = 305; 685 686 /** 687 * Constant specifying the "DateTime" tag. 688 */ 689 public static final int TAG_DATE_TIME = 306; 690 691 /** 692 * Constant specifying the "Artist" tag. 693 */ 694 public static final int TAG_ARTIST = 315; 695 696 /** 697 * Constant specifying the "HostComputer" tag. 698 */ 699 public static final int TAG_HOST_COMPUTER = 316; 700 701 /** 702 * Constant specifying the "Predictor" tag. 703 * 704 * @see #TAG_WHITE_POINT 705 * @see #TAG_PRIMARY_CHROMATICITES 706 * @see #TAG_COLOR_MAP 707 * @see #TAG_HALFTONE_HINTS 708 * @see #TAG_TILE_WIDTH 709 * @see #TAG_TILE_LENGTH 710 * @see #TAG_TILE_OFFSETS 711 * @see #TAG_TILE_BYTE_COUNTS 712 */ 713 public static final int TAG_PREDICTOR = 317; 714 715 /** 716 * A value to be used with the "Predictor" tag. 717 * 718 * @see #TAG_PREDICTOR 719 */ 720 public static final int PREDICTOR_NONE = 1; 721 722 /** 723 * A value to be used with the "Predictor" tag. 724 * 725 * @see #TAG_PREDICTOR 726 */ 727 public static final int PREDICTOR_HORIZONTAL_DIFFERENCING = 2; 728 729 /** 730 * Constant specifying the "WhitePoint" tag. 731 */ 732 public static final int TAG_WHITE_POINT = 318; 733 734 /** 735 * Constant specifying the "PrimaryChromaticites" tag. 736 */ 737 public static final int TAG_PRIMARY_CHROMATICITES = 319; 738 739 /** 740 * Constant specifying the "ColorMap" tag. 741 */ 742 public static final int TAG_COLOR_MAP = 320; 743 744 /** 745 * Constant specifying the "HalftoneHints" tag. 746 */ 747 public static final int TAG_HALFTONE_HINTS = 321; 748 749 /** 750 * Constant specifying the "TileWidth" tag. 751 */ 752 public static final int TAG_TILE_WIDTH = 322; 753 754 /** 755 * Constant specifying the "TileLength" tag. 756 */ 757 public static final int TAG_TILE_LENGTH = 323; 758 759 /** 760 * Constant specifying the "TileOffsets" tag. 761 */ 762 public static final int TAG_TILE_OFFSETS = 324; 763 764 /** 765 * Constant specifying the "TileByteCounts" tag. 766 */ 767 public static final int TAG_TILE_BYTE_COUNTS = 325; 768 769 /** 770 * Constant specifying the "InkSet" tag. 771 * 772 * @see #INK_SET_CMYK 773 * @see #INK_SET_NOT_CMYK 774 */ 775 public static final int TAG_INK_SET = 332; 776 777 /** 778 * A value to be used with the "InkSet" tag. 779 * 780 * @see #TAG_INK_SET 781 */ 782 public static final int INK_SET_CMYK = 1; 783 784 /** 785 * A value to be used with the "InkSet" tag. 786 * 787 * @see #TAG_INK_SET 788 */ 789 public static final int INK_SET_NOT_CMYK = 2; 790 791 /** 792 * Constant specifying the "InkNames" tag. 793 */ 794 public static final int TAG_INK_NAMES = 333; 795 796 /** 797 * Constant specifying the "NumberOfInks" tag. 798 */ 799 public static final int TAG_NUMBER_OF_INKS = 334; 800 801 /** 802 * Constant specifying the "DotRange" tag. 803 */ 804 public static final int TAG_DOT_RANGE = 336; 805 806 /** 807 * Constant specifying the "TargetPrinter" tag. 808 */ 809 public static final int TAG_TARGET_PRINTER = 337; 810 811 /** 812 * Constant specifying the "ExtraSamples" tag. 813 * 814 * @see #EXTRA_SAMPLES_UNSPECIFIED 815 * @see #EXTRA_SAMPLES_ASSOCIATED_ALPHA 816 * @see #EXTRA_SAMPLES_UNASSOCIATED_ALPHA 817 */ 818 public static final int TAG_EXTRA_SAMPLES = 338; 819 820 /** 821 * A value to be used with the "ExtraSamples" tag. 822 * 823 * @see #TAG_EXTRA_SAMPLES 824 */ 825 public static final int EXTRA_SAMPLES_UNSPECIFIED = 0; 826 827 /** 828 * A value to be used with the "ExtraSamples" tag. 829 * 830 * @see #TAG_EXTRA_SAMPLES 831 */ 832 public static final int EXTRA_SAMPLES_ASSOCIATED_ALPHA = 1; 833 834 /** 835 * A value to be used with the "ExtraSamples" tag. 836 * 837 * @see #TAG_EXTRA_SAMPLES 838 */ 839 public static final int EXTRA_SAMPLES_UNASSOCIATED_ALPHA = 2; 840 841 /** 842 * Constant specifying the "SampleFormat" tag. 843 * 844 * @see #SAMPLE_FORMAT_UNSIGNED_INTEGER 845 * @see #SAMPLE_FORMAT_SIGNED_INTEGER 846 * @see #SAMPLE_FORMAT_FLOATING_POINT 847 * @see #SAMPLE_FORMAT_UNDEFINED 848 */ 849 public static final int TAG_SAMPLE_FORMAT = 339; 850 851 /** 852 * A value to be used with the "SampleFormat" tag. 853 * 854 * @see #TAG_SAMPLE_FORMAT 855 */ 856 public static final int SAMPLE_FORMAT_UNSIGNED_INTEGER = 1; 857 858 /** 859 * A value to be used with the "SampleFormat" tag. 860 * 861 * @see #TAG_SAMPLE_FORMAT 862 */ 863 public static final int SAMPLE_FORMAT_SIGNED_INTEGER = 2; 864 865 /** 866 * A value to be used with the "SampleFormat" tag. 867 * 868 * @see #TAG_SAMPLE_FORMAT 869 */ 870 public static final int SAMPLE_FORMAT_FLOATING_POINT = 3; 871 872 /** 873 * A value to be used with the "SampleFormat" tag. 874 * 875 * @see #TAG_SAMPLE_FORMAT 876 */ 877 public static final int SAMPLE_FORMAT_UNDEFINED = 4; 878 879 /** 880 * Constant specifying the "SMinSampleValue" tag. 881 */ 882 public static final int TAG_S_MIN_SAMPLE_VALUE = 340; 883 884 /** 885 * Constant specifying the "SMaxSampleValue" tag. 886 */ 887 public static final int TAG_S_MAX_SAMPLE_VALUE = 341; 888 889 /** 890 * Constant specifying the "TransferRange" tag. 891 */ 892 public static final int TAG_TRANSFER_RANGE = 342; 893 894 /** 895 * Constant specifying the "JPEGTables" tag. 896 */ 897 public static final int TAG_JPEG_TABLES = 347; 898 899 /** 900 * Constant specifying the "JPEGProc" tag. 901 */ 902 public static final int TAG_JPEG_PROC = 512; 903 904 /** 905 * A value to be used with the "JPEGProc" tag. 906 * 907 * @see #TAG_JPEG_PROC 908 */ 909 public static final int JPEG_PROC_BASELINE = 1; 910 911 /** 912 * A value to be used with the "JPEGProc" tag. 913 * 914 * @see #TAG_JPEG_PROC 915 */ 916 public static final int JPEG_PROC_LOSSLESS = 14; 917 918 /** 919 * Constant specifying the "JPEGInterchangeFormat" tag. 920 */ 921 public static final int TAG_JPEG_INTERCHANGE_FORMAT = 513; 922 923 /** 924 * Constant specifying the "JPEGInterchangeFormatLength" tag. 925 */ 926 public static final int TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = 514; 927 928 /** 929 * Constant specifying the "JPEGRestartInterval" tag. 930 */ 931 public static final int TAG_JPEG_RESTART_INTERVAL = 515; 932 933 /** 934 * Constant specifying the "JPEGLosslessPredictors" tag. 935 */ 936 public static final int TAG_JPEG_LOSSLESS_PREDICTORS = 517; 937 938 /** 939 * Constant specifying the "JPEGPointTransforms" tag. 940 */ 941 public static final int TAG_JPEG_POINT_TRANSFORMS = 518; 942 943 /** 944 * Constant specifying the "JPEGQTables" tag. 945 */ 946 public static final int TAG_JPEG_Q_TABLES = 519; 947 948 /** 949 * Constant specifying the "JPEGDCTables" tag. 950 */ 951 public static final int TAG_JPEG_DC_TABLES = 520; 952 953 /** 954 * Constant specifying the "JPEGACTables" tag. 955 */ 956 public static final int TAG_JPEG_AC_TABLES = 521; 957 958 /** 959 * Constant specifying the "YCbCrCoefficients" tag. 960 */ 961 public static final int TAG_Y_CB_CR_COEFFICIENTS = 529; 962 963 /** 964 * Constant specifying the "YCbCrSubsampling" tag. 965 */ 966 public static final int TAG_Y_CB_CR_SUBSAMPLING = 530; 967 968 /** 969 * Constant specifying the "YCbCrPositioning" tag. 970 * 971 * @see #Y_CB_CR_POSITIONING_CENTERED 972 * @see #Y_CB_CR_POSITIONING_COSITED 973 */ 974 public static final int TAG_Y_CB_CR_POSITIONING = 531; 975 976 /** 977 * A value to be used with the "YCbCrPositioning" tag. 978 * 979 * @see #TAG_Y_CB_CR_POSITIONING 980 */ 981 public static final int Y_CB_CR_POSITIONING_CENTERED = 1; 982 983 /** 984 * A value to be used with the "YCbCrPositioning" tag. 985 * 986 * @see #TAG_Y_CB_CR_POSITIONING 987 */ 988 public static final int Y_CB_CR_POSITIONING_COSITED = 2; 989 990 /** 991 * Constant specifying the "ReferenceBlackWhite" tag. 992 */ 993 public static final int TAG_REFERENCE_BLACK_WHITE = 532; 994 995 /** 996 * Constant specifying the "Copyright" tag. 997 */ 998 public static final int TAG_COPYRIGHT = 33432; 999 1000 // Common non-baseline tags 1001 1002 // ICC profiles (Spec ICC 1:2001-04, Appendix B) 1003 1004 // 34675 - Embedded ICC Profile (UNDEFINED/any) 1005 1006 /** 1007 * Constant specifying the "ICC Profile" tag. 1008 * 1009 * @see <a href="http://www.color.org/ICC1V42.pdf">ICC Specification, section B.4: Embedding ICC profiles in TIFF files</a> 1010 */ 1011 public static final int TAG_ICC_PROFILE = 34675; 1012 1013 // Artist 1014 1015 static class Artist extends TIFFTag { 1016 1017 public Artist() { 1018 super("Artist", 1019 TAG_ARTIST, 1020 1 << TIFF_ASCII); 1021 } 1022 } 1023 1024 // BitsPerSample 1025 1026 static class BitsPerSample extends TIFFTag { 1027 1028 public BitsPerSample() { 1029 super("BitsPerSample", 1030 TAG_BITS_PER_SAMPLE, 1031 1 << TIFF_SHORT); 1032 } 1033 } 1034 1035 // CellLength 1036 1037 static class CellLength extends TIFFTag { 1038 1039 public CellLength() { 1040 super("CellLength", 1041 TAG_CELL_LENGTH, 1042 1 << TIFF_SHORT, 1043 1); 1044 } 1045 } 1046 1047 // CellWidth tag 1048 1049 static class CellWidth extends TIFFTag { 1050 1051 public CellWidth() { 1052 super("CellWidth", 1053 TAG_CELL_WIDTH, 1054 1 << TIFF_SHORT, 1055 1); 1056 } 1057 } 1058 1059 // ColorMap 1060 1061 static class ColorMap extends TIFFTag { 1062 1063 public ColorMap() { 1064 super("ColorMap", 1065 TAG_COLOR_MAP, 1066 1 << TIFF_SHORT); 1067 } 1068 } 1069 1070 // Compression 1071 1072 static class Compression extends TIFFTag { 1073 1074 public Compression() { 1075 super("Compression", 1076 TAG_COMPRESSION, 1077 1 << TIFF_SHORT, 1078 1); 1079 1080 addValueName(COMPRESSION_NONE, "Uncompressed"); 1081 addValueName(COMPRESSION_CCITT_RLE, "CCITT RLE"); 1082 addValueName(COMPRESSION_CCITT_T_4, "CCITT T.4"); 1083 addValueName(COMPRESSION_CCITT_T_6, "CCITT T.6"); 1084 addValueName(COMPRESSION_LZW, "LZW"); 1085 addValueName(COMPRESSION_OLD_JPEG, "Old JPEG"); 1086 addValueName(COMPRESSION_JPEG, "JPEG"); 1087 addValueName(COMPRESSION_ZLIB, "ZLib"); 1088 addValueName(COMPRESSION_PACKBITS, "PackBits"); 1089 addValueName(COMPRESSION_DEFLATE, "Deflate"); // Non-baseline 1090 1091 // 32771 CCITT 1092 // 32809 ThunderScan 1093 // 32766 NeXT 1094 // 32909 Pixar 1095 // 34676 SGI 1096 // 34677 SGI 1097 } 1098 } 1099 1100 // Copyright 1101 1102 static class Copyright extends TIFFTag { 1103 1104 public Copyright() { 1105 super("Copyright", 1106 TAG_COPYRIGHT, 1107 1 << TIFF_ASCII); 1108 } 1109 } 1110 1111 // DateTime 1112 1113 static class DateTime extends TIFFTag { 1114 1115 public DateTime() { 1116 super("DateTime", 1117 TAG_DATE_TIME, 1118 1 << TIFF_ASCII, 1119 20); 1120 } 1121 } 1122 1123 // DocumentName 1124 1125 static class DocumentName extends TIFFTag { 1126 1127 public DocumentName() { 1128 super("DocumentName", 1129 TAG_DOCUMENT_NAME, 1130 1 << TIFF_ASCII); 1131 } 1132 } 1133 1134 // DotRange 1135 1136 static class DotRange extends TIFFTag { 1137 1138 public DotRange() { 1139 super("DotRange", 1140 TAG_DOT_RANGE, 1141 (1 << TIFF_BYTE) | 1142 (1 << TIFF_SHORT)); 1143 } 1144 } 1145 1146 // ExtraSamples 1147 1148 static class ExtraSamples extends TIFFTag { 1149 1150 public ExtraSamples() { 1151 super("ExtraSamples", 1152 TAG_EXTRA_SAMPLES, 1153 1 << TIFF_SHORT); 1154 1155 addValueName(EXTRA_SAMPLES_UNSPECIFIED, 1156 "Unspecified"); 1157 addValueName(EXTRA_SAMPLES_ASSOCIATED_ALPHA, 1158 "Associated Alpha"); 1159 addValueName(EXTRA_SAMPLES_UNASSOCIATED_ALPHA, 1160 "Unassociated Alpha"); 1161 } 1162 } 1163 1164 // FillOrder 1165 1166 static class FillOrder extends TIFFTag { 1167 1168 public FillOrder() { 1169 super("FillOrder", 1170 TAG_FILL_ORDER, 1171 1 << TIFF_SHORT, 1172 1); 1173 1174 addValueName(FILL_ORDER_LEFT_TO_RIGHT, "LeftToRight"); 1175 addValueName(FILL_ORDER_RIGHT_TO_LEFT, "RightToLeft"); 1176 } 1177 } 1178 1179 // FreeByteCounts 1180 1181 static class FreeByteCounts extends TIFFTag { 1182 1183 public FreeByteCounts() { 1184 super("FreeByteCounts", 1185 TAG_FREE_BYTE_COUNTS, 1186 1 << TIFF_LONG); 1187 } 1188 } 1189 1190 // FreeOffsets 1191 1192 static class FreeOffsets extends TIFFTag { 1193 1194 public FreeOffsets() { 1195 super("FreeOffsets", 1196 TAG_FREE_OFFSETS, 1197 1 << TIFF_LONG); 1198 } 1199 } 1200 1201 // GrayResponseCurve 1202 1203 static class GrayResponseCurve extends TIFFTag { 1204 1205 public GrayResponseCurve() { 1206 super("GrayResponseCurve", 1207 TAG_GRAY_RESPONSE_CURVE, 1208 1 << TIFF_SHORT); 1209 } 1210 } 1211 1212 // GrayResponseUnit 1213 1214 static class GrayResponseUnit extends TIFFTag { 1215 1216 public GrayResponseUnit() { 1217 super("GrayResponseUnit", 1218 TAG_GRAY_RESPONSE_UNIT, 1219 1 << TIFF_SHORT, 1220 1); 1221 1222 addValueName(GRAY_RESPONSE_UNIT_TENTHS, 1223 "Tenths"); 1224 addValueName(GRAY_RESPONSE_UNIT_HUNDREDTHS, 1225 "Hundredths"); 1226 addValueName(GRAY_RESPONSE_UNIT_THOUSANDTHS, 1227 "Thousandths"); 1228 addValueName(GRAY_RESPONSE_UNIT_TEN_THOUSANDTHS, 1229 "Ten-Thousandths"); 1230 addValueName(GRAY_RESPONSE_UNIT_HUNDRED_THOUSANDTHS, 1231 "Hundred-Thousandths"); 1232 } 1233 } 1234 1235 // HalftoneHints 1236 1237 static class HalftoneHints extends TIFFTag { 1238 1239 public HalftoneHints() { 1240 super("HalftoneHints", 1241 TAG_HALFTONE_HINTS, 1242 1 << TIFF_SHORT, 1243 2); 1244 } 1245 } 1246 1247 // HostComputer 1248 1249 static class HostComputer extends TIFFTag { 1250 1251 public HostComputer() { 1252 super("HostComputer", 1253 TAG_HOST_COMPUTER, 1254 1 << TIFF_ASCII); 1255 } 1256 } 1257 1258 // ImageDescription 1259 1260 static class ImageDescription extends TIFFTag { 1261 1262 public ImageDescription() { 1263 super("ImageDescription", 1264 TAG_IMAGE_DESCRIPTION, 1265 1 << TIFF_ASCII); 1266 } 1267 } 1268 1269 // ImageLength tag 1270 1271 static class ImageLength extends TIFFTag { 1272 1273 public ImageLength() { 1274 super("ImageLength", 1275 TAG_IMAGE_LENGTH, 1276 (1 << TIFF_SHORT) | 1277 (1 << TIFF_LONG), 1278 1); 1279 } 1280 } 1281 1282 // ImageWidth tag 1283 1284 static class ImageWidth extends TIFFTag { 1285 1286 public ImageWidth() { 1287 super("ImageWidth", 1288 TAG_IMAGE_WIDTH, 1289 (1 << TIFF_SHORT) | 1290 (1 << TIFF_LONG), 1291 1); 1292 } 1293 } 1294 1295 // InkNames 1296 1297 static class InkNames extends TIFFTag { 1298 1299 public InkNames() { 1300 super("InkNames", 1301 TAG_INK_NAMES, 1302 1 << TIFF_ASCII); 1303 } 1304 } 1305 1306 // InkSet 1307 1308 static class InkSet extends TIFFTag { 1309 1310 public InkSet() { 1311 super("InkSet", 1312 TAG_INK_SET, 1313 1 << TIFF_SHORT, 1314 1); 1315 1316 addValueName(INK_SET_CMYK, "CMYK"); 1317 addValueName(INK_SET_NOT_CMYK, "Not CMYK"); 1318 } 1319 } 1320 1321 // JPEGTables (Tech note) 1322 1323 static class JPEGTables extends TIFFTag { 1324 1325 public JPEGTables() { 1326 super("JPEGTables", 1327 TAG_JPEG_TABLES, 1328 1 << TIFF_UNDEFINED); 1329 } 1330 } 1331 1332 // JPEGACTables 1333 1334 static class JPEGACTables extends TIFFTag { 1335 1336 public JPEGACTables() { 1337 super("JPEGACTables", 1338 TAG_JPEG_AC_TABLES, 1339 1 << TIFF_LONG); 1340 } 1341 } 1342 1343 // JPEGDCTables 1344 1345 static class JPEGDCTables extends TIFFTag { 1346 1347 public JPEGDCTables() { 1348 super("JPEGDCTables", 1349 TAG_JPEG_DC_TABLES, 1350 1 << TIFF_LONG); 1351 } 1352 } 1353 1354 // JPEGInterchangeFormat 1355 1356 static class JPEGInterchangeFormat extends TIFFTag { 1357 1358 public JPEGInterchangeFormat() { 1359 super("JPEGInterchangeFormat", 1360 TAG_JPEG_INTERCHANGE_FORMAT, 1361 1 << TIFF_LONG, 1362 1); 1363 } 1364 } 1365 1366 // JPEGInterchangeFormatLength 1367 1368 static class JPEGInterchangeFormatLength extends TIFFTag { 1369 1370 public JPEGInterchangeFormatLength() { 1371 super("JPEGInterchangeFormatLength", 1372 TAG_JPEG_INTERCHANGE_FORMAT_LENGTH, 1373 1 << TIFF_LONG, 1374 1); 1375 } 1376 } 1377 1378 // JPEGLosslessPredictors 1379 1380 static class JPEGLosslessPredictors extends TIFFTag { 1381 1382 public JPEGLosslessPredictors() { 1383 super("JPEGLosslessPredictors", 1384 TAG_JPEG_LOSSLESS_PREDICTORS, 1385 1 << TIFF_SHORT); 1386 1387 addValueName(1, "A"); 1388 addValueName(2, "B"); 1389 addValueName(3, "C"); 1390 addValueName(4, "A+B-C"); 1391 addValueName(5, "A+((B-C)/2)"); 1392 addValueName(6, "B+((A-C)/2)"); 1393 addValueName(7, "(A+B)/2"); 1394 } 1395 } 1396 1397 // JPEGPointTransforms 1398 1399 static class JPEGPointTransforms extends TIFFTag { 1400 1401 public JPEGPointTransforms() { 1402 super("JPEGPointTransforms", 1403 TAG_JPEG_POINT_TRANSFORMS, 1404 1 << TIFF_SHORT); 1405 } 1406 } 1407 1408 // JPEGProc 1409 1410 static class JPEGProc extends TIFFTag { 1411 1412 public JPEGProc() { 1413 super("JPEGProc", 1414 TAG_JPEG_PROC, 1415 1 << TIFF_SHORT, 1416 1); 1417 1418 addValueName(JPEG_PROC_BASELINE, "Baseline sequential process"); 1419 addValueName(JPEG_PROC_LOSSLESS, 1420 "Lossless process with Huffman coding"); 1421 } 1422 } 1423 1424 // JPEGQTables 1425 1426 static class JPEGQTables extends TIFFTag { 1427 1428 public JPEGQTables() { 1429 super("JPEGQTables", 1430 TAG_JPEG_Q_TABLES, 1431 1 << TIFF_LONG); 1432 } 1433 } 1434 1435 // JPEGRestartInterval 1436 1437 static class JPEGRestartInterval extends TIFFTag { 1438 1439 public JPEGRestartInterval() { 1440 super("JPEGRestartInterval", 1441 TAG_JPEG_RESTART_INTERVAL, 1442 1 << TIFF_SHORT, 1443 1); 1444 } 1445 } 1446 1447 // Make 1448 1449 static class Make extends TIFFTag { 1450 1451 public Make() { 1452 super("Make", 1453 TAG_MAKE, 1454 1 << TIFF_ASCII); 1455 } 1456 } 1457 1458 // MaxSampleValue 1459 1460 static class MaxSampleValue extends TIFFTag { 1461 1462 public MaxSampleValue() { 1463 super("MaxSampleValue", 1464 TAG_MAX_SAMPLE_VALUE, 1465 1 << TIFF_SHORT); 1466 } 1467 } 1468 1469 // MinSampleValue 1470 1471 static class MinSampleValue extends TIFFTag { 1472 1473 public MinSampleValue() { 1474 super("MinSampleValue", 1475 TAG_MIN_SAMPLE_VALUE, 1476 1 << TIFF_SHORT); 1477 } 1478 } 1479 1480 // Model 1481 1482 static class Model extends TIFFTag { 1483 1484 public Model() { 1485 super("Model", 1486 TAG_MODEL, 1487 1 << TIFF_ASCII); 1488 } 1489 } 1490 1491 // NewSubfileType 1492 1493 static class NewSubfileType extends TIFFTag { 1494 1495 public NewSubfileType() { 1496 super("NewSubfileType", 1497 TAG_NEW_SUBFILE_TYPE, 1498 1 << TIFF_LONG, 1499 1); 1500 1501 addValueName(0, 1502 "Default"); 1503 addValueName(NEW_SUBFILE_TYPE_REDUCED_RESOLUTION, 1504 "ReducedResolution"); 1505 addValueName(NEW_SUBFILE_TYPE_SINGLE_PAGE, 1506 "SinglePage"); 1507 addValueName(NEW_SUBFILE_TYPE_SINGLE_PAGE | 1508 NEW_SUBFILE_TYPE_REDUCED_RESOLUTION, 1509 "SinglePage+ReducedResolution"); 1510 addValueName(NEW_SUBFILE_TYPE_TRANSPARENCY, 1511 "Transparency"); 1512 addValueName(NEW_SUBFILE_TYPE_TRANSPARENCY | 1513 NEW_SUBFILE_TYPE_REDUCED_RESOLUTION, 1514 "Transparency+ReducedResolution"); 1515 addValueName(NEW_SUBFILE_TYPE_TRANSPARENCY | 1516 NEW_SUBFILE_TYPE_SINGLE_PAGE, 1517 "Transparency+SinglePage"); 1518 addValueName(NEW_SUBFILE_TYPE_TRANSPARENCY | 1519 NEW_SUBFILE_TYPE_SINGLE_PAGE | 1520 NEW_SUBFILE_TYPE_REDUCED_RESOLUTION, 1521 "Transparency+SinglePage+ReducedResolution"); 1522 } 1523 } 1524 1525 // NumberOfInks 1526 1527 static class NumberOfInks extends TIFFTag { 1528 1529 public NumberOfInks() { 1530 super("NumberOfInks", 1531 TAG_NUMBER_OF_INKS, 1532 1 << TIFF_SHORT, 1533 1); 1534 } 1535 } 1536 1537 // Orientation 1538 1539 static class Orientation extends TIFFTag { 1540 1541 public Orientation() { 1542 super("Orientation", 1543 TAG_ORIENTATION, 1544 1 << TIFF_SHORT, 1545 1); 1546 1547 addValueName(ORIENTATION_ROW_0_TOP_COLUMN_0_LEFT, 1548 "Row 0=Top, Column 0=Left"); 1549 addValueName(ORIENTATION_ROW_0_TOP_COLUMN_0_RIGHT, 1550 "Row 0=Top, Column 0=Right"); 1551 addValueName(ORIENTATION_ROW_0_BOTTOM_COLUMN_0_RIGHT, 1552 "Row 0=Bottom, Column 0=Right"); 1553 addValueName(ORIENTATION_ROW_0_BOTTOM_COLUMN_0_LEFT, 1554 "Row 0=Bottom, Column 0=Left"); 1555 addValueName(ORIENTATION_ROW_0_LEFT_COLUMN_0_TOP, 1556 "Row 0=Left, Column 0=Top"); 1557 addValueName(ORIENTATION_ROW_0_RIGHT_COLUMN_0_TOP, 1558 "Row 0=Right, Column 0=Top"); 1559 addValueName(ORIENTATION_ROW_0_RIGHT_COLUMN_0_BOTTOM, 1560 "Row 0=Right, Column 0=Bottom"); 1561 } 1562 } 1563 1564 // PageName 1565 1566 static class PageName extends TIFFTag { 1567 1568 public PageName() { 1569 super("PageName", 1570 TAG_PAGE_NAME, 1571 1 << TIFF_ASCII); 1572 } 1573 } 1574 1575 // PageNumber 1576 1577 static class PageNumber extends TIFFTag { 1578 1579 public PageNumber() { 1580 super("PageNumber", 1581 TAG_PAGE_NUMBER, 1582 1 << TIFF_SHORT); 1583 } 1584 } 1585 1586 // PhotometricInterpretation 1587 1588 static class PhotometricInterpretation extends TIFFTag { 1589 1590 public PhotometricInterpretation() { 1591 super("PhotometricInterpretation", 1592 TAG_PHOTOMETRIC_INTERPRETATION, 1593 1 << TIFF_SHORT, 1594 1); 1595 1596 addValueName(PHOTOMETRIC_INTERPRETATION_WHITE_IS_ZERO, 1597 "WhiteIsZero"); 1598 addValueName(PHOTOMETRIC_INTERPRETATION_BLACK_IS_ZERO, 1599 "BlackIsZero"); 1600 addValueName(PHOTOMETRIC_INTERPRETATION_RGB, 1601 "RGB"); 1602 addValueName(PHOTOMETRIC_INTERPRETATION_PALETTE_COLOR, 1603 "Palette Color"); 1604 addValueName(PHOTOMETRIC_INTERPRETATION_TRANSPARENCY_MASK, 1605 "Transparency Mask"); 1606 addValueName(PHOTOMETRIC_INTERPRETATION_CMYK, 1607 "CMYK"); 1608 addValueName(PHOTOMETRIC_INTERPRETATION_Y_CB_CR, 1609 "YCbCr"); 1610 addValueName(PHOTOMETRIC_INTERPRETATION_CIELAB, 1611 "CIELAB"); 1612 addValueName(PHOTOMETRIC_INTERPRETATION_ICCLAB, 1613 "ICCLAB"); // Non-baseline 1614 } 1615 } 1616 1617 // PlanarConfiguration 1618 1619 static class PlanarConfiguration extends TIFFTag { 1620 1621 public PlanarConfiguration() { 1622 super("PlanarConfiguration", 1623 TAG_PLANAR_CONFIGURATION, 1624 1 << TIFF_SHORT, 1625 1); 1626 1627 addValueName(PLANAR_CONFIGURATION_CHUNKY, "Chunky"); 1628 addValueName(PLANAR_CONFIGURATION_PLANAR, "Planar"); 1629 } 1630 } 1631 1632 // Predictor 1633 1634 static class Predictor extends TIFFTag { 1635 1636 public Predictor() { 1637 super("Predictor", 1638 TAG_PREDICTOR, 1639 1 << TIFF_SHORT, 1640 1); 1641 1642 addValueName(PREDICTOR_NONE, 1643 "None"); 1644 addValueName(PREDICTOR_HORIZONTAL_DIFFERENCING, 1645 "Horizontal Differencing"); 1646 } 1647 } 1648 1649 // PrimaryChromaticities 1650 1651 static class PrimaryChromaticities extends TIFFTag { 1652 1653 public PrimaryChromaticities() { 1654 super("PrimaryChromaticities", 1655 TAG_PRIMARY_CHROMATICITES, 1656 1 << TIFF_RATIONAL, 1657 6); 1658 } 1659 } 1660 1661 // ReferenceBlackWhite 1662 1663 static class ReferenceBlackWhite extends TIFFTag { 1664 1665 public ReferenceBlackWhite() { 1666 super("ReferenceBlackWhite", 1667 TAG_REFERENCE_BLACK_WHITE, 1668 1 << TIFF_RATIONAL); 1669 } 1670 } 1671 1672 // ResolutionUnit 1673 1674 static class ResolutionUnit extends TIFFTag { 1675 1676 public ResolutionUnit() { 1677 super("ResolutionUnit", 1678 TAG_RESOLUTION_UNIT, 1679 1 << TIFF_SHORT, 1680 1); 1681 1682 addValueName(RESOLUTION_UNIT_NONE, "None"); 1683 addValueName(RESOLUTION_UNIT_INCH, "Inch"); 1684 addValueName(RESOLUTION_UNIT_CENTIMETER, "Centimeter"); 1685 } 1686 } 1687 1688 // RowsPerStrip 1689 1690 static class RowsPerStrip extends TIFFTag { 1691 1692 public RowsPerStrip() { 1693 super("RowsPerStrip", 1694 TAG_ROWS_PER_STRIP, 1695 (1 << TIFF_SHORT) | 1696 (1 << TIFF_LONG), 1697 1); 1698 } 1699 } 1700 1701 // SampleFormat 1702 1703 static class SampleFormat extends TIFFTag { 1704 1705 public SampleFormat() { 1706 super("SampleFormat", 1707 TAG_SAMPLE_FORMAT, 1708 1 << TIFF_SHORT); 1709 1710 addValueName(SAMPLE_FORMAT_UNSIGNED_INTEGER, "Unsigned Integer"); 1711 addValueName(SAMPLE_FORMAT_SIGNED_INTEGER, "Signed Integer"); 1712 addValueName(SAMPLE_FORMAT_FLOATING_POINT, "Floating Point"); 1713 addValueName(SAMPLE_FORMAT_UNDEFINED, "Undefined"); 1714 } 1715 } 1716 1717 // SamplesPerPixel 1718 1719 static class SamplesPerPixel extends TIFFTag { 1720 1721 public SamplesPerPixel() { 1722 super("SamplesPerPixel", 1723 TAG_SAMPLES_PER_PIXEL, 1724 1 << TIFF_SHORT, 1725 1); 1726 } 1727 } 1728 1729 // SMaxSampleValue 1730 1731 static class SMaxSampleValue extends TIFFTag { 1732 1733 public SMaxSampleValue() { 1734 super("SMaxSampleValue", 1735 TAG_S_MAX_SAMPLE_VALUE, 1736 (1 << TIFF_BYTE) | 1737 (1 << TIFF_SHORT) | 1738 (1 << TIFF_LONG) | 1739 (1 << TIFF_RATIONAL) | 1740 (1 << TIFF_SBYTE) | 1741 (1 << TIFF_SSHORT) | 1742 (1 << TIFF_SLONG) | 1743 (1 << TIFF_SRATIONAL) | 1744 (1 << TIFF_FLOAT) | 1745 (1 << TIFF_DOUBLE)); 1746 } 1747 } 1748 1749 // SMinSampleValue 1750 1751 static class SMinSampleValue extends TIFFTag { 1752 1753 public SMinSampleValue() { 1754 super("SMinSampleValue", 1755 TAG_S_MIN_SAMPLE_VALUE, 1756 (1 << TIFF_BYTE) | 1757 (1 << TIFF_SHORT) | 1758 (1 << TIFF_LONG) | 1759 (1 << TIFF_RATIONAL) | 1760 (1 << TIFF_SBYTE) | 1761 (1 << TIFF_SSHORT) | 1762 (1 << TIFF_SLONG) | 1763 (1 << TIFF_SRATIONAL) | 1764 (1 << TIFF_FLOAT) | 1765 (1 << TIFF_DOUBLE)); 1766 } 1767 } 1768 1769 // Software 1770 1771 static class Software extends TIFFTag { 1772 1773 public Software() { 1774 super("Software", 1775 TAG_SOFTWARE, 1776 1 << TIFF_ASCII); 1777 } 1778 } 1779 1780 // StripByteCounts 1781 1782 static class StripByteCounts extends TIFFTag { 1783 1784 public StripByteCounts() { 1785 super("StripByteCounts", 1786 TAG_STRIP_BYTE_COUNTS, 1787 (1 << TIFF_SHORT) | 1788 (1 << TIFF_LONG)); 1789 } 1790 } 1791 1792 // StripOffsets 1793 1794 static class StripOffsets extends TIFFTag { 1795 1796 public StripOffsets() { 1797 super("StripOffsets", 1798 TAG_STRIP_OFFSETS, 1799 (1 << TIFF_SHORT) | 1800 (1 << TIFF_LONG)); 1801 } 1802 } 1803 1804 // SubfileType (deprecated by TIFF but retained for backward compatibility) 1805 1806 static class SubfileType extends TIFFTag { 1807 1808 public SubfileType() { 1809 super("SubfileType", 1810 TAG_SUBFILE_TYPE, 1811 1 << TIFF_SHORT, 1812 1); 1813 1814 addValueName(SUBFILE_TYPE_FULL_RESOLUTION, "FullResolution"); 1815 addValueName(SUBFILE_TYPE_REDUCED_RESOLUTION, "ReducedResolution"); 1816 addValueName(SUBFILE_TYPE_SINGLE_PAGE, "SinglePage"); 1817 } 1818 } 1819 1820 // T4Options 1821 1822 static class T4Options extends TIFFTag { 1823 1824 public T4Options() { 1825 super("T4Options", 1826 TAG_T4_OPTIONS, 1827 1 << TIFF_LONG, 1828 1); 1829 1830 addValueName(0, 1831 "Default 1DCoding"); // 0x00 1832 addValueName(T4_OPTIONS_2D_CODING, 1833 "2DCoding"); // 0x01 1834 addValueName(T4_OPTIONS_UNCOMPRESSED, 1835 "Uncompressed"); // 0x02 1836 addValueName(T4_OPTIONS_2D_CODING | 1837 T4_OPTIONS_UNCOMPRESSED, 1838 "2DCoding+Uncompressed"); // 0x03 1839 addValueName(T4_OPTIONS_EOL_BYTE_ALIGNED, 1840 "EOLByteAligned"); // 0x04 1841 addValueName(T4_OPTIONS_2D_CODING | 1842 T4_OPTIONS_EOL_BYTE_ALIGNED, 1843 "2DCoding+EOLByteAligned"); // 0x05 1844 addValueName(T4_OPTIONS_UNCOMPRESSED | 1845 T4_OPTIONS_EOL_BYTE_ALIGNED, 1846 "Uncompressed+EOLByteAligned"); // 0x06 1847 addValueName(T4_OPTIONS_2D_CODING | 1848 T4_OPTIONS_UNCOMPRESSED | 1849 T4_OPTIONS_EOL_BYTE_ALIGNED, 1850 "2DCoding+Uncompressed+EOLByteAligned"); // 0x07 1851 } 1852 } 1853 1854 // T6Options 1855 1856 static class T6Options extends TIFFTag { 1857 1858 public T6Options() { 1859 super("T6Options", 1860 TAG_T6_OPTIONS, 1861 1 << TIFF_LONG, 1862 1); 1863 1864 addValueName(0, 1865 "Default"); // 0x00 1866 // 0x01 is not possible as bit 0 is unused and always zero. 1867 addValueName(T6_OPTIONS_UNCOMPRESSED, 1868 "Uncompressed"); // 0x02 1869 } 1870 } 1871 1872 // TargetPrinter 1873 1874 static class TargetPrinter extends TIFFTag { 1875 1876 public TargetPrinter() { 1877 super("TargetPrinter", 1878 TAG_TARGET_PRINTER, 1879 1 << TIFF_ASCII); 1880 } 1881 } 1882 1883 // Threshholding 1884 1885 static class Threshholding extends TIFFTag { 1886 1887 public Threshholding() { 1888 super("Threshholding", 1889 TAG_THRESHHOLDING, 1890 1 << TIFF_SHORT, 1891 1); 1892 1893 addValueName(1, "None"); 1894 addValueName(2, "OrderedDither"); 1895 addValueName(3, "RandomizedDither"); 1896 } 1897 } 1898 1899 // TileByteCounts 1900 1901 static class TileByteCounts extends TIFFTag { 1902 1903 public TileByteCounts() { 1904 super("TileByteCounts", 1905 TAG_TILE_BYTE_COUNTS, 1906 (1 << TIFF_SHORT) | 1907 (1 << TIFF_LONG)); 1908 } 1909 } 1910 1911 // TileOffsets 1912 1913 static class TileOffsets extends TIFFTag { 1914 1915 public TileOffsets() { 1916 super("TileOffsets", 1917 TAG_TILE_OFFSETS, 1918 1 << TIFF_LONG); 1919 } 1920 } 1921 1922 // TileLength tag 1923 1924 static class TileLength extends TIFFTag { 1925 1926 public TileLength() { 1927 super("TileLength", 1928 TAG_TILE_LENGTH, 1929 (1 << TIFF_SHORT) | 1930 (1 << TIFF_LONG), 1931 1); 1932 } 1933 } 1934 1935 // TileWidth tag 1936 1937 static class TileWidth extends TIFFTag { 1938 1939 public TileWidth() { 1940 super("TileWidth", 1941 TAG_TILE_WIDTH, 1942 (1 << TIFF_SHORT) | 1943 (1 << TIFF_LONG), 1944 1); 1945 } 1946 } 1947 1948 // TransferFunction 1949 1950 static class TransferFunction extends TIFFTag { 1951 1952 public TransferFunction() { 1953 super("TransferFunction", 1954 TAG_TRANSFER_FUNCTION, 1955 1 << TIFF_SHORT); 1956 } 1957 } 1958 1959 // TransferRange 1960 1961 static class TransferRange extends TIFFTag { 1962 1963 public TransferRange() { 1964 super("TransferRange", 1965 TAG_TRANSFER_RANGE, 1966 1 << TIFF_SHORT, 1967 6); 1968 } 1969 } 1970 1971 // WhitePoint 1972 1973 static class WhitePoint extends TIFFTag { 1974 1975 public WhitePoint() { 1976 super("WhitePoint", 1977 TAG_WHITE_POINT, 1978 1 << TIFF_RATIONAL, 1979 2); 1980 } 1981 } 1982 1983 // XPosition 1984 1985 static class XPosition extends TIFFTag { 1986 1987 public XPosition() { 1988 super("XPosition", 1989 TAG_X_POSITION, 1990 1 << TIFF_RATIONAL, 1991 1); 1992 } 1993 } 1994 1995 // XResolution 1996 1997 static class XResolution extends TIFFTag { 1998 1999 public XResolution() { 2000 super("XResolution", 2001 TAG_X_RESOLUTION, 2002 1 << TIFF_RATIONAL, 2003 1); 2004 } 2005 } 2006 2007 // YCbCrCoefficients 2008 2009 static class YCbCrCoefficients extends TIFFTag { 2010 2011 public YCbCrCoefficients() { 2012 super("YCbCrCoefficients", 2013 TAG_Y_CB_CR_COEFFICIENTS, 2014 1 << TIFF_RATIONAL, 2015 3); 2016 } 2017 } 2018 2019 // YCbCrPositioning 2020 2021 static class YCbCrPositioning extends TIFFTag { 2022 2023 public YCbCrPositioning() { 2024 super("YCbCrPositioning", 2025 TAG_Y_CB_CR_POSITIONING, 2026 1 << TIFF_SHORT, 2027 1); 2028 2029 addValueName(Y_CB_CR_POSITIONING_CENTERED, "Centered"); 2030 addValueName(Y_CB_CR_POSITIONING_COSITED, "Cosited"); 2031 } 2032 } 2033 2034 // YCbCrSubSampling 2035 2036 static class YCbCrSubSampling extends TIFFTag { 2037 2038 public YCbCrSubSampling() { 2039 super("YCbCrSubSampling", 2040 TAG_Y_CB_CR_SUBSAMPLING, 2041 1 << TIFF_SHORT, 2042 2); 2043 } 2044 } 2045 2046 // YPosition 2047 2048 static class YPosition extends TIFFTag { 2049 2050 public YPosition() { 2051 super("YPosition", 2052 TAG_Y_POSITION, 2053 1 << TIFF_RATIONAL, 2054 1); 2055 } 2056 } 2057 2058 // YResolution 2059 2060 static class YResolution extends TIFFTag { 2061 2062 public YResolution() { 2063 super("YResolution", 2064 TAG_Y_RESOLUTION, 2065 1 << TIFF_RATIONAL, 2066 1); 2067 } 2068 } 2069 2070 // Non-6.0 tags 2071 2072 // ICC Profile (Spec. ICC.1:2001-12, File Format for Color Profiles) 2073 2074 static class ICCProfile extends TIFFTag { 2075 2076 public ICCProfile() { 2077 super("ICC Profile", 2078 TAG_ICC_PROFILE, 2079 1 << TIFF_UNDEFINED); 2080 } 2081 } 2082 2083 private static List<TIFFTag> tags; 2084 2085 private static void initTags() { 2086 tags = new ArrayList<TIFFTag>(76); 2087 2088 tags.add(new BaselineTIFFTagSet.Artist()); 2089 tags.add(new BaselineTIFFTagSet.BitsPerSample()); 2090 tags.add(new BaselineTIFFTagSet.CellLength()); 2091 tags.add(new BaselineTIFFTagSet.CellWidth()); 2092 tags.add(new BaselineTIFFTagSet.ColorMap()); 2093 tags.add(new BaselineTIFFTagSet.Compression()); 2094 tags.add(new BaselineTIFFTagSet.Copyright()); 2095 tags.add(new BaselineTIFFTagSet.DateTime()); 2096 tags.add(new BaselineTIFFTagSet.DocumentName()); 2097 tags.add(new BaselineTIFFTagSet.DotRange()); 2098 tags.add(new BaselineTIFFTagSet.ExtraSamples()); 2099 tags.add(new BaselineTIFFTagSet.FillOrder()); 2100 tags.add(new BaselineTIFFTagSet.FreeByteCounts()); 2101 tags.add(new BaselineTIFFTagSet.FreeOffsets()); 2102 tags.add(new BaselineTIFFTagSet.GrayResponseCurve()); 2103 tags.add(new BaselineTIFFTagSet.GrayResponseUnit()); 2104 tags.add(new BaselineTIFFTagSet.HalftoneHints()); 2105 tags.add(new BaselineTIFFTagSet.HostComputer()); 2106 tags.add(new BaselineTIFFTagSet.ImageDescription()); 2107 tags.add(new BaselineTIFFTagSet.ICCProfile()); 2108 tags.add(new BaselineTIFFTagSet.ImageLength()); 2109 tags.add(new BaselineTIFFTagSet.ImageWidth()); 2110 tags.add(new BaselineTIFFTagSet.InkNames()); 2111 tags.add(new BaselineTIFFTagSet.InkSet()); 2112 tags.add(new BaselineTIFFTagSet.JPEGACTables()); 2113 tags.add(new BaselineTIFFTagSet.JPEGDCTables()); 2114 tags.add(new BaselineTIFFTagSet.JPEGInterchangeFormat()); 2115 tags.add(new BaselineTIFFTagSet.JPEGInterchangeFormatLength()); 2116 tags.add(new BaselineTIFFTagSet.JPEGLosslessPredictors()); 2117 tags.add(new BaselineTIFFTagSet.JPEGPointTransforms()); 2118 tags.add(new BaselineTIFFTagSet.JPEGProc()); 2119 tags.add(new BaselineTIFFTagSet.JPEGQTables()); 2120 tags.add(new BaselineTIFFTagSet.JPEGRestartInterval()); 2121 tags.add(new BaselineTIFFTagSet.JPEGTables()); 2122 tags.add(new BaselineTIFFTagSet.Make()); 2123 tags.add(new BaselineTIFFTagSet.MaxSampleValue()); 2124 tags.add(new BaselineTIFFTagSet.MinSampleValue()); 2125 tags.add(new BaselineTIFFTagSet.Model()); 2126 tags.add(new BaselineTIFFTagSet.NewSubfileType()); 2127 tags.add(new BaselineTIFFTagSet.NumberOfInks()); 2128 tags.add(new BaselineTIFFTagSet.Orientation()); 2129 tags.add(new BaselineTIFFTagSet.PageName()); 2130 tags.add(new BaselineTIFFTagSet.PageNumber()); 2131 tags.add(new BaselineTIFFTagSet.PhotometricInterpretation()); 2132 tags.add(new BaselineTIFFTagSet.PlanarConfiguration()); 2133 tags.add(new BaselineTIFFTagSet.Predictor()); 2134 tags.add(new BaselineTIFFTagSet.PrimaryChromaticities()); 2135 tags.add(new BaselineTIFFTagSet.ReferenceBlackWhite()); 2136 tags.add(new BaselineTIFFTagSet.ResolutionUnit()); 2137 tags.add(new BaselineTIFFTagSet.RowsPerStrip()); 2138 tags.add(new BaselineTIFFTagSet.SampleFormat()); 2139 tags.add(new BaselineTIFFTagSet.SamplesPerPixel()); 2140 tags.add(new BaselineTIFFTagSet.SMaxSampleValue()); 2141 tags.add(new BaselineTIFFTagSet.SMinSampleValue()); 2142 tags.add(new BaselineTIFFTagSet.Software()); 2143 tags.add(new BaselineTIFFTagSet.StripByteCounts()); 2144 tags.add(new BaselineTIFFTagSet.StripOffsets()); 2145 tags.add(new BaselineTIFFTagSet.SubfileType()); 2146 tags.add(new BaselineTIFFTagSet.T4Options()); 2147 tags.add(new BaselineTIFFTagSet.T6Options()); 2148 tags.add(new BaselineTIFFTagSet.TargetPrinter()); 2149 tags.add(new BaselineTIFFTagSet.Threshholding()); 2150 tags.add(new BaselineTIFFTagSet.TileByteCounts()); 2151 tags.add(new BaselineTIFFTagSet.TileOffsets()); 2152 tags.add(new BaselineTIFFTagSet.TileLength()); 2153 tags.add(new BaselineTIFFTagSet.TileWidth()); 2154 tags.add(new BaselineTIFFTagSet.TransferFunction()); 2155 tags.add(new BaselineTIFFTagSet.TransferRange()); 2156 tags.add(new BaselineTIFFTagSet.WhitePoint()); 2157 tags.add(new BaselineTIFFTagSet.XPosition()); 2158 tags.add(new BaselineTIFFTagSet.XResolution()); 2159 tags.add(new BaselineTIFFTagSet.YCbCrCoefficients()); 2160 tags.add(new BaselineTIFFTagSet.YCbCrPositioning()); 2161 tags.add(new BaselineTIFFTagSet.YCbCrSubSampling()); 2162 tags.add(new BaselineTIFFTagSet.YPosition()); 2163 tags.add(new BaselineTIFFTagSet.YResolution()); 2164 } 2165 2166 private BaselineTIFFTagSet() { 2167 super(tags); 2168 } 2169 2170 /** 2171 * Returns a shared instance of a {@code BaselineTIFFTagSet}. 2172 * 2173 * @return a {@code BaselineTIFFTagSet} instance. 2174 */ 2175 public synchronized static BaselineTIFFTagSet getInstance() { 2176 if (theInstance == null) { 2177 initTags(); 2178 theInstance = new BaselineTIFFTagSet(); 2179 tags = null; 2180 } 2181 return theInstance; 2182 } 2183 }