1 /*
2  * Copyright 2003-2005 by Paulo Soares.
3  *
4  * This list of constants was originally released with libtiff
5  * under the following license:
6  *
7  * Copyright (c) 1988-1997 Sam Leffler
8  * Copyright (c) 1991-1997 Silicon Graphics, Inc.
9  *
10  * Permission to use, copy, modify, distribute, and sell this software and
11  * its documentation for any purpose is hereby granted without fee, provided
12  * that (i) the above copyright notices and this permission notice appear in
13  * all copies of the software and related documentation, and (ii) the names of
14  * Sam Leffler and Silicon Graphics may not be used in any advertising or
15  * publicity relating to the software without the specific, prior written
16  * permission of Sam Leffler and Silicon Graphics.
17  *
18  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
20  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
21  *
22  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
23  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
24  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
25  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
26  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
27  * OF THIS SOFTWARE.
28  */
29 package com.lowagie.text.pdf.codec;
30 
31 /**
32  * A list of constants used in class TIFFImage.
33  */
34 public class TIFFConstants {
35 
36 /*
37  * TIFF Tag Definitions (from tifflib).
38  */
39     public static final int TIFFTAG_SUBFILETYPE = 254;	/* subfile data descriptor */
40     public static final int     FILETYPE_REDUCEDIMAGE = 0x1;	/* reduced resolution version */
41     public static final int     FILETYPE_PAGE = 0x2;	/* one page of many */
42     public static final int     FILETYPE_MASK = 0x4;	/* transparency mask */
43     public static final int TIFFTAG_OSUBFILETYPE = 255; /* +kind of data in subfile */
44     public static final int     OFILETYPE_IMAGE = 1; /* full resolution image data */
45     public static final int     OFILETYPE_REDUCEDIMAGE = 2; /* reduced size image data */
46     public static final int     OFILETYPE_PAGE = 3; /* one page of many */
47     public static final int TIFFTAG_IMAGEWIDTH = 256; /* image width in pixels */
48     public static final int TIFFTAG_IMAGELENGTH = 257; /* image height in pixels */
49     public static final int TIFFTAG_BITSPERSAMPLE = 258; /* bits per channel (sample) */
50     public static final int TIFFTAG_COMPRESSION = 259; /* data compression technique */
51     public static final int     COMPRESSION_NONE = 1; /* dump mode */
52     public static final int     COMPRESSION_CCITTRLE = 2; /* CCITT modified Huffman RLE */
53     public static final int     COMPRESSION_CCITTFAX3 = 3;	/* CCITT Group 3 fax encoding */
54     public static final int     COMPRESSION_CCITTFAX4 = 4;	/* CCITT Group 4 fax encoding */
55     public static final int     COMPRESSION_LZW = 5;       /* Lempel-Ziv  & Welch */
56     public static final int     COMPRESSION_OJPEG = 6; /* !6.0 JPEG */
57     public static final int     COMPRESSION_JPEG = 7; /* %JPEG DCT compression */
58     public static final int     COMPRESSION_NEXT = 32766; /* NeXT 2-bit RLE */
59     public static final int     COMPRESSION_CCITTRLEW = 32771; /* #1 w/ word alignment */
60     public static final int     COMPRESSION_PACKBITS = 32773; /* Macintosh RLE */
61     public static final int     COMPRESSION_THUNDERSCAN = 32809; /* ThunderScan RLE */
62     /* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT <dkelly@etsinc.com) */
63     public static final int     COMPRESSION_IT8CTPAD = 32895;   /* IT8 CT w/padding */
64     public static final int     COMPRESSION_IT8LW = 32896;   /* IT8 Linework RLE */
65     public static final int     COMPRESSION_IT8MP = 32897;   /* IT8 Monochrome picture */
66     public static final int     COMPRESSION_IT8BL = 32898;   /* IT8 Binary line art */
67     /* compression codes 32908-32911 are reserved for Pixar */
68     public static final int     COMPRESSION_PIXARFILM = 32908;   /* Pixar companded 10bit LZW */
69     public static final int     COMPRESSION_PIXARLOG = 32909;   /* Pixar companded 11bit ZIP */
70     public static final int     COMPRESSION_DEFLATE = 32946; /* Deflate compression */
71     public static final int     COMPRESSION_ADOBE_DEFLATE = 8;       /* Deflate compression, as recognized by Adobe */
72     /* compression code 32947 is reserved for Oceana Matrix <dev@oceana.com> */
73     public static final int     COMPRESSION_DCS = 32947;   /* Kodak DCS encoding */
74     public static final int     COMPRESSION_JBIG = 34661; /* ISO JBIG */
75     public static final int     COMPRESSION_SGILOG = 34676; /* SGI Log Luminance RLE */
76     public static final int     COMPRESSION_SGILOG24 = 34677;	/* SGI Log 24-bit packed */
77     public static final int TIFFTAG_PHOTOMETRIC = 262; /* photometric interpretation */
78     public static final int     PHOTOMETRIC_MINISWHITE = 0; /* min value is white */
79     public static final int     PHOTOMETRIC_MINISBLACK = 1; /* min value is black */
80     public static final int     PHOTOMETRIC_RGB = 2; /* RGB color model */
81     public static final int     PHOTOMETRIC_PALETTE = 3; /* color map indexed */
82     public static final int     PHOTOMETRIC_MASK = 4; /* $holdout mask */
83     public static final int     PHOTOMETRIC_SEPARATED = 5; /* !color separations */
84     public static final int     PHOTOMETRIC_YCBCR = 6; /* !CCIR 601 */
85     public static final int     PHOTOMETRIC_CIELAB = 8; /* !1976 CIE L*a*b* */
86     public static final int     PHOTOMETRIC_LOGL = 32844; /* CIE Log2(L) */
87     public static final int     PHOTOMETRIC_LOGLUV = 32845; /* CIE Log2(L) (u',v') */
88     public static final int TIFFTAG_THRESHHOLDING = 263; /* +thresholding used on data */
89     public static final int     THRESHHOLD_BILEVEL = 1; /* b&w art scan */
90     public static final int     THRESHHOLD_HALFTONE = 2; /* or dithered scan */
91     public static final int     THRESHHOLD_ERRORDIFFUSE = 3; /* usually floyd-steinberg */
92     public static final int TIFFTAG_CELLWIDTH = 264; /* +dithering matrix width */
93     public static final int TIFFTAG_CELLLENGTH = 265; /* +dithering matrix height */
94     public static final int TIFFTAG_FILLORDER = 266; /* data order within a byte */
95     public static final int     FILLORDER_MSB2LSB = 1; /* most significant -> least */
96     public static final int     FILLORDER_LSB2MSB = 2; /* least significant -> most */
97     public static final int TIFFTAG_DOCUMENTNAME = 269; /* name of doc. image is from */
98     public static final int TIFFTAG_IMAGEDESCRIPTION = 270; /* info about image */
99     public static final int TIFFTAG_MAKE = 271; /* scanner manufacturer name */
100     public static final int TIFFTAG_MODEL = 272; /* scanner model name/number */
101     public static final int TIFFTAG_STRIPOFFSETS = 273; /* offsets to data strips */
102     public static final int TIFFTAG_ORIENTATION = 274; /* +image orientation */
103     public static final int     ORIENTATION_TOPLEFT = 1; /* row 0 top, col 0 lhs */
104     public static final int     ORIENTATION_TOPRIGHT = 2; /* row 0 top, col 0 rhs */
105     public static final int     ORIENTATION_BOTRIGHT = 3; /* row 0 bottom, col 0 rhs */
106     public static final int     ORIENTATION_BOTLEFT = 4; /* row 0 bottom, col 0 lhs */
107     public static final int     ORIENTATION_LEFTTOP = 5; /* row 0 lhs, col 0 top */
108     public static final int     ORIENTATION_RIGHTTOP = 6; /* row 0 rhs, col 0 top */
109     public static final int     ORIENTATION_RIGHTBOT = 7; /* row 0 rhs, col 0 bottom */
110     public static final int     ORIENTATION_LEFTBOT = 8; /* row 0 lhs, col 0 bottom */
111     public static final int TIFFTAG_SAMPLESPERPIXEL = 277; /* samples per pixel */
112     public static final int TIFFTAG_ROWSPERSTRIP = 278; /* rows per strip of data */
113     public static final int TIFFTAG_STRIPBYTECOUNTS = 279; /* bytes counts for strips */
114     public static final int TIFFTAG_MINSAMPLEVALUE = 280; /* +minimum sample value */
115     public static final int TIFFTAG_MAXSAMPLEVALUE = 281; /* +maximum sample value */
116     public static final int TIFFTAG_XRESOLUTION = 282; /* pixels/resolution in x */
117     public static final int TIFFTAG_YRESOLUTION = 283; /* pixels/resolution in y */
118     public static final int TIFFTAG_PLANARCONFIG = 284; /* storage organization */
119     public static final int     PLANARCONFIG_CONTIG = 1; /* single image plane */
120     public static final int     PLANARCONFIG_SEPARATE = 2; /* separate planes of data */
121     public static final int TIFFTAG_PAGENAME = 285; /* page name image is from */
122     public static final int TIFFTAG_XPOSITION = 286; /* x page offset of image lhs */
123     public static final int TIFFTAG_YPOSITION = 287; /* y page offset of image lhs */
124     public static final int TIFFTAG_FREEOFFSETS = 288; /* +byte offset to free block */
125     public static final int TIFFTAG_FREEBYTECOUNTS = 289; /* +sizes of free blocks */
126     public static final int TIFFTAG_GRAYRESPONSEUNIT = 290; /* $gray scale curve accuracy */
127     public static final int     GRAYRESPONSEUNIT_10S = 1; /* tenths of a unit */
128     public static final int     GRAYRESPONSEUNIT_100S = 2; /* hundredths of a unit */
129     public static final int     GRAYRESPONSEUNIT_1000S = 3; /* thousandths of a unit */
130     public static final int     GRAYRESPONSEUNIT_10000S = 4; /* ten-thousandths of a unit */
131     public static final int     GRAYRESPONSEUNIT_100000S = 5; /* hundred-thousandths */
132     public static final int TIFFTAG_GRAYRESPONSECURVE = 291; /* $gray scale response curve */
133     public static final int TIFFTAG_GROUP3OPTIONS = 292; /* 32 flag bits */
134     public static final int     GROUP3OPT_2DENCODING = 0x1;	/* 2-dimensional coding */
135     public static final int     GROUP3OPT_UNCOMPRESSED = 0x2;	/* data not compressed */
136     public static final int     GROUP3OPT_FILLBITS = 0x4;	/* fill to byte boundary */
137     public static final int TIFFTAG_GROUP4OPTIONS = 293; /* 32 flag bits */
138     public static final int     GROUP4OPT_UNCOMPRESSED = 0x2;	/* data not compressed */
139     public static final int TIFFTAG_RESOLUTIONUNIT = 296; /* units of resolutions */
140     public static final int     RESUNIT_NONE = 1; /* no meaningful units */
141     public static final int     RESUNIT_INCH = 2; /* english */
142     public static final int     RESUNIT_CENTIMETER = 3;	/* metric */
143     public static final int TIFFTAG_PAGENUMBER = 297;	/* page numbers of multi-page */
144     public static final int TIFFTAG_COLORRESPONSEUNIT = 300;	/* $color curve accuracy */
145     public static final int     COLORRESPONSEUNIT_10S = 1;	/* tenths of a unit */
146     public static final int     COLORRESPONSEUNIT_100S = 2;	/* hundredths of a unit */
147     public static final int     COLORRESPONSEUNIT_1000S = 3;	/* thousandths of a unit */
148     public static final int     COLORRESPONSEUNIT_10000S = 4;	/* ten-thousandths of a unit */
149     public static final int     COLORRESPONSEUNIT_100000S = 5;	/* hundred-thousandths */
150     public static final int TIFFTAG_TRANSFERFUNCTION = 301;	/* !colorimetry info */
151     public static final int TIFFTAG_SOFTWARE = 305;	/* name & release */
152     public static final int TIFFTAG_DATETIME = 306;	/* creation date and time */
153     public static final int TIFFTAG_ARTIST = 315;	/* creator of image */
154     public static final int TIFFTAG_HOSTCOMPUTER = 316;	/* machine where created */
155     public static final int TIFFTAG_PREDICTOR = 317;	/* prediction scheme w/ LZW */
156     public static final int TIFFTAG_WHITEPOINT = 318;	/* image white point */
157     public static final int TIFFTAG_PRIMARYCHROMATICITIES = 319;	/* !primary chromaticities */
158     public static final int TIFFTAG_COLORMAP = 320;	/* RGB map for pallette image */
159     public static final int TIFFTAG_HALFTONEHINTS = 321;	/* !highlight+shadow info */
160     public static final int TIFFTAG_TILEWIDTH = 322;	/* !rows/data tile */
161     public static final int TIFFTAG_TILELENGTH = 323;	/* !cols/data tile */
162     public static final int TIFFTAG_TILEOFFSETS = 324;	/* !offsets to data tiles */
163     public static final int TIFFTAG_TILEBYTECOUNTS = 325;	/* !byte counts for tiles */
164     public static final int TIFFTAG_BADFAXLINES = 326;	/* lines w/ wrong pixel count */
165     public static final int TIFFTAG_CLEANFAXDATA = 327;	/* regenerated line info */
166     public static final int     CLEANFAXDATA_CLEAN = 0;	/* no errors detected */
167     public static final int     CLEANFAXDATA_REGENERATED = 1;	/* receiver regenerated lines */
168     public static final int     CLEANFAXDATA_UNCLEAN = 2;	/* uncorrected errors exist */
169     public static final int TIFFTAG_CONSECUTIVEBADFAXLINES = 328;	/* max consecutive bad lines */
170     public static final int TIFFTAG_SUBIFD = 330;	/* subimage descriptors */
171     public static final int TIFFTAG_INKSET = 332;	/* !inks in separated image */
172     public static final int     INKSET_CMYK = 1;	/* !cyan-magenta-yellow-black */
173     public static final int TIFFTAG_INKNAMES = 333;	/* !ascii names of inks */
174     public static final int TIFFTAG_NUMBEROFINKS = 334;	/* !number of inks */
175     public static final int TIFFTAG_DOTRANGE = 336;	/* !0% and 100% dot codes */
176     public static final int TIFFTAG_TARGETPRINTER = 337;	/* !separation target */
177     public static final int TIFFTAG_EXTRASAMPLES = 338;	/* !info about extra samples */
178     public static final int     EXTRASAMPLE_UNSPECIFIED = 0;	/* !unspecified data */
179     public static final int     EXTRASAMPLE_ASSOCALPHA = 1;	/* !associated alpha data */
180     public static final int     EXTRASAMPLE_UNASSALPHA = 2;	/* !unassociated alpha data */
181     public static final int TIFFTAG_SAMPLEFORMAT = 339;	/* !data sample format */
182     public static final int     SAMPLEFORMAT_UINT = 1;	/* !unsigned integer data */
183     public static final int     SAMPLEFORMAT_INT = 2;	/* !signed integer data */
184     public static final int     SAMPLEFORMAT_IEEEFP = 3;	/* !IEEE floating point data */
185     public static final int     SAMPLEFORMAT_VOID = 4;	/* !untyped data */
186     public static final int     SAMPLEFORMAT_COMPLEXINT = 5;	/* !complex signed int */
187     public static final int     SAMPLEFORMAT_COMPLEXIEEEFP = 6;	/* !complex ieee floating */
188     public static final int TIFFTAG_SMINSAMPLEVALUE = 340;	/* !variable MinSampleValue */
189     public static final int TIFFTAG_SMAXSAMPLEVALUE = 341;	/* !variable MaxSampleValue */
190     public static final int TIFFTAG_JPEGTABLES = 347;	/* %JPEG table stream */
191 /*
192  * Tags 512-521 are obsoleted by Technical Note #2
193  * which specifies a revised JPEG-in-TIFF scheme.
194  */
195     public static final int TIFFTAG_JPEGPROC = 512;	/* !JPEG processing algorithm */
196     public static final int     JPEGPROC_BASELINE = 1;	/* !baseline sequential */
197     public static final int     JPEGPROC_LOSSLESS = 14;	/* !Huffman coded lossless */
198     public static final int TIFFTAG_JPEGIFOFFSET = 513;	/* !pointer to SOI marker */
199     public static final int TIFFTAG_JPEGIFBYTECOUNT = 514;	/* !JFIF stream length */
200     public static final int TIFFTAG_JPEGRESTARTINTERVAL = 515;	/* !restart interval length */
201     public static final int TIFFTAG_JPEGLOSSLESSPREDICTORS = 517;	/* !lossless proc predictor */
202     public static final int TIFFTAG_JPEGPOINTTRANSFORM = 518;	/* !lossless point transform */
203     public static final int TIFFTAG_JPEGQTABLES = 519;	/* !Q matrice offsets */
204     public static final int TIFFTAG_JPEGDCTABLES = 520;	/* !DCT table offsets */
205     public static final int TIFFTAG_JPEGACTABLES = 521;	/* !AC coefficient offsets */
206     public static final int TIFFTAG_YCBCRCOEFFICIENTS = 529;	/* !RGB -> YCbCr transform */
207     public static final int TIFFTAG_YCBCRSUBSAMPLING = 530;	/* !YCbCr subsampling factors */
208     public static final int TIFFTAG_YCBCRPOSITIONING = 531;	/* !subsample positioning */
209     public static final int     YCBCRPOSITION_CENTERED = 1;	/* !as in PostScript Level 2 */
210     public static final int     YCBCRPOSITION_COSITED = 2;	/* !as in CCIR 601-1 */
211     public static final int TIFFTAG_REFERENCEBLACKWHITE = 532;	/* !colorimetry info */
212     /* tags 32952-32956 are private tags registered to Island Graphics */
213     public static final int TIFFTAG_REFPTS = 32953;	/* image reference points */
214     public static final int TIFFTAG_REGIONTACKPOINT = 32954;	/* region-xform tack point */
215     public static final int TIFFTAG_REGIONWARPCORNERS = 32955;	/* warp quadrilateral */
216     public static final int TIFFTAG_REGIONAFFINE = 32956;	/* affine transformation mat */
217     /* tags 32995-32999 are private tags registered to SGI */
218     public static final int TIFFTAG_MATTEING = 32995;	/* $use ExtraSamples */
219     public static final int TIFFTAG_DATATYPE = 32996;	/* $use SampleFormat */
220     public static final int TIFFTAG_IMAGEDEPTH = 32997;	/* z depth of image */
221     public static final int TIFFTAG_TILEDEPTH = 32998;	/* z depth/data tile */
222     /* tags 33300-33309 are private tags registered to Pixar */
223 /*
224  * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH
225  * are set when an image has been cropped out of a larger image.
226  * They reflect the size of the original uncropped image.
227  * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used
228  * to determine the position of the smaller image in the larger one.
229  */
230     public static final int TIFFTAG_PIXAR_IMAGEFULLWIDTH = 33300;   /* full image size in x */
231     public static final int TIFFTAG_PIXAR_IMAGEFULLLENGTH = 33301;   /* full image size in y */
232  /* Tags 33302-33306 are used to identify special image modes and data
233   * used by Pixar's texture formats.
234   */
235     public static final int TIFFTAG_PIXAR_TEXTUREFORMAT = 33302;	/* texture map format */
236     public static final int TIFFTAG_PIXAR_WRAPMODES = 33303;	/* s & t wrap modes */
237     public static final int TIFFTAG_PIXAR_FOVCOT = 33304;	/* cotan(fov) for env. maps */
238     public static final int TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN = 33305;
239     public static final int TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA = 33306;
240     /* tag 33405 is a private tag registered to Eastman Kodak */
241     public static final int TIFFTAG_WRITERSERIALNUMBER = 33405;   /* device serial number */
242     /* tag 33432 is listed in the 6.0 spec w/ unknown ownership */
243     public static final int TIFFTAG_COPYRIGHT = 33432;	/* copyright string */
244     /* IPTC TAG from RichTIFF specifications */
245     public static final int TIFFTAG_RICHTIFFIPTC = 33723;
246     /* 34016-34029 are reserved for ANSI IT8 TIFF/IT <dkelly@etsinc.com) */
247     public static final int TIFFTAG_IT8SITE = 34016;	/* site name */
248     public static final int TIFFTAG_IT8COLORSEQUENCE = 34017;	/* color seq. [RGB,CMYK,etc] */
249     public static final int TIFFTAG_IT8HEADER = 34018;	/* DDES Header */
250     public static final int TIFFTAG_IT8RASTERPADDING = 34019;	/* raster scanline padding */
251     public static final int TIFFTAG_IT8BITSPERRUNLENGTH = 34020;	/* # of bits in short run */
252     public static final int TIFFTAG_IT8BITSPEREXTENDEDRUNLENGTH = 34021;/* # of bits in long run */
253     public static final int TIFFTAG_IT8COLORTABLE = 34022;	/* LW colortable */
254     public static final int TIFFTAG_IT8IMAGECOLORINDICATOR = 34023;	/* BP/BL image color switch */
255     public static final int TIFFTAG_IT8BKGCOLORINDICATOR = 34024;	/* BP/BL bg color switch */
256     public static final int TIFFTAG_IT8IMAGECOLORVALUE = 34025;	/* BP/BL image color value */
257     public static final int TIFFTAG_IT8BKGCOLORVALUE = 34026;	/* BP/BL bg color value */
258     public static final int TIFFTAG_IT8PIXELINTENSITYRANGE = 34027;	/* MP pixel intensity value */
259     public static final int TIFFTAG_IT8TRANSPARENCYINDICATOR = 34028;	/* HC transparency switch */
260     public static final int TIFFTAG_IT8COLORCHARACTERIZATION = 34029;	/* color character. table */
261     /* tags 34232-34236 are private tags registered to Texas Instruments */
262     public static final int TIFFTAG_FRAMECOUNT = 34232;   /* Sequence Frame Count */
263     /* tag 34750 is a private tag registered to Adobe? */
264     public static final int TIFFTAG_ICCPROFILE = 34675;	/* ICC profile data */
265     /* tag 34377 is private tag registered to Adobe for PhotoShop */
266     public static final int TIFFTAG_PHOTOSHOP = 34377;
267     /* tag 34750 is a private tag registered to Pixel Magic */
268     public static final int TIFFTAG_JBIGOPTIONS = 34750;	/* JBIG options */
269     /* tags 34908-34914 are private tags registered to SGI */
270     public static final int TIFFTAG_FAXRECVPARAMS = 34908;	/* encoded Class 2 ses. parms */
271     public static final int TIFFTAG_FAXSUBADDRESS = 34909;	/* received SubAddr string */
272     public static final int TIFFTAG_FAXRECVTIME = 34910;	/* receive time (secs) */
273     /* tags 37439-37443 are registered to SGI <gregl@sgi.com> */
274     public static final int TIFFTAG_STONITS = 37439;	/* Sample value to Nits */
275     /* tag 34929 is a private tag registered to FedEx */
276     public static final int TIFFTAG_FEDEX_EDR = 34929;	/* unknown use */
277     /* tag 65535 is an undefined tag used by Eastman Kodak */
278     public static final int TIFFTAG_DCSHUESHIFTVALUES = 65535;   /* hue shift correction data */
279 
280 }
281