Added support for IFD (13) datatype, intruduced in "Adobe PageMaker TIFF
Tech. Notes".
This commit is contained in:
parent
b2106d858d
commit
c97721ddd1
@ -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
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -140,10 +140,8 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
TRUE, FALSE, "PageNumber" },
|
TRUE, FALSE, "PageNumber" },
|
||||||
{ TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, FIELD_IGNORE,
|
{ TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT, FIELD_IGNORE,
|
||||||
TRUE, FALSE, "ColorResponseUnit" },
|
TRUE, FALSE, "ColorResponseUnit" },
|
||||||
#ifdef COLORIMETRY_SUPPORT
|
|
||||||
{ TIFFTAG_TRANSFERFUNCTION, -1,-1, TIFF_SHORT, FIELD_TRANSFERFUNCTION,
|
{ TIFFTAG_TRANSFERFUNCTION, -1,-1, TIFF_SHORT, FIELD_TRANSFERFUNCTION,
|
||||||
TRUE, FALSE, "TransferFunction" },
|
TRUE, FALSE, "TransferFunction" },
|
||||||
#endif
|
|
||||||
{ TIFFTAG_SOFTWARE, -1,-1, TIFF_ASCII, FIELD_CUSTOM,
|
{ TIFFTAG_SOFTWARE, -1,-1, TIFF_ASCII, FIELD_CUSTOM,
|
||||||
TRUE, FALSE, "Software" },
|
TRUE, FALSE, "Software" },
|
||||||
{ TIFFTAG_DATETIME, 20,20, TIFF_ASCII, FIELD_DATETIME,
|
{ TIFFTAG_DATETIME, 20,20, TIFF_ASCII, FIELD_DATETIME,
|
||||||
@ -152,12 +150,10 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
TRUE, FALSE, "Artist" },
|
TRUE, FALSE, "Artist" },
|
||||||
{ TIFFTAG_HOSTCOMPUTER, -1,-1, TIFF_ASCII, FIELD_HOSTCOMPUTER,
|
{ TIFFTAG_HOSTCOMPUTER, -1,-1, TIFF_ASCII, FIELD_HOSTCOMPUTER,
|
||||||
TRUE, FALSE, "HostComputer" },
|
TRUE, FALSE, "HostComputer" },
|
||||||
#ifdef COLORIMETRY_SUPPORT
|
|
||||||
{ TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL,FIELD_WHITEPOINT,
|
{ TIFFTAG_WHITEPOINT, 2, 2, TIFF_RATIONAL,FIELD_WHITEPOINT,
|
||||||
TRUE, FALSE, "WhitePoint" },
|
TRUE, FALSE, "WhitePoint" },
|
||||||
{ TIFFTAG_PRIMARYCHROMATICITIES,6,6,TIFF_RATIONAL,FIELD_PRIMARYCHROMAS,
|
{ TIFFTAG_PRIMARYCHROMATICITIES,6,6,TIFF_RATIONAL,FIELD_PRIMARYCHROMAS,
|
||||||
TRUE, FALSE, "PrimaryChromaticities" },
|
TRUE, FALSE, "PrimaryChromaticities" },
|
||||||
#endif
|
|
||||||
{ TIFFTAG_COLORMAP, -1,-1, TIFF_SHORT, FIELD_COLORMAP,
|
{ TIFFTAG_COLORMAP, -1,-1, TIFF_SHORT, FIELD_COLORMAP,
|
||||||
TRUE, FALSE, "ColorMap" },
|
TRUE, FALSE, "ColorMap" },
|
||||||
{ TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, FIELD_HALFTONEHINTS,
|
{ TIFFTAG_HALFTONEHINTS, 2, 2, TIFF_SHORT, FIELD_HALFTONEHINTS,
|
||||||
@ -176,11 +172,8 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
FALSE, FALSE, "TileByteCounts" },
|
FALSE, FALSE, "TileByteCounts" },
|
||||||
{ TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_SHORT, FIELD_STRIPBYTECOUNTS,
|
{ TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_SHORT, FIELD_STRIPBYTECOUNTS,
|
||||||
FALSE, FALSE, "TileByteCounts" },
|
FALSE, FALSE, "TileByteCounts" },
|
||||||
#ifdef TIFFTAG_SUBIFD
|
|
||||||
{ TIFFTAG_SUBIFD, -1,-1, TIFF_LONG, FIELD_SUBIFD,
|
{ TIFFTAG_SUBIFD, -1,-1, TIFF_LONG, FIELD_SUBIFD,
|
||||||
TRUE, TRUE, "SubIFD" },
|
TRUE, TRUE, "SubIFD" },
|
||||||
#endif
|
|
||||||
#ifdef CMYK_SUPPORT /* 6.0 CMYK tags */
|
|
||||||
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, FIELD_INKSET,
|
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, FIELD_INKSET,
|
||||||
FALSE, FALSE, "InkSet" },
|
FALSE, FALSE, "InkSet" },
|
||||||
{ TIFFTAG_INKNAMES, -1,-1, TIFF_ASCII, FIELD_INKNAMES,
|
{ TIFFTAG_INKNAMES, -1,-1, TIFF_ASCII, FIELD_INKNAMES,
|
||||||
@ -193,7 +186,6 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
FALSE, FALSE, "DotRange" },
|
FALSE, FALSE, "DotRange" },
|
||||||
{ TIFFTAG_TARGETPRINTER, -1,-1, TIFF_ASCII, FIELD_TARGETPRINTER,
|
{ TIFFTAG_TARGETPRINTER, -1,-1, TIFF_ASCII, FIELD_TARGETPRINTER,
|
||||||
TRUE, FALSE, "TargetPrinter" },
|
TRUE, FALSE, "TargetPrinter" },
|
||||||
#endif
|
|
||||||
{ TIFFTAG_EXTRASAMPLES, -1,-1, TIFF_SHORT, FIELD_EXTRASAMPLES,
|
{ TIFFTAG_EXTRASAMPLES, -1,-1, TIFF_SHORT, FIELD_EXTRASAMPLES,
|
||||||
FALSE, FALSE, "ExtraSamples" },
|
FALSE, FALSE, "ExtraSamples" },
|
||||||
/* XXX for bogus Adobe Photoshop v2.5 files */
|
/* XXX for bogus Adobe Photoshop v2.5 files */
|
||||||
@ -205,21 +197,17 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
TRUE, FALSE, "SMinSampleValue" },
|
TRUE, FALSE, "SMinSampleValue" },
|
||||||
{ TIFFTAG_SMAXSAMPLEVALUE, -2,-1, TIFF_ANY, FIELD_SMAXSAMPLEVALUE,
|
{ TIFFTAG_SMAXSAMPLEVALUE, -2,-1, TIFF_ANY, FIELD_SMAXSAMPLEVALUE,
|
||||||
TRUE, FALSE, "SMaxSampleValue" },
|
TRUE, FALSE, "SMaxSampleValue" },
|
||||||
#ifdef YCBCR_SUPPORT /* 6.0 YCbCr tags */
|
|
||||||
{ TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, FIELD_YCBCRCOEFFICIENTS,
|
{ TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL, FIELD_YCBCRCOEFFICIENTS,
|
||||||
FALSE, FALSE, "YCbCrCoefficients" },
|
FALSE, FALSE, "YCbCrCoefficients" },
|
||||||
{ TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, FIELD_YCBCRSUBSAMPLING,
|
{ TIFFTAG_YCBCRSUBSAMPLING, 2, 2, TIFF_SHORT, FIELD_YCBCRSUBSAMPLING,
|
||||||
FALSE, FALSE, "YCbCrSubsampling" },
|
FALSE, FALSE, "YCbCrSubsampling" },
|
||||||
{ TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, FIELD_YCBCRPOSITIONING,
|
{ TIFFTAG_YCBCRPOSITIONING, 1, 1, TIFF_SHORT, FIELD_YCBCRPOSITIONING,
|
||||||
FALSE, FALSE, "YCbCrPositioning" },
|
FALSE, FALSE, "YCbCrPositioning" },
|
||||||
#endif
|
|
||||||
#ifdef COLORIMETRY_SUPPORT
|
|
||||||
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_RATIONAL, FIELD_REFBLACKWHITE,
|
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_RATIONAL, FIELD_REFBLACKWHITE,
|
||||||
TRUE, FALSE, "ReferenceBlackWhite" },
|
TRUE, FALSE, "ReferenceBlackWhite" },
|
||||||
/* XXX temporarily accept LONG for backwards compatibility */
|
/* XXX temporarily accept LONG for backwards compatibility */
|
||||||
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG, FIELD_REFBLACKWHITE,
|
{ TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG, FIELD_REFBLACKWHITE,
|
||||||
TRUE, FALSE, "ReferenceBlackWhite" },
|
TRUE, FALSE, "ReferenceBlackWhite" },
|
||||||
#endif
|
|
||||||
{ TIFFTAG_XMLPACKET, -1,-3, TIFF_UNDEFINED, FIELD_XMLPACKET,
|
{ TIFFTAG_XMLPACKET, -1,-3, TIFF_UNDEFINED, FIELD_XMLPACKET,
|
||||||
FALSE, TRUE, "XMLPacket" },
|
FALSE, TRUE, "XMLPacket" },
|
||||||
/* begin SGI tags */
|
/* begin SGI tags */
|
||||||
@ -263,14 +251,10 @@ const TIFFFieldInfo tiffFieldInfo[] = {
|
|||||||
FALSE, TRUE, "RichTIFFIPTC" },
|
FALSE, TRUE, "RichTIFFIPTC" },
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef PHOTOSHOP_SUPPORT
|
|
||||||
{ TIFFTAG_PHOTOSHOP, -1,-3, TIFF_BYTE, FIELD_PHOTOSHOP,
|
{ TIFFTAG_PHOTOSHOP, -1,-3, TIFF_BYTE, FIELD_PHOTOSHOP,
|
||||||
FALSE, TRUE, "Photoshop" },
|
FALSE, TRUE, "Photoshop" },
|
||||||
#endif
|
|
||||||
#ifdef ICC_SUPPORT
|
|
||||||
{ TIFFTAG_ICCPROFILE, -1,-3, TIFF_UNDEFINED, FIELD_ICCPROFILE,
|
{ TIFFTAG_ICCPROFILE, -1,-3, TIFF_UNDEFINED, FIELD_ICCPROFILE,
|
||||||
FALSE, TRUE, "ICC Profile" },
|
FALSE, TRUE, "ICC Profile" },
|
||||||
#endif
|
|
||||||
{ TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, FIELD_STONITS,
|
{ TIFFTAG_STONITS, 1, 1, TIFF_DOUBLE, FIELD_STONITS,
|
||||||
FALSE, FALSE, "StoNits" },
|
FALSE, FALSE, "StoNits" },
|
||||||
};
|
};
|
||||||
@ -375,6 +359,7 @@ TIFFDataWidth(TIFFDataType type)
|
|||||||
case 4: /* TIFF_LONG */
|
case 4: /* TIFF_LONG */
|
||||||
case 9: /* TIFF_SLONG */
|
case 9: /* TIFF_SLONG */
|
||||||
case 11: /* TIFF_FLOAT */
|
case 11: /* TIFF_FLOAT */
|
||||||
|
case 13: /* TIFF_IFD */
|
||||||
return 4;
|
return 4;
|
||||||
case 5: /* TIFF_RATIONAL */
|
case 5: /* TIFF_RATIONAL */
|
||||||
case 10: /* TIFF_SRATIONAL */
|
case 10: /* TIFF_SRATIONAL */
|
||||||
|
@ -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
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -148,7 +148,8 @@ typedef enum {
|
|||||||
TIFF_SLONG = 9, /* !32-bit signed integer */
|
TIFF_SLONG = 9, /* !32-bit signed integer */
|
||||||
TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
|
TIFF_SRATIONAL = 10, /* !64-bit signed fraction */
|
||||||
TIFF_FLOAT = 11, /* !32-bit IEEE floating point */
|
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;
|
} TIFFDataType;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user