@ -47,9 +47,19 @@
# endif
static const TIFFFieldArray tiffFieldArray ;
static const TIFFFieldArray exifFieldArray ;
static const TIFFFieldArray gpsFieldArray ;
# ifdef _MSC_VER
# pragma warning( pop )
# endif
/*--: Rational2Double: --
* The Rational2Double upgraded libtiff functionality allows the definition and achievement of true double - precision accuracy
* for TIFF tags of RATIONAL type and field_bit = FIELD_CUSTOM using the set_field_type = TIFF_SETGET_DOUBLE .
* Unfortunately , that changes the old implemented interface for TIFFGetField ( ) .
* In order to keep the old TIFFGetField ( ) interface behavior those tags have to be redefined with set_field_type = TIFF_SETGET_FLOAT !
*
* Rational custom arrays are already defined as _Cxx_FLOAT , thus can stay .
*
*/
static const TIFFField
tiffFields [ ] = {
@ -75,12 +85,12 @@ tiffFields[] = {
{ TIFFTAG_STRIPBYTECOUNTS , - 1 , - 1 , TIFF_LONG8 , 0 , TIFF_SETGET_UNDEFINED , TIFF_SETGET_UNDEFINED , FIELD_STRIPBYTECOUNTS , 0 , 0 , " StripByteCounts " , NULL } ,
{ TIFFTAG_MINSAMPLEVALUE , - 2 , - 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_MINSAMPLEVALUE , 1 , 0 , " MinSampleValue " , NULL } ,
{ TIFFTAG_MAXSAMPLEVALUE , - 2 , - 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_MAXSAMPLEVALUE , 1 , 0 , " MaxSampleValue " , NULL } ,
{ TIFFTAG_XRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_RESOLUTION , 1 , 0 , " XResolution " , NULL } ,
{ TIFFTAG_YRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_RESOLUTION , 1 , 0 , " YResolution " , NULL } ,
{ TIFFTAG_XRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_RESOLUTION , 1 , 0 , " XResolution " , NULL } ,
{ TIFFTAG_YRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_RESOLUTION , 1 , 0 , " YResolution " , NULL } ,
{ TIFFTAG_PLANARCONFIG , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_PLANARCONFIG , 0 , 0 , " PlanarConfiguration " , NULL } ,
{ TIFFTAG_PAGENAME , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " PageName " , NULL } ,
{ TIFFTAG_XPOSITION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_POSITION , 1 , 0 , " XPosition " , NULL } ,
{ TIFFTAG_YPOSITION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_POSITION , 1 , 0 , " YPosition " , NULL } ,
{ TIFFTAG_XPOSITION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_POSITION , 1 , 0 , " XPosition " , NULL } ,
{ TIFFTAG_YPOSITION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_POSITION , 1 , 0 , " YPosition " , NULL } ,
{ TIFFTAG_FREEOFFSETS , - 1 , - 1 , TIFF_LONG8 , 0 , TIFF_SETGET_UNDEFINED , TIFF_SETGET_UNDEFINED , FIELD_IGNORE , 0 , 0 , " FreeOffsets " , NULL } ,
{ TIFFTAG_FREEBYTECOUNTS , - 1 , - 1 , TIFF_LONG8 , 0 , TIFF_SETGET_UNDEFINED , TIFF_SETGET_UNDEFINED , FIELD_IGNORE , 0 , 0 , " FreeByteCounts " , NULL } ,
{ TIFFTAG_GRAYRESPONSEUNIT , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UNDEFINED , TIFF_SETGET_UNDEFINED , FIELD_IGNORE , 1 , 0 , " GrayResponseUnit " , NULL } ,
@ -135,14 +145,18 @@ tiffFields[] = {
{ TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN , 16 , 16 , TIFF_FLOAT , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MatrixWorldToScreen " , NULL } ,
{ TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA , 16 , 16 , TIFF_FLOAT , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MatrixWorldToCamera " , NULL } ,
{ TIFFTAG_CFAREPEATPATTERNDIM , 2 , 2 , TIFF_SHORT , 0 , TIFF_SETGET_C0_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " CFARepeatPatternDim " , NULL } ,
{ TIFFTAG_CFAPATTERN , 4 , 4 , TIFF_BYTE , 0 , TIFF_SETGET_C0 _UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " CFAPattern " , NULL } ,
{ TIFFTAG_CFAPATTERN , - 1 , - 1 , TIFF_BYTE , 0 , TIFF_SETGET_C16 _UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " CFAPattern " , NULL } ,
{ TIFFTAG_COPYRIGHT , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Copyright " , NULL } ,
/* end Pixar tags */
{ TIFFTAG_RICHTIFFIPTC , - 3 , - 3 , TIFF_LONG , 0 , TIFF_SETGET_C32_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " RichTIFFIPTC " , NULL } ,
{ TIFFTAG_RICHTIFFIPTC , - 3 , - 3 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C32_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " RichTIFFIPTC " , NULL } ,
{ TIFFTAG_PHOTOSHOP , - 3 , - 3 , TIFF_BYTE , 0 , TIFF_SETGET_C32_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " Photoshop " , NULL } ,
{ TIFFTAG_EXIFIFD , 1 , 1 , TIFF_IFD8 , 0 , TIFF_SETGET_IFD8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " EXIFIFDOffset " , ( TIFFFieldArray * ) & exifFieldArray } ,
/*--: EXIFIFD and GPSIFD specified as TIFF_LONG by Aware-Systems and not TIFF_IFD8 as in original LibTiff.
* However , for IFD - like tags , libtiff uses the data type TIFF_IFD8 in tiffFields [ ] - tag definition combined with
* a special handling procedure in order to write either a 32 - bit value and the TIFF_IFD type - id into ClassicTIFF files
* or a 64 - bit value and the TIFF_IFD8 type - id into BigTIFF files . */
{ TIFFTAG_EXIFIFD , 1 , 1 , TIFF_IFD8 , 0 , TIFF_SETGET_IFD8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " EXIFIFDOffset " , ( TIFFFieldArray * ) & exifFieldArray } ,
{ TIFFTAG_ICCPROFILE , - 3 , - 3 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C32_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " ICC Profile " , NULL } ,
{ TIFFTAG_GPSIFD , 1 , 1 , TIFF_IFD8 , 0 , TIFF_SETGET_IFD8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " GPSIFDOffset " , NULL } ,
{ TIFFTAG_GPSIFD , 1 , 1 , TIFF_IFD8 , 0 , TIFF_SETGET_IFD8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " GPSIFDOffset " , ( TIFFFieldArray * ) & gpsFieldArray } ,
{ TIFFTAG_FAXRECVPARAMS , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UINT32 , FIELD_CUSTOM , TRUE , FALSE , " FaxRecvParams " , NULL } ,
{ TIFFTAG_FAXSUBADDRESS , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_ASCII , FIELD_CUSTOM , TRUE , FALSE , " FaxSubAddress " , NULL } ,
{ TIFFTAG_FAXRECVTIME , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UINT32 , FIELD_CUSTOM , TRUE , FALSE , " FaxRecvTime " , NULL } ,
@ -163,7 +177,7 @@ tiffFields[] = {
{ TIFFTAG_BLACKLEVELDELTAV , - 1 , - 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_C16_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " BlackLevelDeltaV " , NULL } ,
{ TIFFTAG_WHITELEVEL , - 1 , - 1 , TIFF_LONG , 0 , TIFF_SETGET_C16_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " WhiteLevel " , NULL } ,
{ TIFFTAG_DEFAULTSCALE , 2 , 2 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " DefaultScale " , NULL } ,
{ TIFFTAG_BESTQUALITYSCALE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BestQualityScale " , NULL } ,
{ TIFFTAG_BESTQUALITYSCALE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BestQualityScale " , NULL } ,
{ TIFFTAG_DEFAULTCROPORIGIN , 2 , 2 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " DefaultCropOrigin " , NULL } ,
{ TIFFTAG_DEFAULTCROPSIZE , 2 , 2 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " DefaultCropSize " , NULL } ,
{ TIFFTAG_COLORMATRIX1 , - 1 , - 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_C16_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " ColorMatrix1 " , NULL } ,
@ -175,16 +189,16 @@ tiffFields[] = {
{ TIFFTAG_ANALOGBALANCE , - 1 , - 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_C16_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " AnalogBalance " , NULL } ,
{ TIFFTAG_ASSHOTNEUTRAL , - 1 , - 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_C16_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " AsShotNeutral " , NULL } ,
{ TIFFTAG_ASSHOTWHITEXY , 2 , 2 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " AsShotWhiteXY " , NULL } ,
{ TIFFTAG_BASELINEEXPOSURE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineExposure " , NULL } ,
{ TIFFTAG_BASELINENOISE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineNoise " , NULL } ,
{ TIFFTAG_BASELINESHARPNESS , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineSharpness " , NULL } ,
{ TIFFTAG_BASELINEEXPOSURE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineExposure " , NULL } ,
{ TIFFTAG_BASELINENOISE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineNoise " , NULL } ,
{ TIFFTAG_BASELINESHARPNESS , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BaselineSharpness " , NULL } ,
{ TIFFTAG_BAYERGREENSPLIT , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " BayerGreenSplit " , NULL } ,
{ TIFFTAG_LINEARRESPONSELIMIT , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " LinearResponseLimit " , NULL } ,
{ TIFFTAG_LINEARRESPONSELIMIT , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " LinearResponseLimit " , NULL } ,
{ TIFFTAG_CAMERASERIALNUMBER , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CameraSerialNumber " , NULL } ,
{ TIFFTAG_LENSINFO , 4 , 4 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " LensInfo " , NULL } ,
{ TIFFTAG_CHROMABLURRADIUS , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " ChromaBlurRadius " , NULL } ,
{ TIFFTAG_ANTIALIASSTRENGTH , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " AntiAliasStrength " , NULL } ,
{ TIFFTAG_SHADOWSCALE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " ShadowScale " , NULL } ,
{ TIFFTAG_CHROMABLURRADIUS , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " ChromaBlurRadius " , NULL } ,
{ TIFFTAG_ANTIALIASSTRENGTH , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " AntiAliasStrength " , NULL } ,
{ TIFFTAG_SHADOWSCALE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " ShadowScale " , NULL } ,
{ TIFFTAG_DNGPRIVATEDATA , - 1 , - 1 , TIFF_BYTE , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 1 , " DNGPrivateData " , NULL } ,
{ TIFFTAG_MAKERNOTESAFETY , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " MakerNoteSafety " , NULL } ,
{ TIFFTAG_CALIBRATIONILLUMINANT1 , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 0 , 0 , " CalibrationIlluminant1 " , NULL } ,
@ -217,47 +231,68 @@ tiffFields[] = {
/* begin pseudo tags */
} ;
/*
* EXIF tags ( Version 2.31 , July 2016 plus version 2.32 May 2019 )
*/
static const TIFFField
exifFields [ ] = {
{ EXIFTAG_EXPOSURETIME , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureTime " , NULL } ,
{ EXIFTAG_FNUMBER , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FNumber " , NULL } ,
{ EXIFTAG_EXPOSURETIME , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureTime " , NULL } ,
{ EXIFTAG_FNUMBER , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FNumber " , NULL } ,
{ EXIFTAG_EXPOSUREPROGRAM , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureProgram " , NULL } ,
{ EXIFTAG_SPECTRALSENSITIVITY , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SpectralSensitivity " , NULL } ,
{ EXIFTAG_ISOSPEEDRATINGS , - 1 , - 1 , TIFF_SHORT , 0 , TIFF_SETGET_C16_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " ISOSpeedRatings " , NULL } ,
{ EXIFTAG_OECF , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " OptoelectricConversionFactor " , NULL } ,
{ EXIFTAG_SENSITIVITYTYPE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SensitivityType " , NULL } ,
{ EXIFTAG_STANDARDOUTPUTSENSITIVITY , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " StandardOutputSensitivity " , NULL } ,
{ EXIFTAG_RECOMMENDEDEXPOSUREINDEX , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " RecommendedExposureIndex " , NULL } ,
{ EXIFTAG_ISOSPEED , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ISOSpeed " , NULL } ,
{ EXIFTAG_ISOSPEEDLATITUDEYYY , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ISOSpeedLatitudeyyy " , NULL } ,
{ EXIFTAG_ISOSPEEDLATITUDEZZZ , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ISOSpeedLatitudezzz " , NULL } ,
{ EXIFTAG_EXIFVERSION , 4 , 4 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExifVersion " , NULL } ,
{ EXIFTAG_DATETIMEORIGINAL , 20 , 20 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DateTimeOriginal " , NULL } ,
{ EXIFTAG_DATETIMEDIGITIZED , 20 , 20 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DateTimeDigitized " , NULL } ,
{ EXIFTAG_OFFSETTIME , 7 , 7 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " OffsetTime " , NULL } ,
{ EXIFTAG_OFFSETTIMEORIGINAL , 7 , 7 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " OffsetTimeOriginal " , NULL } ,
{ EXIFTAG_OFFSETTIMEDIGITIZED , 7 , 7 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " OffsetTimeDigitized " , NULL } ,
{ EXIFTAG_COMPONENTSCONFIGURATION , 4 , 4 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ComponentsConfiguration " , NULL } ,
{ EXIFTAG_COMPRESSEDBITSPERPIXEL , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CompressedBitsPerPixel " , NULL } ,
{ EXIFTAG_SHUTTERSPEEDVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ShutterSpeedValue " , NULL } ,
{ EXIFTAG_APERTUREVALUE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ApertureValue " , NULL } ,
{ EXIFTAG_BRIGHTNESSVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " BrightnessValue " , NULL } ,
{ EXIFTAG_EXPOSUREBIASVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureBiasValue " , NULL } ,
{ EXIFTAG_MAXAPERTUREVALUE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MaxApertureValue " , NULL } ,
{ EXIFTAG_SUBJECTDISTANCE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubjectDistance " , NULL } ,
{ EXIFTAG_COMPRESSEDBITSPERPIXEL , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CompressedBitsPerPixel " , NULL } ,
{ EXIFTAG_SHUTTERSPEEDVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ShutterSpeedValue " , NULL } ,
{ EXIFTAG_APERTUREVALUE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ApertureValue " , NULL } ,
{ EXIFTAG_BRIGHTNESSVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " BrightnessValue " , NULL } ,
{ EXIFTAG_EXPOSUREBIASVALUE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureBiasValue " , NULL } ,
{ EXIFTAG_MAXAPERTUREVALUE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MaxApertureValue " , NULL } ,
/*--: EXIFTAG_SUBJECTDISTANCE: LibTiff returns value of "-1" if numerator equals 4294967295 (0xFFFFFFFF) to indicate infinite distance!
* However , there are two other EXIF tags where numerator indicates a special value and six other cases where the denominator indicates special values ,
* which are not treated within LibTiff ! ! */
{ EXIFTAG_SUBJECTDISTANCE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubjectDistance " , NULL } ,
{ EXIFTAG_METERINGMODE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MeteringMode " , NULL } ,
{ EXIFTAG_LIGHTSOURCE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LightSource " , NULL } ,
{ EXIFTAG_FLASH , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Flash " , NULL } ,
{ EXIFTAG_FOCALLENGTH , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalLength " , NULL } ,
{ EXIFTAG_FOCALLENGTH , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalLength " , NULL } ,
{ EXIFTAG_SUBJECTAREA , - 1 , - 1 , TIFF_SHORT , 0 , TIFF_SETGET_C16_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " SubjectArea " , NULL } ,
{ EXIFTAG_MAKERNOTE , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " MakerNote " , NULL } ,
{ EXIFTAG_USERCOMMENT , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " UserComment " , NULL } ,
{ EXIFTAG_SUBSECTIME , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubSecTime " , NULL } ,
{ EXIFTAG_SUBSECTIMEORIGINAL , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubSecTimeOriginal " , NULL } ,
{ EXIFTAG_SUBSECTIMEDIGITIZED , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubSecTimeDigitized " , NULL } ,
{ EXIFTAG_TEMPERATURE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Temperature " , NULL } ,
{ EXIFTAG_HUMIDITY , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Humidity " , NULL } ,
{ EXIFTAG_PRESSURE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Pressure " , NULL } ,
{ EXIFTAG_WATERDEPTH , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " WaterDepth " , NULL } ,
{ EXIFTAG_ACCELERATION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Acceleration " , NULL } ,
{ EXIFTAG_CAMERAELEVATIONANGLE , 1 , 1 , TIFF_SRATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CameraElevationAngle " , NULL } ,
{ EXIFTAG_FLASHPIXVERSION , 4 , 4 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FlashpixVersion " , NULL } ,
{ EXIFTAG_COLORSPACE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ColorSpace " , NULL } ,
{ EXIFTAG_PIXELXDIMENSION , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " PixelXDimension " , NULL } ,
{ EXIFTAG_PIXELYDIMENSION , 1 , 1 , TIFF_LONG , 0 , TIFF_SETGET_UINT32 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " PixelYDimension " , NULL } ,
{ EXIFTAG_RELATEDSOUNDFILE , 13 , 13 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " RelatedSoundFile " , NULL } ,
{ EXIFTAG_FLASHENERGY , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FlashEnergy " , NULL } ,
{ EXIFTAG_FLASHENERGY , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FlashEnergy " , NULL } ,
{ EXIFTAG_SPATIALFREQUENCYRESPONSE , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " SpatialFrequencyResponse " , NULL } ,
{ EXIFTAG_FOCALPLANEXRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalPlaneXResolution " , NULL } ,
{ EXIFTAG_FOCALPLANEYRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalPlaneYResolution " , NULL } ,
{ EXIFTAG_FOCALPLANEXRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalPlaneXResolution " , NULL } ,
{ EXIFTAG_FOCALPLANEYRESOLUTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalPlaneYResolution " , NULL } ,
{ EXIFTAG_FOCALPLANERESOLUTIONUNIT , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalPlaneResolutionUnit " , NULL } ,
{ EXIFTAG_SUBJECTLOCATION , 2 , 2 , TIFF_SHORT , 0 , TIFF_SETGET_C0_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubjectLocation " , NULL } ,
{ EXIFTAG_EXPOSUREINDEX , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureIndex " , NULL } ,
{ EXIFTAG_EXPOSUREINDEX , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureIndex " , NULL } ,
{ EXIFTAG_SENSINGMETHOD , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SensingMethod " , NULL } ,
{ EXIFTAG_FILESOURCE , 1 , 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FileSource " , NULL } ,
{ EXIFTAG_SCENETYPE , 1 , 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SceneType " , NULL } ,
@ -265,22 +300,79 @@ exifFields[] = {
{ EXIFTAG_CUSTOMRENDERED , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CustomRendered " , NULL } ,
{ EXIFTAG_EXPOSUREMODE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ExposureMode " , NULL } ,
{ EXIFTAG_WHITEBALANCE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " WhiteBalance " , NULL } ,
{ EXIFTAG_DIGITALZOOMRATIO , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DigitalZoomRatio " , NULL } ,
{ EXIFTAG_DIGITALZOOMRATIO , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DigitalZoomRatio " , NULL } ,
{ EXIFTAG_FOCALLENGTHIN35MMFILM , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " FocalLengthIn35mmFilm " , NULL } ,
{ EXIFTAG_SCENECAPTURETYPE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SceneCaptureType " , NULL } ,
{ EXIFTAG_GAINCONTROL , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " GainControl " , NULL } ,
{ EXIFTAG_GAINCONTROL , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " GainControl " , NULL } ,
{ EXIFTAG_CONTRAST , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Contrast " , NULL } ,
{ EXIFTAG_SATURATION , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Saturation " , NULL } ,
{ EXIFTAG_SHARPNESS , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Sharpness " , NULL } ,
{ EXIFTAG_DEVICESETTINGDESCRIPTION , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " DeviceSettingDescription " , NULL } ,
{ EXIFTAG_SUBJECTDISTANCERANGE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SubjectDistanceRange " , NULL } ,
{ EXIFTAG_IMAGEUNIQUEID , 33 , 33 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ImageUniqueID " , NULL }
{ EXIFTAG_IMAGEUNIQUEID , 33 , 33 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ImageUniqueID " , NULL } ,
{ EXIFTAG_CAMERAOWNERNAME , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CameraOwnerName " , NULL } ,
{ EXIFTAG_BODYSERIALNUMBER , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " BodySerialNumber " , NULL } ,
{ EXIFTAG_LENSSPECIFICATION , 4 , 4 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LensSpecification " , NULL } ,
{ EXIFTAG_LENSMAKE , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LensMake " , NULL } ,
{ EXIFTAG_LENSMODEL , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LensModel " , NULL } ,
{ EXIFTAG_LENSSERIALNUMBER , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LensSerialNumber " , NULL } ,
{ EXIFTAG_GAMMA , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_FLOAT , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Gamma " , NULL } ,
{ EXIFTAG_COMPOSITEIMAGE , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " CompositeImage " , NULL } ,
{ EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE , 2 , 2 , TIFF_SHORT , 0 , TIFF_SETGET_C0_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SourceImageNumberOfCompositeImage " , NULL } ,
{ EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " SourceExposureTimesOfCompositeImage " , NULL }
} ;
/*
* EXIF - GPS tags ( Version 2.31 , July 2016 ; nothing changed for version 2.32 May 2019 )
*/
static TIFFField
gpsFields [ ] = {
/* For the GPS tag definitions in gpsFields[] the standard definition for Rationals is TIFF_SETGET_DOUBLE and TIFF_SETGET_C0_FLOAT.
* - - ATTENTION : After the upgrade with Rational2Double , the GPSTAG values can now be written and also read in double precision !
* In order to achieve double precision for GPS tags :
* Standard definitions for GPSTAG is kept to TIFF_SETGET_DOUBLE
* and TIFF_SETGET_C0_FLOAT is changed to TIFF_SETGET_C0_DOUBLE .
*/
{ GPSTAG_VERSIONID , 4 , 4 , TIFF_BYTE , 0 , TIFF_SETGET_C0_UINT8 , TIFF_SETGET_UINT8 , FIELD_CUSTOM , 1 , 0 , " VersionID " , NULL } ,
{ GPSTAG_LATITUDEREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LatitudeRef " , NULL } ,
{ GPSTAG_LATITUDE , 3 , 3 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Latitude " , NULL } ,
{ GPSTAG_LONGITUDEREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " LongitudeRef " , NULL } ,
{ GPSTAG_LONGITUDE , 3 , 3 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Longitude " , NULL } ,
{ GPSTAG_ALTITUDEREF , 1 , 1 , TIFF_BYTE , 0 , TIFF_SETGET_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " AltitudeRef " , NULL } ,
{ GPSTAG_ALTITUDE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Altitude " , NULL } ,
{ GPSTAG_TIMESTAMP , 3 , 3 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " TimeStamp " , NULL } ,
{ GPSTAG_SATELLITES , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Satellites " , NULL } ,
{ GPSTAG_STATUS , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Status " , NULL } ,
{ GPSTAG_MEASUREMODE , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MeasureMode " , NULL } ,
{ GPSTAG_DOP , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DOP " , NULL } ,
{ GPSTAG_SPEEDREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " SpeedRef " , NULL } ,
{ GPSTAG_SPEED , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Speed " , NULL } ,
{ GPSTAG_TRACKREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " TrackRef " , NULL } ,
{ GPSTAG_TRACK , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Track " , NULL } ,
{ GPSTAG_IMGDIRECTIONREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ImgDirectionRef " , NULL } ,
{ GPSTAG_IMGDIRECTION , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " ImgDirection " , NULL } ,
{ GPSTAG_MAPDATUM , - 1 , - 1 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " MapDatum " , NULL } ,
{ GPSTAG_DESTLATITUDEREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestLatitudeRef " , NULL } ,
{ GPSTAG_DESTLATITUDE , 3 , 3 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestLatitude " , NULL } ,
{ GPSTAG_DESTLONGITUDEREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestLongitudeRef " , NULL } ,
{ GPSTAG_DESTLONGITUDE , 3 , 3 , TIFF_RATIONAL , 0 , TIFF_SETGET_C0_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestLongitude " , NULL } ,
{ GPSTAG_DESTBEARINGREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestBearingRef " , NULL } ,
{ GPSTAG_DESTBEARING , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestBearing " , NULL } ,
{ GPSTAG_DESTDISTANCEREF , 2 , 2 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestDistanceRef " , NULL } ,
{ GPSTAG_DESTDISTANCE , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DestDistance " , NULL } ,
{ GPSTAG_PROCESSINGMETHOD , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " ProcessingMethod " , NULL } ,
{ GPSTAG_AREAINFORMATION , - 1 , - 1 , TIFF_UNDEFINED , 0 , TIFF_SETGET_C16_UINT8 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 1 , " AreaInformation " , NULL } ,
{ GPSTAG_DATESTAMP , 11 , 11 , TIFF_ASCII , 0 , TIFF_SETGET_ASCII , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " DateStamp " , NULL } ,
{ GPSTAG_DIFFERENTIAL , 1 , 1 , TIFF_SHORT , 0 , TIFF_SETGET_UINT16 , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " Differential " , NULL } ,
{ GPSTAG_GPSHPOSITIONINGERROR , 1 , 1 , TIFF_RATIONAL , 0 , TIFF_SETGET_DOUBLE , TIFF_SETGET_UNDEFINED , FIELD_CUSTOM , 1 , 0 , " HorizontalPositioningError " , NULL }
} ;
static const TIFFFieldArray
tiffFieldArray = { tfiatImage , 0 , TIFFArrayCount ( tiffFields ) , ( TIFFField * ) tiffFields } ;
static const TIFFFieldArray
exifFieldArray = { tfiatExif , 0 , TIFFArrayCount ( exifFields ) , ( TIFFField * ) exifFields } ;
static const TIFFFieldArray
gpsFieldArray = { tfiatGps , 0 , TIFFArrayCount ( gpsFields ) , ( TIFFField * ) gpsFields } ;
/*
* We have our own local lfind ( ) equivalent to avoid subtle differences
@ -313,6 +405,12 @@ _TIFFGetExifFields(void)
return ( & exifFieldArray ) ;
}
const TIFFFieldArray *
_TIFFGetGpsFields ( void )
{
return ( & gpsFieldArray ) ;
}
void
_TIFFSetupFields ( TIFF * tif , const TIFFFieldArray * fieldarray )
{
@ -502,6 +600,82 @@ _TIFFDataSize(TIFFDataType type)
}
}
/*
* Rational2Double :
* Return size of TIFFSetGetFieldType in bytes .
*
* XXX : TIFF_RATIONAL values for FIELD_CUSTOM are stored internally as 4 - byte float .
* However , some of them should be stored internally as 8 - byte double .
* This is now managed by the SetGetField of the tag - definition !
*/
int
_TIFFSetGetFieldSize ( TIFFSetGetFieldType setgettype )
{
switch ( setgettype )
{
case TIFF_SETGET_UNDEFINED :
case TIFF_SETGET_ASCII :
case TIFF_SETGET_C0_ASCII :
case TIFF_SETGET_C16_ASCII :
case TIFF_SETGET_C32_ASCII :
case TIFF_SETGET_OTHER :
return 0 ;
case TIFF_SETGET_UINT8 :
case TIFF_SETGET_SINT8 :
case TIFF_SETGET_C0_UINT8 :
case TIFF_SETGET_C0_SINT8 :
case TIFF_SETGET_C16_UINT8 :
case TIFF_SETGET_C16_SINT8 :
case TIFF_SETGET_C32_UINT8 :
case TIFF_SETGET_C32_SINT8 :
return 1 ;
case TIFF_SETGET_UINT16 :
case TIFF_SETGET_SINT16 :
case TIFF_SETGET_C0_UINT16 :
case TIFF_SETGET_C0_SINT16 :
case TIFF_SETGET_C16_UINT16 :
case TIFF_SETGET_C16_SINT16 :
case TIFF_SETGET_C32_UINT16 :
case TIFF_SETGET_C32_SINT16 :
return 2 ;
case TIFF_SETGET_INT :
case TIFF_SETGET_UINT32 :
case TIFF_SETGET_SINT32 :
case TIFF_SETGET_FLOAT :
case TIFF_SETGET_UINT16_PAIR :
case TIFF_SETGET_C0_UINT32 :
case TIFF_SETGET_C0_SINT32 :
case TIFF_SETGET_C0_FLOAT :
case TIFF_SETGET_C16_UINT32 :
case TIFF_SETGET_C16_SINT32 :
case TIFF_SETGET_C16_FLOAT :
case TIFF_SETGET_C32_UINT32 :
case TIFF_SETGET_C32_SINT32 :
case TIFF_SETGET_C32_FLOAT :
return 4 ;
case TIFF_SETGET_UINT64 :
case TIFF_SETGET_SINT64 :
case TIFF_SETGET_DOUBLE :
case TIFF_SETGET_IFD8 :
case TIFF_SETGET_C0_UINT64 :
case TIFF_SETGET_C0_SINT64 :
case TIFF_SETGET_C0_DOUBLE :
case TIFF_SETGET_C0_IFD8 :
case TIFF_SETGET_C16_UINT64 :
case TIFF_SETGET_C16_SINT64 :
case TIFF_SETGET_C16_DOUBLE :
case TIFF_SETGET_C16_IFD8 :
case TIFF_SETGET_C32_UINT64 :
case TIFF_SETGET_C32_SINT64 :
case TIFF_SETGET_C32_DOUBLE :
case TIFF_SETGET_C32_IFD8 :
return 8 ;
default :
return 0 ;
}
} /*-- _TIFFSetGetFieldSize --- */
const TIFFField *
TIFFFindField ( TIFF * tif , uint32 tag , TIFFDataType dt )
{
@ -1062,10 +1236,6 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
if ( tag = = TIFFTAG_LERC_PARAMETERS )
return 1 ;
break ;
case COMPRESSION_WEBP :
if ( tag = = TIFFTAG_PREDICTOR )
return 1 ;
break ;
}
return 0 ;
}