BigTIFF upgrade in progress - widespread temp mess - does not compile now

This commit is contained in:
Joris Van Damme 2007-05-23 15:36:16 +00:00
parent 7d5139e95b
commit 28e5681dee
3 changed files with 462 additions and 202 deletions

View File

@ -1,4 +1,4 @@
/* $Id: tif_dirinfo.c,v 1.78 2007-05-15 11:09:16 joris Exp $ */
/* $Id: tif_dirinfo.c,v 1.79 2007-05-23 15:36:16 joris Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -91,8 +91,8 @@ tiffFieldInfo[] = {
{ TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileLength" },
{ TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets" },
{ TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts" },
{ TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, TIFF_SETGET_C16_UINT64, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD" },
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet" },
{ TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD" },
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet" },
{ TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames" },
{ TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks" },
{ TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange" },
@ -128,7 +128,7 @@ tiffFieldInfo[] = {
/* end Pixar tags */
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, TIFF_SETGET_C32_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC" },
{ TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop" },
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, TIFF_SETGET_UINT64, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset" },
{ TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset" },
{ TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ICC Profile" },
{ TIFFTAG_GPSIFD, 1, 1, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "GPSIFDOffset" },
@ -148,58 +148,26 @@ tiffFieldInfo[] = {
{ TIFFTAG_INTEROPERABILITYIFD, 1, 1, TIFF_IFD8, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "InteroperabilityIFDOffset" },
/* begin DNG tags */
{ TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DNGVersion" },
{ TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DNGBackwardVersion" },
{ TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 0, "UniqueCameraModel" },
{ TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_ASCII, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 0, "LocalizedCameraModel" },
{ TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 1, "LocalizedCameraModel" },
{ TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "CFAPlaneColor" },
{ TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "CFALayout" },
{ TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "LinearizationTable" },
{ TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BlackLevelRepeatDim" },
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "BlackLevel" },
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "BlackLevel" },
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "BlackLevel" },
{ TIFFTAG_DNGVERSION, 4, 4, TIFF_BYTE, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGVersion" },
{ TIFFTAG_DNGBACKWARDVERSION, 4, 4, TIFF_BYTE, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DNGBackwardVersion" },
{ TIFFTAG_UNIQUECAMERAMODEL, -1, -1, TIFF_ASCII, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "UniqueCameraModel" },
{ TIFFTAG_LOCALIZEDCAMERAMODEL, -1, -1, TIFF_BYTE, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "LocalizedCameraModel" },
{ TIFFTAG_CFAPLANECOLOR, -1, -1, TIFF_BYTE, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CFAPlaneColor" },
{ TIFFTAG_CFALAYOUT, 1, 1, TIFF_SHORT, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFALayout" },
{ TIFFTAG_LINEARIZATIONTABLE, -1, -1, TIFF_SHORT, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "LinearizationTable" },
{ TIFFTAG_BLACKLEVELREPEATDIM, 2, 2, TIFF_SHORT, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BlackLevelRepeatDim" },
{ TIFFTAG_BLACKLEVEL, -1, -1, TIFF_RATIONAL, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "BlackLevel" },
{ TIFFTAG_BLACKLEVELDELTAH, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "BlackLevelDeltaH" },
{ TIFFTAG_BLACKLEVELDELTAV, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "BlackLevelDeltaV" },
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "WhiteLevel" },
{ TIFFTAG_WHITELEVEL, -2, -2, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "WhiteLevel" },
{ TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultScale" },
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BestQualityScale" },
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropOrigin" },
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropOrigin" },
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropOrigin" },
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropSize" },
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropSize" },
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "DefaultCropSize" },
{ TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "ColorMatrix1" },
{ TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "ColorMatrix2" },
{ TIFFTAG_WHITELEVEL, -1, -1, TIFF_LONG, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "WhiteLevel" },
{ TIFFTAG_DEFAULTSCALE, 2, 2, TIFF_RATIONAL, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultScale" },
{ TIFFTAG_BESTQUALITYSCALE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BestQualityScale" },
{ TIFFTAG_DEFAULTCROPORIGIN, 2, 2, TIFF_RATIONAL, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropOrigin" },
{ TIFFTAG_DEFAULTCROPSIZE, 2, 2, TIFF_RATIONAL, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DefaultCropSize" },
{ TIFFTAG_COLORMATRIX1, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix1" },
{ TIFFTAG_COLORMATRIX2, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ColorMatrix2" },
{ TIFFTAG_CAMERACALIBRATION1, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "CameraCalibration1" },
{ TIFFTAG_CAMERACALIBRATION2, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
@ -208,56 +176,33 @@ tiffFieldInfo[] = {
0, 1, "ReductionMatrix1" },
{ TIFFTAG_REDUCTIONMATRIX2, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "ReductionMatrix2" },
{ TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "AnalogBalance" },
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "AsShotNeutral" },
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "AsShotNeutral" },
{ TIFFTAG_ANALOGBALANCE, -1, -1, TIFF_RATIONAL, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AnalogBalance" },
{ TIFFTAG_ASSHOTNEUTRAL, -1, -1, TIFF_RATIONAL, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotNeutral" },
{ TIFFTAG_ASSHOTWHITEXY, 2, 2, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "AsShotWhiteXY" },
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BaselineExposure" },
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BaselineNoise" },
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BaselineSharpness" },
{ TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "BayerGreenSplit" },
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "LinearResponseLimit" },
{ TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 0, "CameraSerialNumber" },
{ TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "LensInfo" },
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "ChromaBlurRadius" },
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "AntiAliasStrength" },
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "ShadowScale" },
{ TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "DNGPrivateData" },
{ TIFFTAG_BASELINEEXPOSURE, 1, 1, TIFF_SRATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineExposure" },
{ TIFFTAG_BASELINENOISE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineNoise" },
{ TIFFTAG_BASELINESHARPNESS, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BaselineSharpness" },
{ TIFFTAG_BAYERGREENSPLIT, 1, 1, TIFF_LONG, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "BayerGreenSplit" },
{ TIFFTAG_LINEARRESPONSELIMIT, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LinearResponseLimit" },
{ TIFFTAG_CAMERASERIALNUMBER, -1, -1, TIFF_ASCII, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "CameraSerialNumber" },
{ TIFFTAG_LENSINFO, 4, 4, TIFF_RATIONAL, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "LensInfo" },
{ TIFFTAG_CHROMABLURRADIUS, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ChromaBlurRadius" },
{ TIFFTAG_ANTIALIASSTRENGTH, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "AntiAliasStrength" },
{ TIFFTAG_SHADOWSCALE, 1, 1, TIFF_RATIONAL, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ShadowScale" },
{ TIFFTAG_DNGPRIVATEDATA, -1, -1, TIFF_BYTE, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "DNGPrivateData" },
{ TIFFTAG_MAKERNOTESAFETY, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "MakerNoteSafety" },
{ TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "CalibrationIlluminant1" },
{ TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "CalibrationIlluminant2" },
{ TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "RawDataUniqueID" },
{ TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_ASCII, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 0, "OriginalRawFileName" },
{ TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
1, 1, "OriginalRawFileName" },
{ TIFFTAG_CALIBRATIONILLUMINANT1, 1, 1, TIFF_SHORT, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant1" },
{ TIFFTAG_CALIBRATIONILLUMINANT2, 1, 1, TIFF_SHORT, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CalibrationIlluminant2" },
{ TIFFTAG_RAWDATAUNIQUEID, 16, 16, TIFF_BYTE, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "RawDataUniqueID" },
{ TIFFTAG_ORIGINALRAWFILENAME, -1, -1, TIFF_BYTE, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "OriginalRawFileName" },
{ TIFFTAG_ORIGINALRAWFILEDATA, -1, -1, TIFF_UNDEFINED, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "OriginalRawFileData" },
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "ActiveArea" },
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_LONG, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ActiveArea" },
{ TIFFTAG_ACTIVEAREA, 4, 4, TIFF_SHORT, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 0, "ActiveArea" },
{ TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "MaskedAreas" },
{ TIFFTAG_MASKEDAREAS, -1, -1, TIFF_LONG, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "MaskedAreas" },
{ TIFFTAG_ASSHOTICCPROFILE, -1, -1, TIFF_UNDEFINED, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
0, 1, "AsShotICCProfile" },
{ TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM,
@ -394,50 +339,38 @@ exifFieldInfo[] = {
set documentation
TIFFTAG_INKSET
1
uint16
TIFFTAG_MATTEING
1
uint16
TIFFTAG_PRIMARYCHROMATICITIES
1
float*
6-entry array
TIFFTAG_REFERENCEBLACKWHITE
1
float*
2*SamplesPerPixel array
@ -449,10 +382,10 @@ TIFFTAG_WHITEPOINT
float*
2-entry array
missing:
TIFFTAG_DATATYPE, 1, uint16
@ -465,14 +398,49 @@ TIFFTAG_SGILOGDATAFMT, 1, int
TIFFTAG_SGILOGENCODE, 1, int
TIFFTAG_JPEGIFOFFSET, 1, uint64
TIFFTAG_JPEGIFBYTECOUNT, 1, uint64
TIFFTAG_JPEGQTABLES, 2, uint32,uint64*
TIFFTAG_JPEGDCTABLES, 2, uint32,uint64*
TIFFTAG_JPEGACTABLES, 2, uint32,uint64*
TIFFTAG_JPEGQTABLES, 2, uint32,uint64* (count & offsets array)
TIFFTAG_JPEGDCTABLES, 2, uint32,uint64* (count & offsets array)
TIFFTAG_JPEGACTABLES, 2, uint32,uint64* (count & offsets array)
TIFFTAG_JPEGPROC, 1, uint16
TIFFTAG_JPEGRESTARTINTERVAL, 1, uint16
TIFFTAG_ZIPQUALITY, 1, int
TIFFTAG_PIXARLOGQUALITY, 1, int
TIFFTAG_PIXARLOGDATAFMT, 1, int
TIFFTAG_DNGVERSION, 1, uint8* (pointer to 4 bytes)
TIFFTAG_DNGBACKWARDVERSION, 1, uint8* (pointer to 4 bytes)
TIFFTAG_UNIQUECAMERAMODEL, 1, char*
TIFFTAG_LOCALIZEDCAMERAMODEL, 2, uint16,uint8* (count & value)
TIFFTAG_COLORMATRIX1, 2, uint16,float* (count & value)
TIFFTAG_COLORMATRIX2, 2, uint16,float* (count & value)
TIFFTAG_ANALOGBALANCE, 2, uint16,float* (count & value)
TIFFTAG_ASSHOTNEUTRAL, 2, uint16,float* (count & value)
TIFFTAG_BASELINEEXPOSURE, 1, double
TIFFTAG_BASELINENOISE, 1, double
TIFFTAG_BASELINESHARPNESS, 1, double
TIFFTAG_LINEARRESPONSELIMIT, 1, double
TIFFTAG_CAMERASERIALNUMBER, 1, char*
TIFFTAG_LENSINFO, 1, float* (pointer to 4 floats)
TIFFTAG_SHADOWSCALE, 1, double
TIFFTAG_DNGPRIVATEDATA, 2, uint16,uint8* (count & value)
TIFFTAG_CALIBRATIONILLUMINANT1, 1, uint16
TIFFTAG_CALIBRATIONILLUMINANT2, 1, uint16
TIFFTAG_RAWDATAUNIQUEID, 1, uint8* (pointer to 16 bytes)
TIFFTAG_ORIGINALRAWFILENAME, 2, uint16,uint8* (count & value)
TIFFTAG_CFAPLANECOLOR, 2, uint16,uint8* (count & value)
TIFFTAG_CFALAYOUT, 1, uint16
TIFFTAG_BLACKLEVELREPEATDIM, 1, uint16* (pointer to 2 shorts)
TIFFTAG_BLACKLEVEL, 2, uint16,float* (count & value)
TIFFTAG_WHITELEVEL, 2, uint16,uint32* (count & value)
TIFFTAG_DEFAULTSCALE, 1, float* (pointer to 2 floats)
TIFFTAG_DEFAULTCROPORIGIN, 1, float* (pointer to 2 floats)
TIFFTAG_DEFAULTCROPSIZE, 1, float* (pointer to 2 floats)
TIFFTAG_BAYERGREENSPLIT, 1, uint32
TIFFTAG_ANTIALIASSTRENGTH, 1, double
TIFFTAG_BESTQUALITYSCALE, 1, double
TIFFTAG_ACTIVEAREA, 1, uint32* (pointer to 4 longs)
TIFFTAG_MASKEDAREAS, 2, uint16,uint32* (count & value)
TIFFTAG_LINEARIZATIONTABLE, 2, uint16,uint16* (count & value)
TIFFTAG_CHROMABLURRADIUS, 1, double
incorrect:
TIFFTAG_JPEGTABLES, 2, uint32,void*
@ -483,7 +451,7 @@ TIFFTAG_YPOSITION, 1, double
TIFFTAG_EXIFIFD, 1, uint64
changed:
TIFFTAG_SUBIFD, 2, uint16,uint64*, count & offsets array
TIFFTAG_SUBIFD, 2, uint16,uint64*, (count & offsets array)
#endif
@ -836,15 +804,15 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, uint32 tag, TIFFDataType field_type)
fld->field_type = field_type;
switch (field_type)
{
case TIFF_BYTE:
case TIFF_UNDEFINED:
fld->set_field_type = TIFF_SETGET_C32_UINT8;
fld->get_field_type = TIFF_SETGET_C32_UINT8;
break;
case TIFF_ASCII:
fld->set_field_type = TIFF_SETGET_C32_ASCII;
fld->get_field_type = TIFF_SETGET_C32_ASCII;
break;
case TIFF_UNDEFINED:
case TIFF_BYTE:
fld->set_field_type = TIFF_SETGET_C32_UINT8;
fld->get_field_type = TIFF_SETGET_C32_UINT8;
break;
case TIFF_SHORT:
fld->set_field_type = TIFF_SETGET_C32_UINT16;
fld->get_field_type = TIFF_SETGET_C32_UINT16;
@ -853,8 +821,44 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, uint32 tag, TIFFDataType field_type)
fld->set_field_type = TIFF_SETGET_C32_UINT32;
fld->get_field_type = TIFF_SETGET_C32_UINT32;
break;
case TIFF_RATIONAL:
case TIFF_SRATIONAL:
case TIFF_FLOAT:
fld->set_field_type = TIFF_SETGET_C32_FLOAT;
fld->get_field_type = TIFF_SETGET_C32_FLOAT;
break;
case TIFF_SBYTE:
fld->set_field_type = TIFF_SETGET_C32_SINT8;
fld->get_field_type = TIFF_SETGET_C32_SINT8;
break;
case TIFF_SSHORT:
fld->set_field_type = TIFF_SETGET_C32_SINT16;
fld->get_field_type = TIFF_SETGET_C32_SINT16;
break;
case TIFF_SLONG:
fld->set_field_type = TIFF_SETGET_C32_SINT32;
fld->get_field_type = TIFF_SETGET_C32_SINT32;
break;
case TIFF_DOUBLE:
fld->set_field_type = TIFF_SETGET_C32_DOUBLE;
fld->get_field_type = TIFF_SETGET_C32_DOUBLE;
break;
case TIFF_IFD:
case TIFF_IFD8:
fld->set_field_type = TIFF_SETGET_C32_IFD8;
fld->get_field_type = TIFF_SETGET_C32_IFD8;
break;
case TIFF_LONG8:
fld->set_field_type = TIFF_SETGET_C32_UINT64;
fld->get_field_type = TIFF_SETGET_C32_UINT64;
break;
case TIFF_SLONG8:
fld->set_field_type = TIFF_SETGET_C32_SINT64;
fld->get_field_type = TIFF_SETGET_C32_SINT64;
break;
default:
assert(0);
fld->set_field_type = TIFF_SETGET_UNDEFINED;
fld->get_field_type = TIFF_SETGET_UNDEFINED;
break;
}
fld->field_bit = FIELD_CUSTOM;

View File

@ -1,4 +1,4 @@
/* $Id: tif_dirread.c,v 1.112 2007-05-15 11:09:16 joris Exp $ */
/* $Id: tif_dirread.c,v 1.113 2007-05-23 15:36:16 joris Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -92,6 +92,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryLongArray(TIFF* tif, TIFFDirEntr
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64_new** value);
static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEntry* direntry, float** value);
static enum TIFFReadDirEntryErr TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value);
static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF* tif, TIFFDirEntry* direntry, uint64_new** value);
static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value);
static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleDouble(TIFF* tif, TIFFDirEntry* direntry, double* value);
@ -1815,6 +1816,72 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEn
return(TIFFReadDirEntryErrOk);
}
static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF* tif, TIFFDirEntry* direntry, uint64_new** value)
{
enum TIFFReadDirEntryErr err;
uint32 count;
void* origdata;
uint64_new* data;
switch (direntry->tdir_type)
{
case TIFF_LONG:
case TIFF_LONG8:
case TIFF_IFD:
case TIFF_IFD8:
break;
default:
return(TIFFReadDirEntryErrType);
}
err=TIFFReadDirEntryArray(tif,direntry,&count,&origdata);
if ((err!=TIFFReadDirEntryErrOk)||(origdata==0))
{
*value=0;
return(err);
}
switch (direntry->tdir_type)
{
case TIFF_LONG8:
case TIFF_IFD8:
*value=(uint64_new*)origdata;
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabArrayOfLong8(*value,count);
return(TIFFReadDirEntryErrOk);
}
data=(uint64_new*)_TIFFmalloc(count*8);
if (data==0)
{
_TIFFfree(origdata);
return(TIFFReadDirEntryErrAlloc);
}
switch (direntry->tdir_type)
{
case TIFF_LONG:
case TIFF_IFD:
{
uint32* ma;
uint64_new* mb;
uint32 n;
ma=(uint32*)origdata;
mb=(uint64_new*)data;
for (n=0; n<count; n++)
{
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabLong(ma);
*mb++=(uint64_new)(*ma++);
}
}
break;
}
_TIFFfree(origdata);
if (err!=TIFFReadDirEntryErrOk)
{
_TIFFfree(data);
return(err);
}
*value=data;
return(TIFFReadDirEntryErrOk);
}
static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDirEntry* direntry, uint16* value)
{
enum TIFFReadDirEntryErr err;
@ -2239,6 +2306,9 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c
case TIFFReadDirEntryErrPsdif:
TIFFErrorExt(tif->tif_clientdata,module,"Cannot handle different values per sample for \"%s\"",tagname);
break;
case TIFFReadDirEntryErrCount:
TIFFErrorExt(tif->tif_clientdata,module,"Incorrect count for \"%s\"",tagname);
break;
default:
assert(0);
break;
@ -2257,6 +2327,9 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c
case TIFFReadDirEntryErrType:
TIFFWarningExt(tif->tif_clientdata,module,"Incompatible type for \"%s\"; tag ignored",tagname);
break;
case TIFFReadDirEntryErrCount:
TIFFErrorExt(tif->tif_clientdata,module,"Incorrect count for \"%s\"; tag ignored",tagname);
break;
default:
assert(0);
break;
@ -2322,7 +2395,7 @@ TIFFReadDirectory(TIFF* tif)
dp=TIFFReadDirectoryFindEntry(tif,dir,dircount,TIFFTAG_SAMPLESPERPIXEL);
if (dp)
{
if (!TIFFFetchNormalTag(tif,dp,FALSE))
if (!TIFFFetchNormalTag(tif,dp,0))
goto bad;
dp->tdir_tag=IGNORE;
}
@ -2394,64 +2467,28 @@ TIFFReadDirectory(TIFF* tif)
dp->tdir_tag=IGNORE;
else
{
#ifdef NDEF
/* check data type */
while ((fip->field_type!=TIFF_ANY)&&(fip->field_type!=dp->tdir_type))
switch (dp->tdir_tag)
{
fii++;
if ((fii==tif->tif_nfields)||
(tif->tif_fieldinfo[fii]->field_tag!=(uint32)dp->tdir_tag))
{
fii=(uint32)(-1);
case TIFFTAG_STRIPOFFSETS:
case TIFFTAG_STRIPBYTECOUNTS:
case TIFFTAG_TILEOFFSETS:
case TIFFTAG_TILEBYTECOUNTS:
TIFFSetFieldBit(tif,fip->field_bit);
break;
case TIFFTAG_IMAGEWIDTH:
case TIFFTAG_IMAGELENGTH:
case TIFFTAG_IMAGEDEPTH:
case TIFFTAG_TILELENGTH:
case TIFFTAG_TILEWIDTH:
case TIFFTAG_TILEDEPTH:
case TIFFTAG_PLANARCONFIG:
case TIFFTAG_ROWSPERSTRIP:
case TIFFTAG_EXTRASAMPLES:
if (!TIFFFetchNormalTag(tif,dp,0))
goto bad;
dp->tdir_tag=IGNORE;
break;
}
fip=tif->tif_fieldinfo[fii];
}
if (fii==(uint32)(-1))
{
TIFFWarningExt(tif->tif_clientdata, module,
"Wrong data type %d for \"%s\"; tag ignored",
dp->tdir_type,fip->field_name);
dp->tdir_tag=IGNORE;
}
else
{
/* check count if known in advance */
if ((fip->field_readcount!=TIFF_VARIABLE)&&
(fip->field_readcount!=TIFF_VARIABLE2))
{
uint32 expected;
if (fip->field_readcount==TIFF_SPP)
expected=(uint32)tif->tif_dir.td_samplesperpixel;
else
expected=(uint32)fip->field_readcount;
if (!CheckDirCount(tif,dp,expected))
dp->tdir_tag=IGNORE;
}
}
#endif
switch (dp->tdir_tag)
{
case TIFFTAG_STRIPOFFSETS:
case TIFFTAG_STRIPBYTECOUNTS:
case TIFFTAG_TILEOFFSETS:
case TIFFTAG_TILEBYTECOUNTS:
TIFFSetFieldBit(tif,fip->field_bit);
break;
case TIFFTAG_IMAGEWIDTH:
case TIFFTAG_IMAGELENGTH:
case TIFFTAG_IMAGEDEPTH:
case TIFFTAG_TILELENGTH:
case TIFFTAG_TILEWIDTH:
case TIFFTAG_TILEDEPTH:
case TIFFTAG_PLANARCONFIG:
case TIFFTAG_ROWSPERSTRIP:
case TIFFTAG_EXTRASAMPLES:
if (!TIFFFetchNormalTag(tif,dp,FALSE))
goto bad;
dp->tdir_tag=IGNORE;
break;
}
}
}
}
@ -3691,6 +3728,19 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
}
break;
case TIFF_SETGET_IFD8:
{
uint64_new data;
assert(fip->field_readcount==1);
assert(fip->field_passcount==0);
err=TIFFReadDirEntryIfd8(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
if (!TIFFSetField(tif,dp->tdir_tag,data))
return(0);
}
}
break;
case TIFF_SETGET_INT:
assert(0);
break;
@ -3715,6 +3765,72 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
}
break;
case TIFF_SETGET_C0_UINT8:
{
uint8* data;
assert(fip->field_readcount>=1);
assert(fip->field_passcount==0);
if (dp->tdir_count!=(uint64_new)fip->field_readcount)
assert(0);
else
{
err=TIFFReadDirEntryByteArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C0_UINT16:
{
uint16* data;
assert(fip->field_readcount>=1);
assert(fip->field_passcount==0);
if (dp->tdir_count!=(uint64_new)fip->field_readcount)
assert(0);
else
{
err=TIFFReadDirEntryShortArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C0_UINT32:
{
uint32* data;
assert(fip->field_readcount>=1);
assert(fip->field_passcount==0);
if (dp->tdir_count!=(uint64_new)fip->field_readcount)
assert(0);
else
{
err=TIFFReadDirEntryLongArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C0_FLOAT:
{
float* data;
@ -3740,6 +3856,28 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
case TIFF_SETGET_C16_ASCII:
assert(0);
break;
case TIFF_SETGET_C16_UINT8:
{
uint16* data;
assert(fip->field_readcount==TIFF_VARIABLE);
assert(fip->field_passcount==1);
if (dp->tdir_count>0xFFFF)
assert(0);
else
{
err=TIFFReadDirEntryByteArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C16_UINT16:
{
uint16* data;
@ -3762,9 +3900,31 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
}
break;
case TIFF_SETGET_C16_UINT32:
{
uint32* data;
assert(fip->field_readcount==TIFF_VARIABLE);
assert(fip->field_passcount==1);
if (dp->tdir_count>0xFFFF)
assert(0);
else
{
err=TIFFReadDirEntryLongArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C16_UINT64:
{
uint16* data;
uint64_new* data;
assert(fip->field_readcount==TIFF_VARIABLE);
assert(fip->field_passcount==1);
if (dp->tdir_count>0xFFFF)
@ -3784,6 +3944,50 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
}
break;
case TIFF_SETGET_C16_FLOAT:
{
float* data;
assert(fip->field_readcount==TIFF_VARIABLE);
assert(fip->field_passcount==1);
if (dp->tdir_count>0xFFFF)
assert(0);
else
{
err=TIFFReadDirEntryFloatArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C16_IFD8:
{
uint64_new* data;
assert(fip->field_readcount==TIFF_VARIABLE);
assert(fip->field_passcount==1);
if (dp->tdir_count>0xFFFF)
assert(0);
else
{
err=TIFFReadDirEntryIfd8Array(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
}
break;
case TIFF_SETGET_C32_ASCII:
{
uint8* data;
@ -3869,9 +4073,46 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
}
break;
case TIFF_SETGET_C32_FLOAT:
{
float* data;
assert(fip->field_readcount==TIFF_VARIABLE2);
assert(fip->field_passcount==1);
err=TIFFReadDirEntryFloatArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
break;
case TIFF_SETGET_C32_DOUBLE:
{
double* data;
assert(fip->field_readcount==TIFF_VARIABLE2);
assert(fip->field_passcount==1);
err=TIFFReadDirEntryDoubleArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
int m;
m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
if (!m)
return(0);
}
}
break;
case TIFF_SETGET_OTHER:
assert(0);
break;
default:
assert(0);
break;
}
if (err!=TIFFReadDirEntryErrOk)
{

View File

@ -1,4 +1,4 @@
/* $Id: tiff.h,v 1.52 2007-05-11 14:41:01 joris Exp $ */
/* $Id: tiff.h,v 1.53 2007-05-23 15:36:16 joris Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -168,25 +168,40 @@ typedef enum {
} TIFFDataType;
typedef enum {
TIFF_SETGET_UNDEFINED = 0,
TIFF_SETGET_ASCII = 1,
TIFF_SETGET_UINT16 = 2,
TIFF_SETGET_UINT32 = 3,
TIFF_SETGET_UINT64 = 4,
TIFF_SETGET_FLOAT = 5,
TIFF_SETGET_DOUBLE = 6,
TIFF_SETGET_INT = 7,
TIFF_SETGET_UINT16_PAIR = 8,
TIFF_SETGET_C0_FLOAT = 9,
TIFF_SETGET_C16_ASCII = 10,
TIFF_SETGET_C16_UINT16 = 11,
TIFF_SETGET_C16_UINT64 = 12,
TIFF_SETGET_C32_ASCII = 13,
TIFF_SETGET_C32_UINT8 = 14,
TIFF_SETGET_C32_UINT16 = 15,
TIFF_SETGET_C32_UINT32 = 16,
TIFF_SETGET_C32_UINT64 = 17,
TIFF_SETGET_OTHER = 18,
TIFF_SETGET_UNDEFINED,
TIFF_SETGET_ASCII,
TIFF_SETGET_UINT16,
TIFF_SETGET_UINT32,
TIFF_SETGET_UINT64,
TIFF_SETGET_FLOAT,
TIFF_SETGET_DOUBLE,
TIFF_SETGET_IFD8,
TIFF_SETGET_INT,
TIFF_SETGET_UINT16_PAIR,
TIFF_SETGET_C0_UINT8,
TIFF_SETGET_C0_UINT16,
TIFF_SETGET_C0_UINT32,
TIFF_SETGET_C0_FLOAT,
TIFF_SETGET_C16_ASCII,
TIFF_SETGET_C16_UINT8,
TIFF_SETGET_C16_UINT16,
TIFF_SETGET_C16_UINT32,
TIFF_SETGET_C16_UINT64,
TIFF_SETGET_C16_FLOAT,
TIFF_SETGET_C16_IFD8,
TIFF_SETGET_C32_ASCII,
TIFF_SETGET_C32_UINT8,
TIFF_SETGET_C32_SINT8,
TIFF_SETGET_C32_UINT16,
TIFF_SETGET_C32_SINT16,
TIFF_SETGET_C32_UINT32,
TIFF_SETGET_C32_SINT32,
TIFF_SETGET_C32_UINT64,
TIFF_SETGET_C32_SINT64,
TIFF_SETGET_C32_FLOAT,
TIFF_SETGET_C32_DOUBLE,
TIFF_SETGET_C32_IFD8,
TIFF_SETGET_OTHER,
} TIFFSetGetFieldType;
/*