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