Added support for IFD (13) datatype, intruduced in "Adobe PageMaker TIFF

Tech. Notes".
This commit is contained in:
Andrey Kiselev 2003-11-16 19:26:29 +00:00
parent b2106d858d
commit c97721ddd1
2 changed files with 5 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.21 2003-06-30 18:22:28 dron Exp $ */
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.22 2003-11-16 19:26:29 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -140,10 +140,8 @@ const TIFFFieldInfo tiffFieldInfo[] = {
TRUE, FALSE, "PageNumber" },
{ TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, FIELD_IGNORE,
TRUE, FALSE, "ColorResponseUnit" },
#ifdef COLORIMETRY_SUPPORT
{ TIFFTAG_TRANSFERFUNCTION, -1,-1, TIFF_SHORT, FIELD_TRANSFERFUNCTION,
TRUE, FALSE, "TransferFunction" },
#endif
{ TIFFTAG_SOFTWARE, -1,-1, TIFF_ASCII, FIELD_CUSTOM,
TRUE, FALSE, "Software" },
{ TIFFTAG_DATETIME, 20,20, TIFF_ASCII, FIELD_DATETIME,
@ -152,12 +150,10 @@ const TIFFFieldInfo tiffFieldInfo[] = {
TRUE, FALSE, "Artist" },
{ TIFFTAG_HOSTCOMPUTER, -1,-1, TIFF_ASCII, FIELD_HOSTCOMPUTER,
TRUE, FALSE, "HostComputer" },
#ifdef COLORIMETRY_SUPPORT
{ TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL,FIELD_WHITEPOINT,
TRUE, FALSE, "WhitePoint" },
{ TIFFTAG_PRIMARYCHROMATICITIES,6,6,TIFF_RATIONAL,FIELD_PRIMARYCHROMAS,
TRUE, FALSE, "PrimaryChromaticities" },
#endif
{ TIFFTAG_COLORMAP, -1,-1, TIFF_SHORT, FIELD_COLORMAP,
TRUE, FALSE, "ColorMap" },
{ TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, FIELD_HALFTONEHINTS,
@ -176,11 +172,8 @@ const TIFFFieldInfo tiffFieldInfo[] = {
FALSE, FALSE, "TileByteCounts" },
{ TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_SHORT, FIELD_STRIPBYTECOUNTS,
FALSE, FALSE, "TileByteCounts" },
#ifdef TIFFTAG_SUBIFD
{ TIFFTAG_SUBIFD, -1,-1, TIFF_LONG, FIELD_SUBIFD,
TRUE, TRUE, "SubIFD" },
#endif
#ifdef CMYK_SUPPORT /* 6.0 CMYK tags */
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, FIELD_INKSET,
FALSE, FALSE, "InkSet" },
{ TIFFTAG_INKNAMES, -1,-1, TIFF_ASCII, FIELD_INKNAMES,
@ -193,7 +186,6 @@ const TIFFFieldInfo tiffFieldInfo[] = {
FALSE, FALSE, "DotRange" },
{ TIFFTAG_TARGETPRINTER, -1,-1, TIFF_ASCII, FIELD_TARGETPRINTER,
TRUE, FALSE, "TargetPrinter" },
#endif
{ TIFFTAG_EXTRASAMPLES, -1,-1, TIFF_SHORT, FIELD_EXTRASAMPLES,
FALSE, FALSE, "ExtraSamples" },
/* XXX for bogus Adobe Photoshop v2.5 files */
@ -205,21 +197,17 @@ const TIFFFieldInfo tiffFieldInfo[] = {
TRUE, FALSE, "SMinSampleValue" },
{ TIFFTAG_SMAXSAMPLEVALUE, -2,-1, TIFF_ANY, FIELD_SMAXSAMPLEVALUE,
TRUE, FALSE, "SMaxSampleValue" },
#ifdef YCBCR_SUPPORT /* 6.0 YCbCr tags */
{ TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, FIELD_YCBCRCOEFFICIENTS,
FALSE, FALSE, "YCbCrCoefficients" },
{ TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, FIELD_YCBCRSUBSAMPLING,
FALSE, FALSE, "YCbCrSubsampling" },
{ TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, FIELD_YCBCRPOSITIONING,
FALSE, FALSE, "YCbCrPositioning" },
#endif
#ifdef COLORIMETRY_SUPPORT
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_RATIONAL, FIELD_REFBLACKWHITE,
TRUE, FALSE, "ReferenceBlackWhite" },
/* XXX temporarily accept LONG for backwards compatibility */
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG, FIELD_REFBLACKWHITE,
TRUE, FALSE, "ReferenceBlackWhite" },
#endif
{ TIFFTAG_XMLPACKET, -1,-3, TIFF_UNDEFINED, FIELD_XMLPACKET,
FALSE, TRUE, "XMLPacket" },
/* begin SGI tags */
@ -263,14 +251,10 @@ const TIFFFieldInfo tiffFieldInfo[] = {
FALSE, TRUE, "RichTIFFIPTC" },
#endif
#endif
#ifdef PHOTOSHOP_SUPPORT
{ TIFFTAG_PHOTOSHOP, -1,-3, TIFF_BYTE, FIELD_PHOTOSHOP,
FALSE, TRUE, "Photoshop" },
#endif
#ifdef ICC_SUPPORT
{ TIFFTAG_ICCPROFILE, -1,-3, TIFF_UNDEFINED, FIELD_ICCPROFILE,
FALSE, TRUE, "ICC Profile" },
#endif
{ TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, FIELD_STONITS,
FALSE, FALSE, "StoNits" },
};
@ -375,6 +359,7 @@ TIFFDataWidth(TIFFDataType type)
case 4: /* TIFF_LONG */
case 9: /* TIFF_SLONG */
case 11: /* TIFF_FLOAT */
case 13: /* TIFF_IFD */
return 4;
case 5: /* TIFF_RATIONAL */
case 10: /* TIFF_SRATIONAL */

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tiff.h,v 1.15 2002-10-06 23:31:21 warmerda Exp $ */
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tiff.h,v 1.16 2003-11-16 19:26:29 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -148,7 +148,8 @@ typedef enum {
TIFF_SLONG = 9, /* !32-bit signed integer */
TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
TIFF_FLOAT = 11, /* !32-bit IEEE floating point */
TIFF_DOUBLE = 12 /* !64-bit IEEE floating point */
TIFF_DOUBLE = 12, /* !64-bit IEEE floating point */
TIFF_IFD = 13, /* %32-bit unsigned integer (offset) */
} TIFFDataType;
/*