|
LibTIFF 4.7.2
TIFF library public API and implementation reference
|
Store directory values and register or query their descriptors. More...
Data Structures | |
| struct | TIFFTagValue |
| Store one custom field value and its descriptor. More... | |
| struct | TIFFDirEntry |
| Represent a parsed directory entry before value conversion. More... | |
| struct | TIFFEntryOffsetAndLength |
| Describe an external directory-value byte range. More... | |
| struct | TIFFDirectory |
| Store the current directory values and image traversal state. More... | |
| struct | _TIFFFieldArray |
| Describe a borrowed schema or owned compatibility batch. More... | |
| struct | _TIFFField |
| Describe a field's file type and internal argument contract. More... | |
Macros | |
| #define | FIELDSET_ITEMS 4 |
| Size of the presence bitmap in uint32_t words. | |
| #define | NOSTRIP ((uint32_t)(-1)) /* undefined state */ |
| Represent the absence of a current strip with UINT32_MAX. | |
| #define | NOTILE ((uint32_t)(-1)) /* undefined state */ |
| Represent the absence of a current tile with UINT32_MAX. | |
| #define | FIELD_IGNORE 0 |
| Mark a processed-but-discarded tag; bit zero is reserved. | |
| #define | FIELD_IMAGEDIMENSIONS 1 |
| Index the image dimensions presence bit; not an on-disk tag number. | |
| #define | FIELD_TILEDIMENSIONS 2 |
| Index the tile dimensions presence bit; not an on-disk tag number. | |
| #define | FIELD_RESOLUTION 3 |
| Index the resolution presence bit; not an on-disk tag number. | |
| #define | FIELD_POSITION 4 |
| Index the position presence bit; not an on-disk tag number. | |
| #define | FIELD_SUBFILETYPE 5 |
| Index the subfile type presence bit; not an on-disk tag number. | |
| #define | FIELD_BITSPERSAMPLE 6 |
| Index the bits per sample presence bit; not an on-disk tag number. | |
| #define | FIELD_COMPRESSION 7 |
| Index the compression presence bit; not an on-disk tag number. | |
| #define | FIELD_PHOTOMETRIC 8 |
| Index the photometric presence bit; not an on-disk tag number. | |
| #define | FIELD_THRESHHOLDING 9 |
| Index the thresholding presence bit; not an on-disk tag number. | |
| #define | FIELD_FILLORDER 10 |
| Index the fill order presence bit; not an on-disk tag number. | |
| #define | FIELD_ORIENTATION 15 |
| Index the orientation presence bit; not an on-disk tag number. | |
| #define | FIELD_SAMPLESPERPIXEL 16 |
| Index the samples per pixel presence bit; not an on-disk tag number. | |
| #define | FIELD_ROWSPERSTRIP 17 |
| Index the rows per strip presence bit; not an on-disk tag number. | |
| #define | FIELD_MINSAMPLEVALUE 18 |
| Index the minimum sample value presence bit; not an on-disk tag number. | |
| #define | FIELD_MAXSAMPLEVALUE 19 |
| Index the maximum sample value presence bit; not an on-disk tag number. | |
| #define | FIELD_PLANARCONFIG 20 |
| Index the planar configuration presence bit; not an on-disk tag number. | |
| #define | FIELD_RESOLUTIONUNIT 22 |
| Index the resolution unit presence bit; not an on-disk tag number. | |
| #define | FIELD_PAGENUMBER 23 |
| Index the page number presence bit; not an on-disk tag number. | |
| #define | FIELD_STRIPBYTECOUNTS 24 |
| Index the strile byte counts presence bit; not an on-disk tag number. | |
| #define | FIELD_STRIPOFFSETS 25 |
| Index the strile offsets presence bit; not an on-disk tag number. | |
| #define | FIELD_COLORMAP 26 |
| Index the colormap presence bit; not an on-disk tag number. | |
| #define | FIELD_EXTRASAMPLES 31 |
| Index the extra samples presence bit; not an on-disk tag number. | |
| #define | FIELD_SAMPLEFORMAT 32 |
| Index the sample format presence bit; not an on-disk tag number. | |
| #define | FIELD_SMINSAMPLEVALUE 33 |
| Index the per-sample minimum presence bit; not an on-disk tag number. | |
| #define | FIELD_SMAXSAMPLEVALUE 34 |
| Index the per-sample maximum presence bit; not an on-disk tag number. | |
| #define | FIELD_IMAGEDEPTH 35 |
| Index the image depth presence bit; not an on-disk tag number. | |
| #define | FIELD_TILEDEPTH 36 |
| Index the tile depth presence bit; not an on-disk tag number. | |
| #define | FIELD_HALFTONEHINTS 37 |
| Index the halftone hints presence bit; not an on-disk tag number. | |
| #define | FIELD_YCBCRSUBSAMPLING 39 |
| Index the YCbCr subsampling presence bit; not an on-disk tag number. | |
| #define | FIELD_YCBCRPOSITIONING 40 |
| Index the YCbCr positioning presence bit; not an on-disk tag number. | |
| #define | FIELD_REFBLACKWHITE 41 |
| Index the reference black/white presence bit; not an on-disk tag number. | |
| #define | FIELD_TRANSFERFUNCTION 44 |
| Index the transfer function presence bit; not an on-disk tag number. | |
| #define | FIELD_INKNAMES 46 |
| Index the ink names presence bit; not an on-disk tag number. | |
| #define | FIELD_SUBIFD 49 |
| Index the child IFD presence bit; not an on-disk tag number. | |
| #define | FIELD_NUMBEROFINKS 50 |
| Index the number of inks presence bit; not an on-disk tag number. | |
| #define | FIELD_CODEC 66 /* base of codec-private tags */ |
| Start the range reserved for codec-private presence bits. | |
| #define | FIELD_PSEUDO 0 |
| Share bit zero with FIELD_IGNORE for pseudo-tags. | |
| #define | FIELD_LAST (32 * FIELDSET_ITEMS - 1) |
| Largest valid presence bit index in the bitmap. | |
| #define | BITn(n) (1U << ((n) & 0x1f)) |
| Construct a one-bit mask within a 32-bit presence word. | |
| #define | BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n) / 32]) |
| Select the lvalue word containing a presence bit. | |
| #define | TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field)) |
| Test a directory presence bit. | |
| #define | TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field)) |
| Set a directory presence bit. | |
| #define | TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field)) |
| Clear a directory presence bit. | |
| #define | FieldSet(fields, f) (fields[(f) / 32] & BITn(f)) |
| Test a bit in a supplied presence bitmap. | |
| #define | ResetFieldBit(fields, f) (fields[(f) / 32] &= ~BITn(f)) |
| Clear a bit in a supplied presence bitmap. | |
Functions | |
| const TIFFFieldArray * | _TIFFGetFields (void) |
| Return the built-in image field schema. | |
| const TIFFFieldArray * | _TIFFGetExifFields (void) |
| Return the built-in EXIF field schema. | |
| const TIFFFieldArray * | _TIFFGetGpsFields (void) |
| Return the built-in GPS field schema. | |
| void | _TIFFSetupFields (TIFF *tif, const TIFFFieldArray *fieldarray) |
| Replace the registered field-pointer table with a schema. | |
| void | _TIFFPrintFieldInfo (TIFF *tif, FILE *fd) |
| Print the registered field metadata to a stream. | |
| int | _TIFFMergeFields (TIFF *tif, const TIFFField info[], uint32_t n) |
| Merge borrowed field definitions into the lookup table. | |
| const TIFFField * | _TIFFFindOrRegisterField (TIFF *tif, uint32_t tag, TIFFDataType dt) |
| Find a typed field or register an anonymous replacement. | |
| TIFFField * | _TIFFCreateAnonField (TIFF *tif, uint32_t tag, TIFFDataType field_type) |
| Allocate a counted anonymous field descriptor. | |
| int | _TIFFCheckFieldIsValidForCodec (TIFF *tif, ttag_t tag) |
| Filter recognised codec-specific tags against current compression. | |
| static void * | td_lfind (const void *key, const void *base, size_t *nmemb, size_t size, int(*compar)(const void *, const void *)) |
| Find the first equal fixed-width element by linear search. | |
| static int | tagCompare (const void *a, const void *b) |
| Compare field pointers by tag number and reverse type order. | |
| static int | tagNameCompare (const void *a, const void *b) |
| Compare field pointers by case-sensitive name and reverse type order. | |
| static const TIFFField * | _TIFFFindFieldByName (TIFF *tif, const char *field_name, TIFFDataType dt) |
| Find a registered descriptor by name and file type. | |
| static TIFFSetGetFieldType | _TIFFSetGetType (TIFFDataType type, short count, unsigned char passcount) |
| Translate legacy type/count metadata into a set/get representation. | |
Variables | |
| static TIFFExtendProc | _TIFFextender = (TIFFExtendProc)NULL |
| Store the process-wide borrowed directory-extension callback. | |
| static const TIFFField | tiffFields [] |
| Describe the built-in image fields and their argument representations. | |
| static const TIFFField | exifFields [] |
| Describe the built-in EXIF fields and their argument representations. | |
| static const TIFFField | gpsFields [] |
| Describe the built-in GPS fields and their argument representations. | |
| static const TIFFFieldArray | tiffFieldArray |
| Wrap the static image field schema. | |
| static const TIFFFieldArray | exifFieldArray |
| Wrap the static EXIF field schema. | |
| static const TIFFFieldArray | gpsFieldArray |
| Wrap the static GPS field schema. | |
Store directory values and register or query their descriptors.
| #define BITFIELDn | ( | tif, | |
| n | |||
| ) | ((tif)->tif_dir.td_fieldsset[(n) / 32]) |
Select the lvalue word containing a presence bit.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in,out] | tif | Non-NULL live handle; expression is evaluated once. |
| [in] | n | Index from zero through FIELD_LAST; evaluated once. |
| #define BITn | ( | n | ) | (1U << ((n) & 0x1f)) |
Construct a one-bit mask within a 32-bit presence word.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in] | n | Nonnegative bit index; low five bits select the mask. |
| #define FIELD_BITSPERSAMPLE 6 |
| #define FIELD_CODEC 66 /* base of codec-private tags */ |
| #define FIELD_COLORMAP 26 |
| #define FIELD_COMPRESSION 7 |
| #define FIELD_EXTRASAMPLES 31 |
| #define FIELD_FILLORDER 10 |
| #define FIELD_HALFTONEHINTS 37 |
| #define FIELD_IGNORE 0 |
| #define FIELD_IMAGEDEPTH 35 |
| #define FIELD_IMAGEDIMENSIONS 1 |
| #define FIELD_INKNAMES 46 |
| #define FIELD_LAST (32 * FIELDSET_ITEMS - 1) |
| #define FIELD_MAXSAMPLEVALUE 19 |
| #define FIELD_MINSAMPLEVALUE 18 |
| #define FIELD_NUMBEROFINKS 50 |
| #define FIELD_ORIENTATION 15 |
| #define FIELD_PAGENUMBER 23 |
| #define FIELD_PHOTOMETRIC 8 |
| #define FIELD_PLANARCONFIG 20 |
| #define FIELD_POSITION 4 |
| #define FIELD_PSEUDO 0 |
Share bit zero with FIELD_IGNORE for pseudo-tags.
Getters skip the presence test because of the pseudo-tag number range (isPseudoTag()), not because of this value; bit zero may still be set by the generic setter.
| #define FIELD_REFBLACKWHITE 41 |
| #define FIELD_RESOLUTION 3 |
| #define FIELD_RESOLUTIONUNIT 22 |
| #define FIELD_ROWSPERSTRIP 17 |
| #define FIELD_SAMPLEFORMAT 32 |
| #define FIELD_SAMPLESPERPIXEL 16 |
| #define FIELD_SMAXSAMPLEVALUE 34 |
| #define FIELD_SMINSAMPLEVALUE 33 |
| #define FIELD_STRIPBYTECOUNTS 24 |
| #define FIELD_STRIPOFFSETS 25 |
| #define FIELD_SUBFILETYPE 5 |
| #define FIELD_SUBIFD 49 |
| #define FIELD_THRESHHOLDING 9 |
| #define FIELD_TILEDEPTH 36 |
| #define FIELD_TILEDIMENSIONS 2 |
| #define FIELD_TRANSFERFUNCTION 44 |
| #define FIELD_YCBCRPOSITIONING 40 |
| #define FIELD_YCBCRSUBSAMPLING 39 |
| #define FieldSet | ( | fields, | |
| f | |||
| ) | (fields[(f) / 32] & BITn(f)) |
Test a bit in a supplied presence bitmap.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in] | fields | Readable subscriptable bitmap expression with sufficient words; evaluated once. Parenthesise expressions that need it before subscripting. |
| [in] | f | Valid nonnegative bit index; evaluated twice, so avoid side effects. |
| #define FIELDSET_ITEMS 4 |
| #define NOSTRIP ((uint32_t)(-1)) /* undefined state */ |
| #define NOTILE ((uint32_t)(-1)) /* undefined state */ |
| #define ResetFieldBit | ( | fields, | |
| f | |||
| ) | (fields[(f) / 32] &= ~BITn(f)) |
Clear a bit in a supplied presence bitmap.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in,out] | fields | Writable bitmap with sufficient words; evaluated once. |
| [in] | f | Valid nonnegative bit index; evaluated twice, so avoid side effects. |
Clear a directory presence bit.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in,out] | tif | Non-NULL handle expression, evaluated once. |
| [in] | field | Valid bit index; evaluated twice, so avoid side effects. |
Test a directory presence bit.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in] | tif | Non-NULL handle expression, evaluated once. |
| [in] | field | Valid bit index; evaluated twice, so avoid side effects. |
Set a directory presence bit.
No allocation, ownership change, diagnostic, or locking occurs. Arguments must identify valid bitmap storage.
| [in,out] | tif | Non-NULL handle expression, evaluated once. |
| [in] | field | Valid bit index; evaluated twice, so avoid side effects. |
| enum TIFFFieldArrayType |
| enum TIFFSetGetFieldType |
Encode the internal value and variadic count representation.
The suffix selects element storage, not an on-disk TIFFDataType. C0 uses an array with implicit/fixed count, C16 passes a 16-bit count, and C32 passes a 32-bit count. Unprefixed numeric types normally select scalar values. Getters receive output pointers; setters apply C default argument promotions to scalar values. Built-in exceptions still require tag- specific dispatch; see Tag arguments. These encodings alone cannot describe every calling convention.
Filter recognised codec-specific tags against current compression.
Checks the explicit predictor/JPEG/OJPEG/CCITT/LERC tag list and whether its associated codec is configured. All unlisted tags pass without schema validation. Does not allocate, mutate state, or emit diagnostics.
| [in] | tif | Non-NULL live handle with current compression. |
| [in] | tag | Tag identifier to filter. |
Definition at line 1483 of file tif_dirinfo.c.
References COMPRESSION_ADOBE_DEFLATE, COMPRESSION_CCITTFAX3, COMPRESSION_CCITTFAX4, COMPRESSION_CCITTRLE, COMPRESSION_CCITTRLEW, COMPRESSION_DEFLATE, COMPRESSION_JBIG, COMPRESSION_JPEG, COMPRESSION_LERC, COMPRESSION_LZMA, COMPRESSION_LZW, COMPRESSION_NEXT, COMPRESSION_OJPEG, COMPRESSION_PACKBITS, COMPRESSION_PIXARLOG, COMPRESSION_SGILOG, COMPRESSION_SGILOG24, COMPRESSION_THUNDERSCAN, COMPRESSION_ZSTD, TIFFDirectory::td_compression, tiff::tif_dir, TIFFIsCODECConfigured(), TIFFTAG_BADFAXLINES, TIFFTAG_CLEANFAXDATA, TIFFTAG_CONSECUTIVEBADFAXLINES, TIFFTAG_GROUP3OPTIONS, TIFFTAG_GROUP4OPTIONS, TIFFTAG_JPEGACTABLES, TIFFTAG_JPEGDCTABLES, TIFFTAG_JPEGIFBYTECOUNT, TIFFTAG_JPEGIFOFFSET, TIFFTAG_JPEGPROC, TIFFTAG_JPEGQTABLES, TIFFTAG_JPEGRESTARTINTERVAL, TIFFTAG_JPEGTABLES, TIFFTAG_LERC_PARAMETERS, and TIFFTAG_PREDICTOR.
Referenced by TIFFReadDirectory().
|
extern |
Allocate a counted anonymous field descriptor.
Allocates a descriptor and a 32-byte generated name with the matching Ext allocator. Uses FIELD_CUSTOM, TIFF_VARIABLE2, a C32 representation, and changeable/pass-count flags. It does not register the descriptor. Before registration the caller owns both allocations and must release name then descriptor with _TIFFfreeExt(tif,...); registered anonymous storage is released by field-table/handle cleanup. Name-allocation failure frees the descriptor. Allocation-policy diagnostics may occur; raw exhaustion can be silent.
| [in,out] | tif | Non-NULL live TIFF handle; accessed without internal locking. |
| [in] | tag | Unknown tag identifier. |
| [in] | field_type | On-disk data type; unsupported values receive an undefined representation. |
Definition at line 1109 of file tif_dirinfo.c.
References _TIFFfreeExt(), _TIFFmallocExt(), _TIFFmemset(), _TIFFField::field_anonymous, _TIFFField::field_bit, FIELD_CUSTOM, _TIFFField::field_name, _TIFFField::field_oktochange, _TIFFField::field_passcount, _TIFFField::field_readcount, _TIFFField::field_subfields, _TIFFField::field_tag, _TIFFField::field_type, _TIFFField::field_writecount, _TIFFField::set_get_field_type, TIFF_ASCII, TIFF_BYTE, TIFF_DOUBLE, TIFF_FLOAT, TIFF_IFD, TIFF_IFD8, TIFF_LONG, TIFF_LONG8, TIFF_NOTYPE, TIFF_RATIONAL, TIFF_SBYTE, TIFF_SETGET_C32_ASCII, TIFF_SETGET_C32_DOUBLE, TIFF_SETGET_C32_FLOAT, TIFF_SETGET_C32_IFD8, TIFF_SETGET_C32_SINT16, TIFF_SETGET_C32_SINT32, TIFF_SETGET_C32_SINT64, TIFF_SETGET_C32_SINT8, TIFF_SETGET_C32_UINT16, TIFF_SETGET_C32_UINT32, TIFF_SETGET_C32_UINT64, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, TIFF_SHORT, TIFF_SLONG, TIFF_SLONG8, TIFF_SRATIONAL, TIFF_SSHORT, TIFF_UNDEFINED, TIFF_VARIABLE2, and TRUE.
Referenced by _TIFFFindOrRegisterField(), TIFFReadCustomDirectory(), and TIFFReadDirectory().
|
static |
Find a registered descriptor by name and file type.
The result is borrowed; do not free or modify it. Directory field-table replacement or handle cleanup can invalidate it, particularly for anonymous and legacy descriptors. Lookup updates the handle's field cache but does not register a missing tag. Uses a linear name search because the table is sorted by tag. No diagnostic is emitted.
| [in,out] | tif | Non-NULL live TIFF handle; accessed without internal locking. |
| [in] | field_name | Non-NULL case-sensitive terminated name. |
| [in] | dt | Required type, or TIFF_ANY. |
Definition at line 1019 of file tif_dirinfo.c.
References _TIFFField::field_name, _TIFFField::field_type, streq, tagNameCompare(), td_lfind(), tiff::tif_fields, tiff::tif_foundfield, tiff::tif_nfields, TIFF_ANY, TIFF_NOTYPE, and TIFF_SETGET_UNDEFINED.
Referenced by TIFFFieldWithName().
|
extern |
Find a typed field or register an anonymous replacement.
Existing matches remain borrowed. If absent, allocates an anonymous descriptor/name and merges it into the handle table, which owns it on success. Merge failure follows _TIFFMergeFields() state changes and does not free the newly allocated descriptor/name in this implementation. No new ownership is returned on failure; this path can leak. Diagnostics follow the allocation/merge helpers. Existing tag numbers prevent a different type from actually being added, so use only for genuinely unknown tags or matching registered types (see
| [in,out] | tif | Non-NULL live TIFF handle; accessed without internal locking. |
| [in] | tag | Tag number to find/register. |
| [in] | dt | Required on-disk type. |
Definition at line 1092 of file tif_dirinfo.c.
References _TIFFCreateAnonField(), _TIFFMergeFields(), and TIFFFindField().
|
extern |
Return the built-in EXIF field schema.
Returns static borrowed storage for the library lifetime; do not modify/free the array or its descriptors. No allocation, diagnostics, or state changes occur.
Definition at line 634 of file tif_dirinfo.c.
References exifFieldArray.
Referenced by TIFFCreateEXIFDirectory(), and TIFFReadEXIFDirectory().
|
extern |
Return the built-in image field schema.
Returns static borrowed storage for the library lifetime; do not modify/free the array or its descriptors. No allocation, diagnostics, or state changes occur.
Definition at line 632 of file tif_dirinfo.c.
References tiffFieldArray.
Referenced by TIFFDefaultDirectory(), and TIFFReadCustomDirectory().
|
extern |
Return the built-in GPS field schema.
Returns static borrowed storage for the library lifetime; do not modify/free the array or its descriptors. No allocation, diagnostics, or state changes occur.
Definition at line 636 of file tif_dirinfo.c.
References gpsFieldArray.
Referenced by TIFFCreateGPSDirectory(), and TIFFReadGPSDirectory().
Merge borrowed field definitions into the lookup table.
Clears the lookup cache and grows/sorts the owned pointer table. Stores descriptor pointers, not copies; names and records must remain live and stable while registered. Existing tag numbers win regardless of type. Allocation failure is diagnosed and leaves the existing table and tif_nfields unchanged, so no fields are added. No directory values are created.
| [in,out] | tif | Non-NULL live TIFF handle; accessed without internal locking. |
| [in] | info | Readable array of n long-lived descriptors. |
| [in] | n | Positive descriptor count; allocation product and int result must be representable. |
Definition at line 726 of file tif_dirinfo.c.
References _TIFFCheckMalloc(), _TIFFCheckRealloc(), tagCompare(), tiff::tif_fields, tiff::tif_foundfield, tiff::tif_nfields, TIFF_ANY, TIFFErrorExtR(), and TIFFFindField().
Referenced by _TIFFFindOrRegisterField(), _TIFFSetupFields(), TIFFInitJPEG(), TIFFInitLERC(), TIFFInitLZMA(), TIFFInitOJPEG(), TIFFInitPixarLog(), TIFFInitSGILog(), TIFFInitWebP(), TIFFInitZIP(), TIFFInitZSTD(), TIFFMergeFieldInfo(), TIFFPredictorInit(), TIFFReadCustomDirectory(), and TIFFReadDirectory().
|
extern |
Print the registered field metadata to a stream.
Writes diagnostic text without modifying the field table or taking ownership of the stream. Does not check/report stdio failures and returns no status.
| [in] | tif | Non-NULL live handle with valid field names. |
| [in,out] | fd | Non-NULL writable borrowed stdio stream. |
Definition at line 774 of file tif_dirinfo.c.
References _TIFFField::field_bit, _TIFFField::field_name, _TIFFField::field_oktochange, _TIFFField::field_passcount, _TIFFField::field_readcount, _TIFFField::field_tag, _TIFFField::field_type, _TIFFField::field_writecount, tiff::tif_fields, tiff::tif_name, and tiff::tif_nfields.
|
static |
Translate legacy type/count metadata into a set/get representation.
Maps scalar, fixed/implicit arrays, C16, and C32 patterns without allocation or state changes. Legacy rationals use float storage; IFD types use IFD8 argument representation. This is a metadata mapping, not validation of all runtime tag exceptions.
| [in] | type | On-disk data type. |
| [in] | count | Fixed count or TIFF_VARIABLE/TIFF_VARIABLE2/TIFF_SPP sentinel. |
| [in] | passcount | One to pass a count; zero for an implicit count. |
Definition at line 1219 of file tif_dirinfo.c.
References TIFF_ASCII, TIFF_BYTE, TIFF_DOUBLE, TIFF_FLOAT, TIFF_IFD, TIFF_IFD8, TIFF_LONG, TIFF_LONG8, TIFF_NOTYPE, TIFF_RATIONAL, TIFF_SBYTE, TIFF_SETGET_ASCII, TIFF_SETGET_C0_ASCII, TIFF_SETGET_C0_DOUBLE, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_C0_IFD8, TIFF_SETGET_C0_SINT16, TIFF_SETGET_C0_SINT32, TIFF_SETGET_C0_SINT64, TIFF_SETGET_C0_SINT8, TIFF_SETGET_C0_UINT16, TIFF_SETGET_C0_UINT32, TIFF_SETGET_C0_UINT64, TIFF_SETGET_C0_UINT8, TIFF_SETGET_C16_ASCII, TIFF_SETGET_C16_DOUBLE, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_C16_IFD8, TIFF_SETGET_C16_SINT16, TIFF_SETGET_C16_SINT32, TIFF_SETGET_C16_SINT64, TIFF_SETGET_C16_SINT8, TIFF_SETGET_C16_UINT16, TIFF_SETGET_C16_UINT32, TIFF_SETGET_C16_UINT64, TIFF_SETGET_C16_UINT8, TIFF_SETGET_C32_ASCII, TIFF_SETGET_C32_DOUBLE, TIFF_SETGET_C32_FLOAT, TIFF_SETGET_C32_IFD8, TIFF_SETGET_C32_SINT16, TIFF_SETGET_C32_SINT32, TIFF_SETGET_C32_SINT64, TIFF_SETGET_C32_SINT8, TIFF_SETGET_C32_UINT16, TIFF_SETGET_C32_UINT32, TIFF_SETGET_C32_UINT64, TIFF_SETGET_C32_UINT8, TIFF_SETGET_DOUBLE, TIFF_SETGET_FLOAT, TIFF_SETGET_IFD8, TIFF_SETGET_SINT16, TIFF_SETGET_SINT32, TIFF_SETGET_SINT64, TIFF_SETGET_SINT8, TIFF_SETGET_UINT16, TIFF_SETGET_UINT32, TIFF_SETGET_UINT64, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, TIFF_SHORT, TIFF_SLONG, TIFF_SLONG8, TIFF_SRATIONAL, TIFF_SSHORT, TIFF_UNDEFINED, TIFF_VARIABLE, and TIFF_VARIABLE2.
Referenced by TIFFMergeFieldInfo().
|
extern |
Replace the registered field-pointer table with a schema.
Disposes old anonymous descriptors/names and the old pointer array when the table is non-empty, then merges the supplied borrowed descriptors. Ordinary field descriptors and names remain externally owned. Allocation failure is diagnosed without restoring the old table; this void interface cannot report status. Caller must dispose any directory values that still refer to removed descriptors before replacement.
| [in,out] | tif | Non-NULL live TIFF handle; accessed without internal locking. |
| [in] | fieldarray | Non-NULL schema whose descriptors and names remain live while registered. |
Definition at line 638 of file tif_dirinfo.c.
References _TIFFfreeExt(), _TIFFMergeFields(), _TIFFFieldArray::count, _TIFFField::field_bit, FIELD_CUSTOM, _TIFFField::field_name, _TIFFFieldArray::fields, tiff::tif_fields, tiff::tif_nfields, TIFFErrorExtR(), and TIFFFieldIsAnonymous().
Referenced by TIFFCreateCustomDirectory(), TIFFDefaultDirectory(), and TIFFReadCustomDirectory().
|
static |
Compare field pointers by tag number and reverse type order.
TIFF_ANY in the left operand matches any type after the primary key matches. Borrows inputs without allocation or mutation; used for lookup and sorting.
| [in] | a | Pointer to a readable TIFFField pointer; left/key operand. |
| [in] | b | Pointer to a readable TIFFField pointer; right/element operand. |
Definition at line 685 of file tif_dirinfo.c.
References _TIFFField::field_tag, _TIFFField::field_type, and TIFF_ANY.
Referenced by _TIFFMergeFields(), and TIFFFindField().
|
static |
Compare field pointers by case-sensitive name and reverse type order.
TIFF_ANY in the left operand matches any type after the primary key matches. Borrows inputs without allocation or mutation; used for lookup. Names must be non-NULL terminated strings.
| [in] | a | Pointer to a readable TIFFField pointer; left/key operand. |
| [in] | b | Pointer to a readable TIFFField pointer; right/element operand. |
Definition at line 712 of file tif_dirinfo.c.
References _TIFFField::field_name, _TIFFField::field_type, and TIFF_ANY.
Referenced by _TIFFFindFieldByName().
|
static |
Find the first equal fixed-width element by linear search.
Borrows the array and comparator; does not allocate or modify array storage/count. The comparator must return zero on equality and must not mutate/destroy the search storage. Caller ensures the extent product is representable.
| [in] | key | Borrowed comparator key. |
| [in] | base | Readable contiguous storage for *nmemb elements. |
| [in] | nmemb | Non-NULL element-count pointer; not changed. |
| [in] | size | Positive element width in bytes. |
| [in] | compar | Non-NULL comparator invoked synchronously with key and each element. |
Definition at line 619 of file tif_dirinfo.c.
Referenced by _TIFFFindFieldByName().
|
static |
Store the process-wide borrowed directory-extension callback.
Replaced by TIFFSetTagExtender(); initialisation invokes it synchronously without locking. NULL disables extension.
Definition at line 2230 of file tif_dir.c.
Referenced by TIFFDefaultDirectory(), and TIFFSetTagExtender().
|
static |
Wrap the static EXIF field schema.
Borrowed immutable schema with zero allocated_size; do not release through dynamic field-array cleanup.
Definition at line 79 of file tif_dirinfo.c.
Referenced by _TIFFGetExifFields(), and TIFFCreateEXIFDirectory().
|
static |
Describe the built-in EXIF fields and their argument representations.
Static borrowed descriptors/names; registration stores pointers into this array. Entries encode file type, count rules, field bits, and set/get representation. Special built-in dispatch can override the generic argument shape.
Definition at line 403 of file tif_dirinfo.c.
|
static |
Wrap the static GPS field schema.
Borrowed immutable schema with zero allocated_size; do not release through dynamic field-array cleanup.
Definition at line 80 of file tif_dirinfo.c.
Referenced by _TIFFGetGpsFields(), and TIFFCreateGPSDirectory().
|
static |
Describe the built-in GPS fields and their argument representations.
Static borrowed descriptors/names; registration stores pointers into this array. Entries encode file type, count rules, field bits, and set/get representation. Special built-in dispatch can override the generic argument shape.
Definition at line 504 of file tif_dirinfo.c.
|
static |
Wrap the static image field schema.
Borrowed immutable schema with zero allocated_size; do not release through dynamic field-array cleanup.
Definition at line 78 of file tif_dirinfo.c.
Referenced by _TIFFGetFields(), and TIFFDefaultDirectory().
|
static |
Describe the built-in image fields and their argument representations.
Static borrowed descriptors/names; registration stores pointers into this array. Entries encode file type, count rules, field bits, and set/get representation. Special built-in dispatch can override the generic argument shape.
Definition at line 111 of file tif_dirinfo.c.