    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.imaging.formats.tiff.constants;
    018
    019import java.util.Arrays;
    020import java.util.Collections;
    021import java.util.List;
    022
    023import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo;
    024import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAny;
    025import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAscii;
    026import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoByteOrShort;
    027import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoBytes;
    028import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoLong;
    029import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoLongs;
    030import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRational;
    031import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRationals;
    032import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShort;
    033import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShortOrLong;
    034import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShorts;
    035import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoUnknowns;
    036
    037/**
    038 * Tags from the TIFF6 specification.
    039 * <BR>
    040 * http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
    041 */
    042public final class TiffTagConstants {
    043
    044    public static final TagInfoLong TIFF_TAG_NEW_SUBFILE_TYPE = new TagInfoLong(
    045            "NewSubfileType", 0xFE,
    046            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    047    public static final int SUBFILE_TYPE_VALUE_FULL_RESOLUTION_IMAGE = 0;
    048    public static final int SUBFILE_TYPE_VALUE_REDUCED_RESOLUTION_IMAGE = 1;
    049    public static final int SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_IMAGE = 2;
    050    public static final int SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_REDUCED_RESOLUTION_IMAGE = 3;
    051    public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK = 4;
    052    public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_REDUCED_RESOLUTION_IMAGE = 5;
    053    public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_MULTI_PAGE_IMAGE = 6;
    054    public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_REDUCED_RESOLUTION_MULTI_PAGE_IMAGE = 7;
    055
    056    public static final TagInfoShort TIFF_TAG_SUBFILE_TYPE = new TagInfoShort(
    057            "SubfileType", 0xFF,
    058            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    059    public static final int OLD_SUBFILE_TYPE_VALUE_FULL_RESOLUTION_IMAGE = 1;
    060    public static final int OLD_SUBFILE_TYPE_VALUE_REDUCED_RESOLUTION_IMAGE = 2;
    061    public static final int OLD_SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_IMAGE = 3;
    062
    063    public static final TagInfoShortOrLong TIFF_TAG_IMAGE_WIDTH = new TagInfoShortOrLong(
    064            "ImageWidth", 0x100, 1,
    065            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    066
    067    public static final TagInfoShortOrLong TIFF_TAG_IMAGE_LENGTH = new TagInfoShortOrLong(
    068            "ImageLength", 0x101, 1,
    069            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    070
    071    public static final TagInfoShorts TIFF_TAG_BITS_PER_SAMPLE = new TagInfoShorts(
    072            "BitsPerSample", 0x102, -1,
    073            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    074
    075    public static final TagInfoShort TIFF_TAG_COMPRESSION = new TagInfoShort(
    076            "Compression", 0x103,
    077            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    078    public static final int COMPRESSION_VALUE_UNCOMPRESSED = 1;
    079    public static final int COMPRESSION_VALUE_CCITT_1D = 2;
    080    public static final int COMPRESSION_VALUE_T4_GROUP_3_FAX = 3;
    081    public static final int COMPRESSION_VALUE_T6_GROUP_4_FAX = 4;
    082    public static final int COMPRESSION_VALUE_LZW = 5;
    083    public static final int COMPRESSION_VALUE_JPEG_OLD_STYLE = 6;
    084    public static final int COMPRESSION_VALUE_JPEG = 7;
    085    public static final int COMPRESSION_VALUE_ADOBE_DEFLATE = 8;
    086    public static final int COMPRESSION_VALUE_JBIG_B_AND_W = 9;
    087    public static final int COMPRESSION_VALUE_JBIG_COLOR = 10;
    088    public static final int COMPRESSION_VALUE_NEXT = 32766;
    089    public static final int COMPRESSION_VALUE_EPSON_ERF_COMPRESSED = 32769;
    090    public static final int COMPRESSION_VALUE_CCIRLEW = 32771;
    091    public static final int COMPRESSION_VALUE_PACK_BITS = 32773;
    092    public static final int COMPRESSION_VALUE_THUNDERSCAN = 32809;
    093    public static final int COMPRESSION_VALUE_IT8CTPAD = 32895;
    094    public static final int COMPRESSION_VALUE_IT8LW = 32896;
    095    public static final int COMPRESSION_VALUE_IT8MP = 32897;
    096    public static final int COMPRESSION_VALUE_IT8BL = 32898;
    097    public static final int COMPRESSION_VALUE_PIXAR_FILM = 32908;
    098    public static final int COMPRESSION_VALUE_PIXAR_LOG = 32909;
    099    public static final int COMPRESSION_VALUE_DEFLATE = 32946;
    100    public static final int COMPRESSION_VALUE_DCS = 32947;
    101    public static final int COMPRESSION_VALUE_JBIG = 34661;
    102    public static final int COMPRESSION_VALUE_SGILOG = 34676;
    103    public static final int COMPRESSION_VALUE_SGILOG_24 = 34677;
    104    public static final int COMPRESSION_VALUE_JPEG_2000 = 34712;
    105    public static final int COMPRESSION_VALUE_NIKON_NEF_COMPRESSED = 34713;
    106    public static final int COMPRESSION_VALUE_KODAK_DCR_COMPRESSED = 65000;
    107    public static final int COMPRESSION_VALUE_PENTAX_PEF_COMPRESSED = 65535;
    108
    109    public static final TagInfoShort TIFF_TAG_PHOTOMETRIC_INTERPRETATION = new TagInfoShort(
    110            "PhotometricInterpretation", 0x106,
    111            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    112    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_WHITE_IS_ZERO = 0;
    113    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_BLACK_IS_ZERO = 1;
    114    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_RGB = 2;
    115    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_RGB_PALETTE = 3;
    116    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_TRANSPARENCY_MASK = 4;
    117    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_CMYK = 5;
    118    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_YCB_CR = 6;
    119    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_CIELAB = 8;
    120    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_ICCLAB = 9;
    121    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_ITULAB = 10;
    122    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_COLOR_FILTER_ARRAY = 32803;
    123    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_PIXAR_LOG_L = 32844;
    124    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_PIXAR_LOG_LUV = 32845;
    125    public static final int PHOTOMETRIC_INTERPRETATION_VALUE_LINEAR_RAW = 34892;
    126
    127    public static final TagInfoShort TIFF_TAG_THRESHHOLDING = new TagInfoShort(
    128            "Threshholding", 0x107,
    129            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    130    public static final int THRESHOLDING_VALUE_NO_DITHERING_OR_HALFTONING = 1;
    131    public static final int THRESHOLDING_VALUE_ORDERED_DITHER_OR_HALFTONE = 2;
    132    public static final int THRESHOLDING_VALUE_RANDOMIZED_DITHER = 3;
    133
    134    public static final TagInfoShort TIFF_TAG_CELL_WIDTH = new TagInfoShort(
    135            "CellWidth", 0x108,
    136            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    137
    138    public static final TagInfoShort TIFF_TAG_CELL_LENGTH = new TagInfoShort(
    139            "CellLength", 0x109,
    140            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    141
    142    public static final TagInfoShort TIFF_TAG_FILL_ORDER = new TagInfoShort(
    143            "FillOrder", 0x10A,
    144            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    145    public static final int FILL_ORDER_VALUE_NORMAL = 1;
    146    public static final int FILL_ORDER_VALUE_REVERSED = 2;
    147
    148    public static final TagInfoAscii TIFF_TAG_DOCUMENT_NAME = new TagInfoAscii(
    149            "DocumentName", 0x10D, -1,
    150            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    151
    152    public static final TagInfoAscii TIFF_TAG_IMAGE_DESCRIPTION = new TagInfoAscii(
    153            "ImageDescription", 0x10E, -1,
    154            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    155
    156    public static final TagInfoAscii TIFF_TAG_MAKE = new TagInfoAscii(
    157            "Make", 0x10F, -1,
    158            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    159
    160    public static final TagInfoAscii TIFF_TAG_MODEL = new TagInfoAscii(
    161            "Model", 0x110, -1,
    162            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    163
    164    public static final TagInfoShortOrLong TIFF_TAG_STRIP_OFFSETS = new TagInfoShortOrLong(
    165            "StripOffsets", 0x111, -1,
    166            TiffDirectoryType.TIFF_DIRECTORY_ROOT, true);
    167
    168    public static final TagInfoShort TIFF_TAG_ORIENTATION = new TagInfoShort(
    169            "Orientation", 0x112,
    170            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    171    public static final int ORIENTATION_VALUE_HORIZONTAL_NORMAL = 1;
    172    public static final int ORIENTATION_VALUE_MIRROR_HORIZONTAL = 2;
    173    public static final int ORIENTATION_VALUE_ROTATE_180 = 3;
    174    public static final int ORIENTATION_VALUE_MIRROR_VERTICAL = 4;
    175    public static final int ORIENTATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_270_CW = 5;
    176    public static final int ORIENTATION_VALUE_ROTATE_90_CW = 6;
    177    public static final int ORIENTATION_VALUE_MIRROR_HORIZONTAL_AND_ROTATE_90_CW = 7;
    178    public static final int ORIENTATION_VALUE_ROTATE_270_CW = 8;
    179
    180    public static final TagInfoShort TIFF_TAG_SAMPLES_PER_PIXEL = new TagInfoShort(
    181            "SamplesPerPixel", 0x115,
    182            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    183
    184    public static final TagInfoShortOrLong TIFF_TAG_ROWS_PER_STRIP = new TagInfoShortOrLong(
    185            "RowsPerStrip", 0x116, 1,
    186            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    187
    188    public static final TagInfoShortOrLong TIFF_TAG_STRIP_BYTE_COUNTS = new TagInfoShortOrLong(
    189            "StripByteCounts", 0x117, -1,
    190            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    191
    192    public static final TagInfoShorts TIFF_TAG_MIN_SAMPLE_VALUE = new TagInfoShorts(
    193            "MinSampleValue", 0x118, -1,
    194            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    195
    196    public static final TagInfoShorts TIFF_TAG_MAX_SAMPLE_VALUE = new TagInfoShorts(
    197            "MaxSampleValue", 0x119, -1,
    198            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    199
    200    public static final TagInfoRational TIFF_TAG_XRESOLUTION = new TagInfoRational(
    201            "XResolution", 0x11A,
    202            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    203
    204    public static final TagInfoRational TIFF_TAG_YRESOLUTION = new TagInfoRational(
    205            "YResolution", 0x11B,
    206            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    207
    208    public static final TagInfoShort TIFF_TAG_PLANAR_CONFIGURATION = new TagInfoShort(
    209            "PlanarConfiguration", 0x11C,
    210            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    211    public static final int PLANAR_CONFIGURATION_VALUE_CHUNKY = 1;
    212    public static final int PLANAR_CONFIGURATION_VALUE_PLANAR = 2;
    213
    214    public static final TagInfoAscii TIFF_TAG_PAGE_NAME = new TagInfoAscii(
    215            "PageName", 0x11D, -1,
    216            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    217
    218    public static final TagInfoRationals TIFF_TAG_XPOSITION = new TagInfoRationals(
    219            "XPosition", 0x11E, -1,
    220            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    221
    222    public static final TagInfoRationals TIFF_TAG_YPOSITION = new TagInfoRationals(
    223            "YPosition",  0x11F, -1,
    224            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    225
    226    public static final TagInfoLongs TIFF_TAG_FREE_OFFSETS = new TagInfoLongs(
    227            "FreeOffsets", 0x120, -1,
    228            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    229
    230    public static final TagInfoLongs TIFF_TAG_FREE_BYTE_COUNTS = new TagInfoLongs(
    231            "FreeByteCounts", 0x121, -1,
    232            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    233
    234    public static final TagInfoShort TIFF_TAG_GRAY_RESPONSE_UNIT = new TagInfoShort(
    235            "GrayResponseUnit", 0x122,
    236            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    237    public static final int GRAY_RESPONSE_UNIT_VALUE_0_1 = 1;
    238    public static final int GRAY_RESPONSE_UNIT_VALUE_0_01 = 2;
    239    public static final int GRAY_RESPONSE_UNIT_VALUE_0_001 = 3;
    240    public static final int GRAY_RESPONSE_UNIT_VALUE_0_0001 = 4;
    241    public static final int GRAY_RESPONSE_UNIT_VALUE_0_00001 = 5;
    242
    243    public static final TagInfoShorts TIFF_TAG_GRAY_RESPONSE_CURVE = new TagInfoShorts(
    244            "GrayResponseCurve", 0x123, -1,
    245            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    246
    247    public static final TagInfoLong TIFF_TAG_T4_OPTIONS = new TagInfoLong(
    248            "T4Options", 0x124,
    249            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    250
    251    public static final TagInfoLong TIFF_TAG_T6_OPTIONS = new TagInfoLong(
    252            "T6Options", 0x125,
    253            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    254
    255    public static final TagInfoShort TIFF_TAG_RESOLUTION_UNIT = new TagInfoShort(
    256            "ResolutionUnit", 0x128,
    257            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    258    public static final int RESOLUTION_UNIT_VALUE_NONE = 1;
    259    public static final int RESOLUTION_UNIT_VALUE_INCHES = 2;
    260    public static final int RESOLUTION_UNIT_VALUE_CM = 3;
    261
    262    public static final TagInfoShorts TIFF_TAG_PAGE_NUMBER = new TagInfoShorts(
    263            "PageNumber", 0x129, 2,
    264            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    265
    266    public static final TagInfoShorts TIFF_TAG_TRANSFER_FUNCTION = new TagInfoShorts(
    267            "TransferFunction", 0x12D, -1,
    268            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    269
    270    public static final TagInfoAscii TIFF_TAG_SOFTWARE = new TagInfoAscii(
    271            "Software", 0x131, -1,
    272            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    273
    274    public static final TagInfoAscii TIFF_TAG_DATE_TIME = new TagInfoAscii(
    275            "DateTime", 0x132, 20,
    276            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    277
    278    public static final TagInfoAscii TIFF_TAG_ARTIST = new TagInfoAscii(
    279            "Artist", 0x13B, -1,
    280            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    281
    282    public static final TagInfoAscii TIFF_TAG_HOST_COMPUTER = new TagInfoAscii(
    283            "HostComputer", 0x13C, -1,
    284            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    285
    286    public static final TagInfoShort TIFF_TAG_PREDICTOR = new TagInfoShort(
    287            "Predictor", 0x13D,
    288            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    289    public static final int PREDICTOR_VALUE_NONE = 1;
    290    public static final int PREDICTOR_VALUE_HORIZONTAL_DIFFERENCING = 2;
    291    public static final int PREDICTOR_VALUE_FLOATING_POINT_DIFFERENCING = 3;
    292
    293    public static final TagInfoRationals TIFF_TAG_WHITE_POINT = new TagInfoRationals(
    294            "WhitePoint", 0x13E, 2,
    295            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    296
    297    public static final TagInfoRationals TIFF_TAG_PRIMARY_CHROMATICITIES = new TagInfoRationals(
    298            "PrimaryChromaticities", 0x13F, 6,
    299            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    300
    301    public static final TagInfoShorts TIFF_TAG_COLOR_MAP = new TagInfoShorts(
    302            "ColorMap", 0x140, -1,
    303            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    304
    305    public static final TagInfoShorts TIFF_TAG_HALFTONE_HINTS = new TagInfoShorts(
    306            "HalftoneHints", 0x141, 2,
    307            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    308
    309    public static final TagInfoShortOrLong TIFF_TAG_TILE_WIDTH = new TagInfoShortOrLong(
    310            "TileWidth", 0x142, 1,
    311            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    312
    313    public static final TagInfoShortOrLong TIFF_TAG_TILE_LENGTH = new TagInfoShortOrLong(
    314            "TileLength", 0x143, 1,
    315            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    316
    317    public static final TagInfoLongs TIFF_TAG_TILE_OFFSETS = new TagInfoLongs(
    318            "TileOffsets", 0x144, -1,
    319            TiffDirectoryType.TIFF_DIRECTORY_ROOT, true);
    320
    321    public static final TagInfoShortOrLong TIFF_TAG_TILE_BYTE_COUNTS = new TagInfoShortOrLong(
    322            "TileByteCounts", 0x145, -1,
    323            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    324
    325    public static final TagInfoShort TIFF_TAG_INK_SET = new TagInfoShort(
    326            "InkSet", 0x14C,
    327            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    328    public static final int INK_SET_VALUE_CMYK = 1;
    329    public static final int INK_SET_VALUE_NOT_CMYK = 2;
    330
    331    public static final TagInfoAscii TIFF_TAG_INK_NAMES = new TagInfoAscii(
    332            "InkNames", 0x14D, -1,
    333            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    334
    335    public static final TagInfoShort TIFF_TAG_NUMBER_OF_INKS = new TagInfoShort(
    336            "NumberOfInks", 0x14E,
    337            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    338
    339    public static final TagInfoByteOrShort TIFF_TAG_DOT_RANGE = new TagInfoByteOrShort(
    340            "DotRange", 0x150, -1,
    341            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    342
    343    public static final TagInfoAscii TIFF_TAG_TARGET_PRINTER = new TagInfoAscii(
    344            "TargetPrinter", 0x151, -1,
    345            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    346
    347    public static final TagInfoShorts TIFF_TAG_EXTRA_SAMPLES = new TagInfoShorts(
    348            "ExtraSamples", 0x152, -1,
    349            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    350
    351    public static final TagInfoShorts TIFF_TAG_SAMPLE_FORMAT = new TagInfoShorts(
    352            "SampleFormat", 0x153, -1,
    353            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    354    public static final int SAMPLE_FORMAT_VALUE_UNSIGNED_INTEGER = 1;
    355    public static final int SAMPLE_FORMAT_VALUE_TWOS_COMPLEMENT_SIGNED_INTEGER = 2;
    356    public static final int SAMPLE_FORMAT_VALUE_IEEE_FLOATING_POINT = 3;
    357    public static final int SAMPLE_FORMAT_VALUE_UNDEFINED = 4;
    358    public static final int SAMPLE_FORMAT_VALUE_COMPLEX_INTEGER = 5;
    359    public static final int SAMPLE_FORMAT_VALUE_IEEE_FLOATING_POINT_1 = 6;
    360
    361    public static final TagInfoAny TIFF_TAG_SMIN_SAMPLE_VALUE = new TagInfoAny(
    362            "SMinSampleValue", 0x154, -1,
    363            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    364
    365    public static final TagInfoAny TIFF_TAG_SMAX_SAMPLE_VALUE = new TagInfoAny(
    366            "SMaxSampleValue", 0x155, -1,
    367            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    368
    369    public static final TagInfoShorts TIFF_TAG_TRANSFER_RANGE = new TagInfoShorts(
    370            "TransferRange", 0x156, 6,
    371            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    372
    373    public static final TagInfoShort TIFF_TAG_JPEG_PROC = new TagInfoShort(
    374            "JPEGProc", 0x200,
    375            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    376    public static final int JPEGPROC_VALUE_BASELINE = 1;
    377    public static final int JPEGPROC_VALUE_LOSSLESS = 14;
    378
    379    public static final TagInfoLong TIFF_TAG_JPEG_INTERCHANGE_FORMAT = new TagInfoLong(
    380            "JPEGInterchangeFormat", 0x201,
    381            TiffDirectoryType.TIFF_DIRECTORY_ROOT, true);
    382
    383    public static final TagInfoLong TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = new TagInfoLong(
    384            "JPEGInterchangeFormatLength", 0x202,
    385            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    386
    387    public static final TagInfoShort TIFF_TAG_JPEG_RESTART_INTERVAL = new TagInfoShort(
    388            "JPEGRestartInterval", 0x203,
    389            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    390
    391    public static final TagInfoShorts TIFF_TAG_JPEG_LOSSLESS_PREDICTORS = new TagInfoShorts(
    392            "JPEGLosslessPredictors", 0x205, -1,
    393            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    394
    395    public static final TagInfoShorts TIFF_TAG_JPEG_POINT_TRANSFORMS = new TagInfoShorts(
    396            "JPEGPointTransforms", 0x206, -1,
    397            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    398
    399    public static final TagInfoLongs TIFF_TAG_JPEG_QTABLES = new TagInfoLongs(
    400            "JPEGQTables", 0x207, -1,
    401            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    402
    403    public static final TagInfoLongs TIFF_TAG_JPEG_DCTABLES = new TagInfoLongs(
    404            "JPEGDCTables", 0x208, -1,
    405            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    406
    407    public static final TagInfoLongs TIFF_TAG_JPEG_ACTABLES = new TagInfoLongs(
    408            "JPEGACTables", 0x209, -1,
    409            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    410
    411    public static final TagInfoRationals TIFF_TAG_YCBCR_COEFFICIENTS = new TagInfoRationals(
    412            "YCbCrCoefficients", 0x211, 3,
    413            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    414
    415    public static final TagInfoShorts TIFF_TAG_YCBCR_SUB_SAMPLING = new TagInfoShorts(
    416            "YCbCrSubSampling", 0x212, 2,
    417            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    418
    419    public static final TagInfoShort TIFF_TAG_YCBCR_POSITIONING = new TagInfoShort(
    420            "YCbCrPositioning", 0x213,
    421            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    422    public static final int YCB_CR_POSITIONING_VALUE_CENTERED = 1;
    423    public static final int YCB_CR_POSITIONING_VALUE_CO_SITED = 2;
    424
    425    public static final TagInfoLongs TIFF_TAG_REFERENCE_BLACK_WHITE = new TagInfoLongs(
    426            "ReferenceBlackWhite", 0x214, -1,
    427            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    428
    429    public static final TagInfoAscii TIFF_TAG_COPYRIGHT = new TagInfoAscii(
    430            "Copyright", 0x8298, -1,
    431            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    432
    433    public static final TagInfoBytes TIFF_TAG_XMP = new TagInfoBytes(
    434            "XMP", 0x2BC, -1,
    435            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
    436
    437    // TODO:
    438    //    public static final TagInfo2 TIFF_TAG_UNKNOWN = null;
    439    public static final TagInfoUnknowns TIFF_TAG_UNKNOWN = new TagInfoUnknowns(
    440            "Unknown Tag", -1, TagInfo.LENGTH_UNKNOWN,
    441            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
    442
    443    public static final List<TagInfo> ALL_TIFF_TAGS =
    444            Collections.unmodifiableList(Arrays.asList(
    445                    TIFF_TAG_NEW_SUBFILE_TYPE, TIFF_TAG_SUBFILE_TYPE,
    446                    TIFF_TAG_IMAGE_WIDTH, TIFF_TAG_IMAGE_LENGTH,
    447                    TIFF_TAG_BITS_PER_SAMPLE, TIFF_TAG_COMPRESSION,
    448                    TIFF_TAG_PHOTOMETRIC_INTERPRETATION, TIFF_TAG_THRESHHOLDING,
    449                    TIFF_TAG_CELL_WIDTH, TIFF_TAG_CELL_LENGTH, TIFF_TAG_FILL_ORDER,
    450                    TIFF_TAG_DOCUMENT_NAME, TIFF_TAG_IMAGE_DESCRIPTION, TIFF_TAG_MAKE,
    451                    TIFF_TAG_MODEL, TIFF_TAG_STRIP_OFFSETS, TIFF_TAG_ORIENTATION,
    452                    TIFF_TAG_SAMPLES_PER_PIXEL, TIFF_TAG_ROWS_PER_STRIP,
    453                    TIFF_TAG_STRIP_BYTE_COUNTS, TIFF_TAG_MIN_SAMPLE_VALUE,
    454                    TIFF_TAG_MAX_SAMPLE_VALUE, TIFF_TAG_XRESOLUTION,
    455                    TIFF_TAG_YRESOLUTION, TIFF_TAG_PLANAR_CONFIGURATION,
    456                    TIFF_TAG_PAGE_NAME, TIFF_TAG_XPOSITION, TIFF_TAG_YPOSITION,
    457                    TIFF_TAG_FREE_OFFSETS, TIFF_TAG_FREE_BYTE_COUNTS,
    458                    TIFF_TAG_GRAY_RESPONSE_UNIT, TIFF_TAG_GRAY_RESPONSE_CURVE,
    459                    TIFF_TAG_T4_OPTIONS, TIFF_TAG_T6_OPTIONS, TIFF_TAG_RESOLUTION_UNIT,
    460                    TIFF_TAG_PAGE_NUMBER, TIFF_TAG_TRANSFER_FUNCTION,
    461                    TIFF_TAG_SOFTWARE, TIFF_TAG_DATE_TIME, TIFF_TAG_ARTIST,
    462                    TIFF_TAG_HOST_COMPUTER, TIFF_TAG_PREDICTOR, TIFF_TAG_WHITE_POINT,
    463                    TIFF_TAG_PRIMARY_CHROMATICITIES, TIFF_TAG_COLOR_MAP,
    464                    TIFF_TAG_HALFTONE_HINTS, TIFF_TAG_TILE_WIDTH, TIFF_TAG_TILE_LENGTH,
    465                    TIFF_TAG_TILE_OFFSETS, TIFF_TAG_TILE_BYTE_COUNTS, TIFF_TAG_INK_SET,
    466                    TIFF_TAG_INK_NAMES, TIFF_TAG_NUMBER_OF_INKS, TIFF_TAG_DOT_RANGE,
    467                    TIFF_TAG_TARGET_PRINTER, TIFF_TAG_EXTRA_SAMPLES,
    468                    TIFF_TAG_SAMPLE_FORMAT, TIFF_TAG_SMIN_SAMPLE_VALUE,
    469                    TIFF_TAG_SMAX_SAMPLE_VALUE, TIFF_TAG_TRANSFER_RANGE,
    470                    TIFF_TAG_JPEG_PROC, TIFF_TAG_JPEG_INTERCHANGE_FORMAT,
    471                    TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH,
    472                    TIFF_TAG_JPEG_RESTART_INTERVAL, TIFF_TAG_JPEG_LOSSLESS_PREDICTORS,
    473                    TIFF_TAG_JPEG_POINT_TRANSFORMS, TIFF_TAG_JPEG_QTABLES,
    474                    TIFF_TAG_JPEG_DCTABLES, TIFF_TAG_JPEG_ACTABLES,
    475                    TIFF_TAG_YCBCR_COEFFICIENTS, TIFF_TAG_YCBCR_SUB_SAMPLING,
    476                    TIFF_TAG_YCBCR_POSITIONING, TIFF_TAG_REFERENCE_BLACK_WHITE,
    477                    TIFF_TAG_COPYRIGHT,
    478                    TIFF_TAG_XMP));
    479
    480    private TiffTagConstants() {
    481    }
    482}