View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.commons.imaging.formats.tiff.constants;
18  
19  import java.util.Arrays;
20  import java.util.Collections;
21  import java.util.List;
22  
23  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo;
24  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAny;
25  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAscii;
26  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoByteOrShort;
27  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoBytes;
28  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoLong;
29  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoLongs;
30  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRational;
31  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoRationals;
32  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShort;
33  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShortOrLong;
34  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoShorts;
35  import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoUnknowns;
36  
37  /**
38   * Tags from the TIFF6 specification.
39   * <BR>
40   * http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
41   */
42  public final class TiffTagConstants {
43  
44      public static final TagInfoLong TIFF_TAG_NEW_SUBFILE_TYPE = new TagInfoLong(
45              "NewSubfileType", 0xFE,
46              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
47      public static final int SUBFILE_TYPE_VALUE_FULL_RESOLUTION_IMAGE = 0;
48      public static final int SUBFILE_TYPE_VALUE_REDUCED_RESOLUTION_IMAGE = 1;
49      public static final int SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_IMAGE = 2;
50      public static final int SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_REDUCED_RESOLUTION_IMAGE = 3;
51      public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK = 4;
52      public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_REDUCED_RESOLUTION_IMAGE = 5;
53      public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_MULTI_PAGE_IMAGE = 6;
54      public static final int SUBFILE_TYPE_VALUE_TRANSPARENCY_MASK_OF_REDUCED_RESOLUTION_MULTI_PAGE_IMAGE = 7;
55  
56      public static final TagInfoShort TIFF_TAG_SUBFILE_TYPE = new TagInfoShort(
57              "SubfileType", 0xFF,
58              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
59      public static final int OLD_SUBFILE_TYPE_VALUE_FULL_RESOLUTION_IMAGE = 1;
60      public static final int OLD_SUBFILE_TYPE_VALUE_REDUCED_RESOLUTION_IMAGE = 2;
61      public static final int OLD_SUBFILE_TYPE_VALUE_SINGLE_PAGE_OF_MULTI_PAGE_IMAGE = 3;
62  
63      public static final TagInfoShortOrLong TIFF_TAG_IMAGE_WIDTH = new TagInfoShortOrLong(
64              "ImageWidth", 0x100, 1,
65              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
66  
67      public static final TagInfoShortOrLong TIFF_TAG_IMAGE_LENGTH = new TagInfoShortOrLong(
68              "ImageLength", 0x101, 1,
69              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
70  
71      public static final TagInfoShorts TIFF_TAG_BITS_PER_SAMPLE = new TagInfoShorts(
72              "BitsPerSample", 0x102, -1,
73              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
74  
75      public static final TagInfoShort TIFF_TAG_COMPRESSION = new TagInfoShort(
76              "Compression", 0x103,
77              TiffDirectoryType.TIFF_DIRECTORY_ROOT);
78      public static final int COMPRESSION_VALUE_UNCOMPRESSED = 1;
79      public static final int COMPRESSION_VALUE_CCITT_1D = 2;
80      public static final int COMPRESSION_VALUE_T4_GROUP_3_FAX = 3;
81      public static final int COMPRESSION_VALUE_T6_GROUP_4_FAX = 4;
82      public static final int COMPRESSION_VALUE_LZW = 5;
83      public static final int COMPRESSION_VALUE_JPEG_OLD_STYLE = 6;
84      public static final int COMPRESSION_VALUE_JPEG = 7;
85      public static final int COMPRESSION_VALUE_ADOBE_DEFLATE = 8;
86      public static final int COMPRESSION_VALUE_JBIG_B_AND_W = 9;
87      public static final int COMPRESSION_VALUE_JBIG_COLOR = 10;
88      public static final int COMPRESSION_VALUE_NEXT = 32766;
89      public static final int COMPRESSION_VALUE_EPSON_ERF_COMPRESSED = 32769;
90      public static final int COMPRESSION_VALUE_CCIRLEW = 32771;
91      public static final int COMPRESSION_VALUE_PACK_BITS = 32773;
92      public static final int COMPRESSION_VALUE_THUNDERSCAN = 32809;
93      public static final int COMPRESSION_VALUE_IT8CTPAD = 32895;
94      public static final int COMPRESSION_VALUE_IT8LW = 32896;
95      public static final int COMPRESSION_VALUE_IT8MP = 32897;
96      public static final int COMPRESSION_VALUE_IT8BL = 32898;
97      public static final int COMPRESSION_VALUE_PIXAR_FILM = 32908;
98      public static final int COMPRESSION_VALUE_PIXAR_LOG = 32909;
99      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 
292     public static final TagInfoRationals TIFF_TAG_WHITE_POINT = new TagInfoRationals(
293             "WhitePoint", 0x13E, 2,
294             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
295 
296     public static final TagInfoRationals TIFF_TAG_PRIMARY_CHROMATICITIES = new TagInfoRationals(
297             "PrimaryChromaticities", 0x13F, 6,
298             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
299 
300     public static final TagInfoShorts TIFF_TAG_COLOR_MAP = new TagInfoShorts(
301             "ColorMap", 0x140, -1,
302             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
303 
304     public static final TagInfoShorts TIFF_TAG_HALFTONE_HINTS = new TagInfoShorts(
305             "HalftoneHints", 0x141, 2,
306             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
307 
308     public static final TagInfoShortOrLong TIFF_TAG_TILE_WIDTH = new TagInfoShortOrLong(
309             "TileWidth", 0x142, 1,
310             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
311 
312     public static final TagInfoShortOrLong TIFF_TAG_TILE_LENGTH = new TagInfoShortOrLong(
313             "TileLength", 0x143, 1,
314             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
315 
316     public static final TagInfoLongs TIFF_TAG_TILE_OFFSETS = new TagInfoLongs(
317             "TileOffsets", 0x144, -1,
318             TiffDirectoryType.TIFF_DIRECTORY_ROOT, true);
319 
320     public static final TagInfoShortOrLong TIFF_TAG_TILE_BYTE_COUNTS = new TagInfoShortOrLong(
321             "TileByteCounts", 0x145, -1,
322             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
323 
324     public static final TagInfoShort TIFF_TAG_INK_SET = new TagInfoShort(
325             "InkSet", 0x14C,
326             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
327     public static final int INK_SET_VALUE_CMYK = 1;
328     public static final int INK_SET_VALUE_NOT_CMYK = 2;
329 
330     public static final TagInfoAscii TIFF_TAG_INK_NAMES = new TagInfoAscii(
331             "InkNames", 0x14D, -1,
332             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
333 
334     public static final TagInfoShort TIFF_TAG_NUMBER_OF_INKS = new TagInfoShort(
335             "NumberOfInks", 0x14E,
336             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
337 
338     public static final TagInfoByteOrShort TIFF_TAG_DOT_RANGE = new TagInfoByteOrShort(
339             "DotRange", 0x150, -1,
340             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
341 
342     public static final TagInfoAscii TIFF_TAG_TARGET_PRINTER = new TagInfoAscii(
343             "TargetPrinter", 0x151, -1,
344             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
345 
346     public static final TagInfoShorts TIFF_TAG_EXTRA_SAMPLES = new TagInfoShorts(
347             "ExtraSamples", 0x152, -1,
348             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
349 
350     public static final TagInfoShorts TIFF_TAG_SAMPLE_FORMAT = new TagInfoShorts(
351             "SampleFormat", 0x153, -1,
352             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
353     public static final int SAMPLE_FORMAT_VALUE_UNSIGNED_INTEGER = 1;
354     public static final int SAMPLE_FORMAT_VALUE_TWOS_COMPLEMENT_SIGNED_INTEGER = 2;
355     public static final int SAMPLE_FORMAT_VALUE_IEEE_FLOATING_POINT = 3;
356     public static final int SAMPLE_FORMAT_VALUE_UNDEFINED = 4;
357     public static final int SAMPLE_FORMAT_VALUE_COMPLEX_INTEGER = 5;
358     public static final int SAMPLE_FORMAT_VALUE_IEEE_FLOATING_POINT_1 = 6;
359 
360     public static final TagInfoAny TIFF_TAG_SMIN_SAMPLE_VALUE = new TagInfoAny(
361             "SMinSampleValue", 0x154, -1,
362             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
363 
364     public static final TagInfoAny TIFF_TAG_SMAX_SAMPLE_VALUE = new TagInfoAny(
365             "SMaxSampleValue", 0x155, -1,
366             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
367 
368     public static final TagInfoShorts TIFF_TAG_TRANSFER_RANGE = new TagInfoShorts(
369             "TransferRange", 0x156, 6,
370             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
371 
372     public static final TagInfoShort TIFF_TAG_JPEG_PROC = new TagInfoShort(
373             "JPEGProc", 0x200,
374             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
375     public static final int JPEGPROC_VALUE_BASELINE = 1;
376     public static final int JPEGPROC_VALUE_LOSSLESS = 14;
377 
378     public static final TagInfoLong TIFF_TAG_JPEG_INTERCHANGE_FORMAT = new TagInfoLong(
379             "JPEGInterchangeFormat", 0x201,
380             TiffDirectoryType.TIFF_DIRECTORY_ROOT, true);
381 
382     public static final TagInfoLong TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = new TagInfoLong(
383             "JPEGInterchangeFormatLength", 0x202,
384             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
385 
386     public static final TagInfoShort TIFF_TAG_JPEG_RESTART_INTERVAL = new TagInfoShort(
387             "JPEGRestartInterval", 0x203,
388             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
389 
390     public static final TagInfoShorts TIFF_TAG_JPEG_LOSSLESS_PREDICTORS = new TagInfoShorts(
391             "JPEGLosslessPredictors", 0x205, -1,
392             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
393 
394     public static final TagInfoShorts TIFF_TAG_JPEG_POINT_TRANSFORMS = new TagInfoShorts(
395             "JPEGPointTransforms", 0x206, -1,
396             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
397 
398     public static final TagInfoLongs TIFF_TAG_JPEG_QTABLES = new TagInfoLongs(
399             "JPEGQTables", 0x207, -1,
400             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
401 
402     public static final TagInfoLongs TIFF_TAG_JPEG_DCTABLES = new TagInfoLongs(
403             "JPEGDCTables", 0x208, -1,
404             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
405 
406     public static final TagInfoLongs TIFF_TAG_JPEG_ACTABLES = new TagInfoLongs(
407             "JPEGACTables", 0x209, -1,
408             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
409 
410     public static final TagInfoRationals TIFF_TAG_YCBCR_COEFFICIENTS = new TagInfoRationals(
411             "YCbCrCoefficients", 0x211, 3,
412             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
413 
414     public static final TagInfoShorts TIFF_TAG_YCBCR_SUB_SAMPLING = new TagInfoShorts(
415             "YCbCrSubSampling", 0x212, 2,
416             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
417 
418     public static final TagInfoShort TIFF_TAG_YCBCR_POSITIONING = new TagInfoShort(
419             "YCbCrPositioning", 0x213,
420             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
421     public static final int YCB_CR_POSITIONING_VALUE_CENTERED = 1;
422     public static final int YCB_CR_POSITIONING_VALUE_CO_SITED = 2;
423 
424     public static final TagInfoLongs TIFF_TAG_REFERENCE_BLACK_WHITE = new TagInfoLongs(
425             "ReferenceBlackWhite", 0x214, -1,
426             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
427 
428     public static final TagInfoAscii TIFF_TAG_COPYRIGHT = new TagInfoAscii(
429             "Copyright", 0x8298, -1,
430             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
431 
432     public static final TagInfoBytes TIFF_TAG_XMP = new TagInfoBytes(
433             "XMP", 0x2BC, -1,
434             TiffDirectoryType.TIFF_DIRECTORY_ROOT);
435 
436     // TODO:
437     //    public static final TagInfo2 TIFF_TAG_UNKNOWN = null;
438     public static final TagInfoUnknowns TIFF_TAG_UNKNOWN = new TagInfoUnknowns(
439             "Unknown Tag", -1, TagInfo.LENGTH_UNKNOWN,
440             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
441 
442     public static final List<TagInfo> ALL_TIFF_TAGS =
443             Collections.unmodifiableList(Arrays.asList(
444                     TIFF_TAG_NEW_SUBFILE_TYPE, TIFF_TAG_SUBFILE_TYPE,
445                     TIFF_TAG_IMAGE_WIDTH, TIFF_TAG_IMAGE_LENGTH,
446                     TIFF_TAG_BITS_PER_SAMPLE, TIFF_TAG_COMPRESSION,
447                     TIFF_TAG_PHOTOMETRIC_INTERPRETATION, TIFF_TAG_THRESHHOLDING,
448                     TIFF_TAG_CELL_WIDTH, TIFF_TAG_CELL_LENGTH, TIFF_TAG_FILL_ORDER,
449                     TIFF_TAG_DOCUMENT_NAME, TIFF_TAG_IMAGE_DESCRIPTION, TIFF_TAG_MAKE,
450                     TIFF_TAG_MODEL, TIFF_TAG_STRIP_OFFSETS, TIFF_TAG_ORIENTATION,
451                     TIFF_TAG_SAMPLES_PER_PIXEL, TIFF_TAG_ROWS_PER_STRIP,
452                     TIFF_TAG_STRIP_BYTE_COUNTS, TIFF_TAG_MIN_SAMPLE_VALUE,
453                     TIFF_TAG_MAX_SAMPLE_VALUE, TIFF_TAG_XRESOLUTION,
454                     TIFF_TAG_YRESOLUTION, TIFF_TAG_PLANAR_CONFIGURATION,
455                     TIFF_TAG_PAGE_NAME, TIFF_TAG_XPOSITION, TIFF_TAG_YPOSITION,
456                     TIFF_TAG_FREE_OFFSETS, TIFF_TAG_FREE_BYTE_COUNTS,
457                     TIFF_TAG_GRAY_RESPONSE_UNIT, TIFF_TAG_GRAY_RESPONSE_CURVE,
458                     TIFF_TAG_T4_OPTIONS, TIFF_TAG_T6_OPTIONS, TIFF_TAG_RESOLUTION_UNIT,
459                     TIFF_TAG_PAGE_NUMBER, TIFF_TAG_TRANSFER_FUNCTION,
460                     TIFF_TAG_SOFTWARE, TIFF_TAG_DATE_TIME, TIFF_TAG_ARTIST,
461                     TIFF_TAG_HOST_COMPUTER, TIFF_TAG_PREDICTOR, TIFF_TAG_WHITE_POINT,
462                     TIFF_TAG_PRIMARY_CHROMATICITIES, TIFF_TAG_COLOR_MAP,
463                     TIFF_TAG_HALFTONE_HINTS, TIFF_TAG_TILE_WIDTH, TIFF_TAG_TILE_LENGTH,
464                     TIFF_TAG_TILE_OFFSETS, TIFF_TAG_TILE_BYTE_COUNTS, TIFF_TAG_INK_SET,
465                     TIFF_TAG_INK_NAMES, TIFF_TAG_NUMBER_OF_INKS, TIFF_TAG_DOT_RANGE,
466                     TIFF_TAG_TARGET_PRINTER, TIFF_TAG_EXTRA_SAMPLES,
467                     TIFF_TAG_SAMPLE_FORMAT, TIFF_TAG_SMIN_SAMPLE_VALUE,
468                     TIFF_TAG_SMAX_SAMPLE_VALUE, TIFF_TAG_TRANSFER_RANGE,
469                     TIFF_TAG_JPEG_PROC, TIFF_TAG_JPEG_INTERCHANGE_FORMAT,
470                     TIFF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH,
471                     TIFF_TAG_JPEG_RESTART_INTERVAL, TIFF_TAG_JPEG_LOSSLESS_PREDICTORS,
472                     TIFF_TAG_JPEG_POINT_TRANSFORMS, TIFF_TAG_JPEG_QTABLES,
473                     TIFF_TAG_JPEG_DCTABLES, TIFF_TAG_JPEG_ACTABLES,
474                     TIFF_TAG_YCBCR_COEFFICIENTS, TIFF_TAG_YCBCR_SUB_SAMPLING,
475                     TIFF_TAG_YCBCR_POSITIONING, TIFF_TAG_REFERENCE_BLACK_WHITE,
476                     TIFF_TAG_COPYRIGHT,
477                     TIFF_TAG_XMP));
478 
479     private TiffTagConstants() {
480     }
481 }