LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
tif_dir.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1988-1997 Sam Leffler
3 * Copyright (c) 1991-1997 Silicon Graphics, Inc.
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and
6 * its documentation for any purpose is hereby granted without fee, provided
7 * that (i) the above copyright notices and this permission notice appear in
8 * all copies of the software and related documentation, and (ii) the names of
9 * Sam Leffler and Silicon Graphics may not be used in any advertising or
10 * publicity relating to the software without the specific, prior written
11 * permission of Sam Leffler and Silicon Graphics.
12 *
13 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 * OF THIS SOFTWARE.
23 */
24
25#ifndef _TIFFDIR_
26#define _TIFFDIR_
27
28#include "tiff.h"
29#include "tiffio.h"
30
45typedef struct
46{
54 int count;
56 void *value;
58
59/*
60 * TIFF Image File Directories are comprised of a table of field
61 * descriptors of the form shown below. The table is sorted in
62 * ascending order by tag. The values associated with each entry are
63 * disjoint and may appear anywhere in the file (so long as they are
64 * placed on a word boundary).
65 *
66 * If the value is 4 bytes or less, in ClassicTIFF, or 8 bytes or less in
67 * BigTIFF, then it is placed in the offset field to save space. If so,
68 * it is left-justified in the offset field.
69 */
81typedef struct
82{
84 uint16_t tdir_tag;
86 uint16_t tdir_type;
87
89 uint64_t tdir_count;
90
92 union
93 {
95 uint16_t toff_short;
97 uint32_t toff_long;
99 uint64_t toff_long8;
100 } tdir_offset;
109 uint8_t tdir_ignore;
111
119typedef struct
120{
122 uint64_t offset;
124 uint64_t length;
125} TIFFEntryOffsetAndLength; /* auxiliary for evaluating size of IFD data */
126
127/*
128 * Internal format of a TIFF directory entry.
129 */
142typedef struct
143{
148#define FIELDSET_ITEMS 4
149 /* bit vector of fields that are set */
151 uint32_t td_fieldsset[FIELDSET_ITEMS];
152
160 uint32_t td_tilewidth;
164 uint32_t td_tiledepth;
178 uint16_t td_fillorder;
206 uint16_t td_pagenumber[2];
218 uint16_t *td_colormap[3];
230 uint16_t td_halftonehints[2];
237 uint16_t *td_sampleinfo;
238 /* strip support */
240 uint32_t td_row;
242 uint32_t td_curstrip;
243
250#define NOSTRIP ((uint32_t)(-1)) /* undefined state */
251 /* tiling support */
253 uint32_t td_col;
254
256 uint32_t td_curtile;
257
264#define NOTILE ((uint32_t)(-1)) /* undefined state */
265 /* even though the name is misleading, td_stripsperimage is the number
266 * of striles (=strips or tiles) per plane, and td_nstrips the total
267 * number of striles */
271 uint32_t td_nstrips;
287#ifdef STRIPBYTECOUNTSORTED_UNUSED
292 int td_stripbytecountsorted;
293#endif
294 /* Be aware that the parameters of td_stripoffset_entry and
295 * td_stripbytecount_entry are swapped but tdir_offset is not
296 * and has to be swapped when used. */
307 uint16_t td_nsubifd;
309 uint64_t *td_subifd;
310 /* YCbCr parameters */
312 uint16_t td_ycbcrsubsampling[2];
315 /* Colorimetry parameters */
320 uint16_t *td_transferfunction[3];
328 /* CMYK parameters */
341
349
355
359 unsigned char td_iswrittentofile;
360
361 /* LibTIFF writes all data that does not fit into the IFD entries directly
362 * after the IFD tag entry part. When reading, only the IFD data directly
363 * and continuously behind the IFD tags is taken into account for the IFD
364 * data size.*/
370
378
382
396
397/*
398 * Field flags used to indicate fields that have been set in a directory, and
399 * to reference fields when manipulating a directory.
400 */
401
402/*
403 * FIELD_IGNORE is used to signify tags that are to be processed but otherwise
404 * ignored. This permits antiquated tags to be quietly read and discarded.
405 * Note that a bit *is* allocated for ignored tags; this is understood by the
406 * directory reading logic which uses this fact to avoid special-case handling
407 */
412#define FIELD_IGNORE 0
413
414/* multi-item fields */
419#define FIELD_IMAGEDIMENSIONS 1
424#define FIELD_TILEDIMENSIONS 2
429#define FIELD_RESOLUTION 3
434#define FIELD_POSITION 4
435
436/* single-item fields */
441#define FIELD_SUBFILETYPE 5
446#define FIELD_BITSPERSAMPLE 6
451#define FIELD_COMPRESSION 7
456#define FIELD_PHOTOMETRIC 8
461#define FIELD_THRESHHOLDING 9
466#define FIELD_FILLORDER 10
471#define FIELD_ORIENTATION 15
476#define FIELD_SAMPLESPERPIXEL 16
481#define FIELD_ROWSPERSTRIP 17
487#define FIELD_MINSAMPLEVALUE 18
493#define FIELD_MAXSAMPLEVALUE 19
499#define FIELD_PLANARCONFIG 20
504#define FIELD_RESOLUTIONUNIT 22
509#define FIELD_PAGENUMBER 23
514#define FIELD_STRIPBYTECOUNTS 24
519#define FIELD_STRIPOFFSETS 25
524#define FIELD_COLORMAP 26
529#define FIELD_EXTRASAMPLES 31
534#define FIELD_SAMPLEFORMAT 32
539#define FIELD_SMINSAMPLEVALUE 33
544#define FIELD_SMAXSAMPLEVALUE 34
549#define FIELD_IMAGEDEPTH 35
554#define FIELD_TILEDEPTH 36
559#define FIELD_HALFTONEHINTS 37
564#define FIELD_YCBCRSUBSAMPLING 39
569#define FIELD_YCBCRPOSITIONING 40
575#define FIELD_REFBLACKWHITE 41
580#define FIELD_TRANSFERFUNCTION 44
585#define FIELD_INKNAMES 46
590#define FIELD_SUBIFD 49
595#define FIELD_NUMBEROFINKS 50
596/* FIELD_CUSTOM (see tiffio.h) 65 */
597/* end of support for well-known tags; codec-private tags follow */
602#define FIELD_CODEC 66 /* base of codec-private tags */
603
604/*
605 * Pseudo-tags don't normally need field bits since they are not written to an
606 * output file (by definition). The library also has express logic to always
607 * query a codec for a pseudo-tag so allocating a field bit for one is a
608 * waste. If codec wants to promote the notion of a pseudo-tag being ``set''
609 * or ``unset'' then it can do using internal state flags without polluting
610 * the field bit space defined for real tags.
611 */
620#define FIELD_PSEUDO 0
621
626#define FIELD_LAST (32 * FIELDSET_ITEMS - 1)
627
638#define BITn(n) (1U << ((n) & 0x1f))
650#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n) / 32])
662#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field))
675#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field))
688#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field))
689
705#define FieldSet(fields, f) (fields[(f) / 32] & BITn(f))
719#define ResetFieldBit(fields, f) (fields[(f) / 32] &= ~BITn(f))
720
733typedef enum
734{
840
841#if defined(__cplusplus)
842extern "C"
843{
844#endif
845
856 extern const TIFFFieldArray *_TIFFGetFields(void);
857
868 extern const TIFFFieldArray *_TIFFGetExifFields(void);
869
880 extern const TIFFFieldArray *_TIFFGetGpsFields(void);
881
898 extern void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *fieldarray);
899
911 extern void _TIFFPrintFieldInfo(TIFF *tif, FILE *fd);
912
930 extern int _TIFFFillStriles(TIFF *tif);
931
948
980
1045
1065 extern int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n);
1066
1091 extern const TIFFField *_TIFFFindOrRegisterField(TIFF *tif, uint32_t tag,
1092 TIFFDataType dt);
1093
1114 extern TIFFField *_TIFFCreateAnonField(TIFF *tif, uint32_t tag,
1115 TIFFDataType field_type);
1116
1130 extern int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag);
1156 extern int _TIFFCheckDirNumberAndOffset(TIFF *tif, tdir_t dirn,
1157 uint64_t diroff);
1174 extern int _TIFFGetDirNumberFromOffset(TIFF *tif, uint64_t diroff,
1175 tdir_t *dirn);
1189 extern int _TIFFGetOffsetFromDirNumber(TIFF *tif, tdir_t dirn,
1190 uint64_t *diroff);
1210 uint64_t diroff);
1211
1212#if defined(__cplusplus)
1213}
1214#endif
1215#endif /* _TIFFDIR_ */
int _TIFFRemoveEntryFromDirectoryListByOffset(TIFF *tif, uint64_t diroff)
Attempt to remove a shared directory-map entry by offset.
int _TIFFCheckDirNumberAndOffset(TIFF *tif, tdir_t dirn, uint64_t diroff)
Register or validate a chain index/offset pair for loop detection.
int _TIFFGetOffsetFromDirNumber(TIFF *tif, tdir_t dirn, uint64_t *diroff)
Resolve an index from the existing number-to-offset map.
int _TIFFGetDirNumberFromOffset(TIFF *tif, uint64_t diroff, tdir_t *dirn)
Resolve a directory offset using the chain maps.
void _TIFFResetTifDirAndInitStrileCounters(TIFFDirectory *td)
Zero directory storage and initialise traversal sentinels.
Definition tif_dir.c:2151
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n)
Merge borrowed field definitions into the lookup table.
TIFFField * _TIFFCreateAnonField(TIFF *tif, uint32_t tag, TIFFDataType field_type)
Allocate a counted anonymous field descriptor.
const TIFFField * _TIFFFindOrRegisterField(TIFF *tif, uint32_t tag, TIFFDataType dt)
Find a typed field or register an anonymous replacement.
const TIFFFieldArray * _TIFFGetFields(void)
Return the built-in image field schema.
void _TIFFPrintFieldInfo(TIFF *tif, FILE *fd)
Print the registered field metadata to a stream.
TIFFFieldArrayType
Identify the namespace described by a field array.
Definition tif_dir.h:937
void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *fieldarray)
Replace the registered field-pointer table with a schema.
const TIFFFieldArray * _TIFFGetGpsFields(void)
Return the built-in GPS field schema.
#define FIELDSET_ITEMS
Size of the presence bitmap in uint32_t words.
Definition tif_dir.h:148
int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
Filter recognised codec-specific tags against current compression.
TIFFSetGetFieldType
Encode the internal value and variadic count representation.
Definition tif_dir.h:734
const TIFFFieldArray * _TIFFGetExifFields(void)
Return the built-in EXIF field schema.
@ tfiatGps
EXIF GPS metadata-directory schema.
Definition tif_dir.h:943
@ tfiatOther
Other application/compatibility schema.
Definition tif_dir.h:946
@ tfiatImage
Main image-directory schema.
Definition tif_dir.h:939
@ tfiatExif
EXIF metadata-directory schema.
Definition tif_dir.h:941
@ TIFF_SETGET_C16_UINT8
Unsigned 8-bit array with 16-bit explicit count.
Definition tif_dir.h:792
@ TIFF_SETGET_C0_SINT64
Signed 64-bit array with implicit count.
Definition tif_dir.h:782
@ TIFF_SETGET_DOUBLE
Double scalar storage.
Definition tif_dir.h:758
@ TIFF_SETGET_SINT64
Signed 64-bit scalar storage.
Definition tif_dir.h:754
@ TIFF_SETGET_C32_SINT32
Signed 32-bit array with 32-bit explicit count.
Definition tif_dir.h:826
@ TIFF_SETGET_C16_FLOAT
Float array with 16-bit explicit count.
Definition tif_dir.h:808
@ TIFF_SETGET_UNDEFINED
Unsupported or unspecified argument representation.
Definition tif_dir.h:736
@ TIFF_SETGET_SINT8
Signed 8-bit scalar storage.
Definition tif_dir.h:742
@ TIFF_SETGET_C32_ASCII
Character array with 32-bit explicit count.
Definition tif_dir.h:814
@ TIFF_SETGET_INT
Promoted int scalar representation.
Definition tif_dir.h:762
@ TIFF_SETGET_C32_UINT8
Unsigned 8-bit array with 32-bit explicit count.
Definition tif_dir.h:816
@ TIFF_SETGET_IFD8
64-bit directory-offset scalar storage.
Definition tif_dir.h:760
@ TIFF_SETGET_C32_UINT16
Unsigned 16-bit array with 32-bit explicit count.
Definition tif_dir.h:820
@ TIFF_SETGET_C16_DOUBLE
Double array with 16-bit explicit count.
Definition tif_dir.h:810
@ TIFF_SETGET_UINT64
Unsigned 64-bit scalar storage.
Definition tif_dir.h:752
@ TIFF_SETGET_C0_UINT32
Unsigned 32-bit array with implicit count.
Definition tif_dir.h:776
@ TIFF_SETGET_C16_UINT32
Unsigned 32-bit array with 16-bit explicit count.
Definition tif_dir.h:800
@ TIFF_SETGET_UINT16_PAIR
Two separate promoted uint16_t values / uint16_t output slots.
Definition tif_dir.h:764
@ TIFF_SETGET_C32_SINT16
Signed 16-bit array with 32-bit explicit count.
Definition tif_dir.h:822
@ TIFF_SETGET_C16_UINT16
Unsigned 16-bit array with 16-bit explicit count.
Definition tif_dir.h:796
@ TIFF_SETGET_C16_SINT64
Signed 64-bit array with 16-bit explicit count.
Definition tif_dir.h:806
@ TIFF_SETGET_C0_FLOAT
Float array with implicit count.
Definition tif_dir.h:784
@ TIFF_SETGET_C0_SINT32
Signed 32-bit array with implicit count.
Definition tif_dir.h:778
@ TIFF_SETGET_C16_UINT64
Unsigned 64-bit array with 16-bit explicit count.
Definition tif_dir.h:804
@ TIFF_SETGET_C32_UINT32
Unsigned 32-bit array with 32-bit explicit count.
Definition tif_dir.h:824
@ TIFF_SETGET_C0_ASCII
Character array with implicit count.
Definition tif_dir.h:766
@ TIFF_SETGET_C32_SINT8
Signed 8-bit array with 32-bit explicit count.
Definition tif_dir.h:818
@ TIFF_SETGET_UINT16
Unsigned 16-bit scalar storage.
Definition tif_dir.h:744
@ TIFF_SETGET_C16_SINT16
Signed 16-bit array with 16-bit explicit count.
Definition tif_dir.h:798
@ TIFF_SETGET_C0_UINT8
Unsigned 8-bit array with implicit count.
Definition tif_dir.h:768
@ TIFF_SETGET_ASCII
Null-terminated string representation.
Definition tif_dir.h:738
@ TIFF_SETGET_C0_SINT8
Signed 8-bit array with implicit count.
Definition tif_dir.h:770
@ TIFF_SETGET_C16_SINT8
Signed 8-bit array with 16-bit explicit count.
Definition tif_dir.h:794
@ TIFF_SETGET_OTHER
Tag-specific calling convention outside the regular encodings.
Definition tif_dir.h:838
@ TIFF_SETGET_C0_UINT64
Unsigned 64-bit array with implicit count.
Definition tif_dir.h:780
@ TIFF_SETGET_FLOAT
Float scalar storage.
Definition tif_dir.h:756
@ TIFF_SETGET_C16_SINT32
Signed 32-bit array with 16-bit explicit count.
Definition tif_dir.h:802
@ TIFF_SETGET_SINT16
Signed 16-bit scalar storage.
Definition tif_dir.h:746
@ TIFF_SETGET_C0_SINT16
Signed 16-bit array with implicit count.
Definition tif_dir.h:774
@ TIFF_SETGET_C32_IFD8
64-bit directory-offset array with 32-bit explicit count.
Definition tif_dir.h:836
@ TIFF_SETGET_UINT32
Unsigned 32-bit scalar storage.
Definition tif_dir.h:748
@ TIFF_SETGET_C32_SINT64
Signed 64-bit array with 32-bit explicit count.
Definition tif_dir.h:830
@ TIFF_SETGET_C16_ASCII
Character array with 16-bit explicit count.
Definition tif_dir.h:790
@ TIFF_SETGET_C32_DOUBLE
Double array with 32-bit explicit count.
Definition tif_dir.h:834
@ TIFF_SETGET_UINT8
Unsigned 8-bit scalar storage.
Definition tif_dir.h:740
@ TIFF_SETGET_C0_UINT16
Unsigned 16-bit array with implicit count.
Definition tif_dir.h:772
@ TIFF_SETGET_C32_UINT64
Unsigned 64-bit array with 32-bit explicit count.
Definition tif_dir.h:828
@ TIFF_SETGET_C0_IFD8
64-bit directory-offset array with implicit count.
Definition tif_dir.h:788
@ TIFF_SETGET_C16_IFD8
64-bit directory-offset array with 16-bit explicit count.
Definition tif_dir.h:812
@ TIFF_SETGET_SINT32
Signed 32-bit scalar storage.
Definition tif_dir.h:750
@ TIFF_SETGET_C32_FLOAT
Float array with 32-bit explicit count.
Definition tif_dir.h:832
@ TIFF_SETGET_C0_DOUBLE
Double array with implicit count.
Definition tif_dir.h:786
int _TIFFFillStriles(TIFF *tif)
Materialise deferred strile arrays when required.
TIFF_SSIZE_T tmsize_t
Represent a signed memory or I/O size in bytes.
Definition tiffio.h:89
TIFFDataType
Identify the on-disk representation of a TIFF directory field.
Definition tiff.h:229
uint32_t tdir_t
Represent a zero-based directory index, rather than a file offset.
Definition tiffio.h:96
uint32_t ttag_t
Represent a legacy directory tag identifier.
Definition tiffio.h:102
Represent a parsed directory entry before value conversion.
Definition tif_dir.h:82
uint64_t tdir_count
Number of file-type elements, normalised to host order.
Definition tif_dir.h:89
uint16_t toff_short
Raw 16-bit view of inline bytes or offset storage.
Definition tif_dir.h:95
uint16_t tdir_type
On-disk TIFFDataType code.
Definition tif_dir.h:86
uint64_t toff_long8
Raw 64-bit view of inline bytes or offset storage.
Definition tif_dir.h:99
uint16_t tdir_tag
Directory tag identifier.
Definition tif_dir.h:84
uint8_t tdir_ignore
Nonzero to suppress this entry during parsing, e.g. duplicate tags.
Definition tif_dir.h:109
uint32_t toff_long
Raw 32-bit view of inline bytes or offset storage.
Definition tif_dir.h:97
Store the current directory values and image traversal state.
Definition tif_dir.h:143
uint32_t td_colormap_alloc
Number of entries allocated in each ColorMap plane, zero when none is installed.
Definition tif_dir.h:228
int td_customValueCount
Number of live records in td_customValues, including partial setter entries.
Definition tif_dir.h:346
float td_xposition
Horizontal image position in resolution units.
Definition tif_dir.h:202
uint32_t td_tiledepth
Tile depth in slices.
Definition tif_dir.h:164
uint16_t td_fillorder
FILLORDER_* bit order within file bytes.
Definition tif_dir.h:178
uint32_t td_dirdatasize_Noffsets
Number of ranges collected in td_dirdatasize_offsets.
Definition tif_dir.h:377
float td_xresolution
Horizontal pixels per resolution unit.
Definition tif_dir.h:194
uint64_t td_dirdatasize_read
Reusable IFD span including entry space and contiguous external data; UINT64_MAX permits extension at...
Definition tif_dir.h:375
int td_inknameslen
Byte length of the concatenated ink-name strings, including terminators.
Definition tif_dir.h:333
uint16_t * td_sampleinfo
Owned ExtraSamples interpretation array of td_extrasamples entries, or NULL.
Definition tif_dir.h:237
tmsize_t td_tilesize
Cached decoded tile size in bytes; minus one when invalidated.
Definition tif_dir.h:259
float * td_refblackwhite
Owned six-float reference black/white array, or NULL.
Definition tif_dir.h:327
uint32_t td_rowsperstrip
Rows per strip; UINT32_MAX represents one whole-image strip.
Definition tif_dir.h:184
uint32_t td_imagewidth
Image width in pixels.
Definition tif_dir.h:154
uint16_t td_compression
COMPRESSION_* codec identifier.
Definition tif_dir.h:172
uint16_t td_photometric
PHOTOMETRIC_* interpretation.
Definition tif_dir.h:174
uint32_t td_tilewidth
Tile width in pixels.
Definition tif_dir.h:160
tmsize_t td_scanlinesize
Cached decoded scanline size in bytes; zero when not computed.
Definition tif_dir.h:245
float td_yresolution
Vertical pixels per resolution unit.
Definition tif_dir.h:196
uint16_t td_extrasamples
Number of extra samples described by td_sampleinfo.
Definition tif_dir.h:232
uint16_t td_threshholding
THRESHHOLD_* bilevel rendering convention.
Definition tif_dir.h:176
uint16_t td_minsamplevalue
Legacy unsigned minimum sample value.
Definition tif_dir.h:186
double * td_sminsamplevalue
Owned SamplesPerPixel-length array of minimum values, or NULL.
Definition tif_dir.h:190
uint16_t td_bitspersample
Bits in each sample.
Definition tif_dir.h:168
char * td_inknames
Owned concatenated null-terminated ink names, or NULL.
Definition tif_dir.h:335
uint32_t td_row
Current scanline index; UINT32_MAX before traversal starts.
Definition tif_dir.h:240
TIFFDirEntry td_stripoffset_entry
Deferred offset entry; tag/type/count are swapped but offset storage is raw.
Definition tif_dir.h:301
uint16_t td_maxsamplevalue
Legacy unsigned maximum sample value.
Definition tif_dir.h:188
uint32_t td_imagedepth
Image depth in slices.
Definition tif_dir.h:158
uint16_t td_orientation
ORIENTATION_* storage orientation.
Definition tif_dir.h:180
uint32_t td_stripsperimage
Strips or tiles per sample plane, despite the historic name.
Definition tif_dir.h:269
uint16_t td_resolutionunit
RESUNIT_* unit for resolution and position values.
Definition tif_dir.h:198
uint32_t td_colormap_count
Number of entries in each ColorMap plane that the directory uses, zero when none is installed.
Definition tif_dir.h:223
uint16_t td_planarconfig
PLANARCONFIG_* sample-plane arrangement.
Definition tif_dir.h:200
TIFFTagValue * td_customValues
Owned array of custom-value records, each owning its value.
Definition tif_dir.h:348
double * td_smaxsamplevalue
Owned SamplesPerPixel-length array of maximum values, or NULL.
Definition tif_dir.h:192
uint64_t * td_stripbytecount_p
Owned byte-count array/cache, possibly NULL or partial; use TIFFGetStrileByteCount().
Definition tif_dir.h:281
unsigned char td_iswrittentofile
Nonzero when the current directory has an on-file representation.
Definition tif_dir.h:359
uint64_t * td_stripoffset_p
Owned offset array/cache, possibly NULL or partial; use TIFFGetStrileOffset().
Definition tif_dir.h:276
uint16_t td_sampleformat
SAMPLEFORMAT_* interpretation of samples.
Definition tif_dir.h:170
uint64_t td_dirdatasize_write
Accumulated IFD write size in bytes, including entry space after counting.
Definition tif_dir.h:369
uint32_t td_col
Current pixel column; UINT32_MAX before traversal starts.
Definition tif_dir.h:253
unsigned char td_deferstrilearraywriting
Nonzero to reserve strile entries for later explicit array writing.
Definition tif_dir.h:354
uint16_t td_samplesperpixel
Samples per pixel, including extra samples.
Definition tif_dir.h:182
uint32_t td_subfiletype
NewSubfileType flag mask.
Definition tif_dir.h:166
uint32_t td_nstrips
Total strile count across all planes; logical array length.
Definition tif_dir.h:271
uint16_t td_numberofinks
Number of inks, kept consistent with accepted InkNames where possible.
Definition tif_dir.h:340
TIFFDirEntry td_stripbytecount_entry
Deferred byte-count entry; offset storage still requires swapping.
Definition tif_dir.h:305
uint32_t td_imagelength
Image length in rows.
Definition tif_dir.h:156
uint32_t td_stripoffsetbyteallocsize
Allocated element capacity of lazy strile offset/count caches, not byte size.
Definition tif_dir.h:286
TIFFEntryOffsetAndLength * td_dirdatasize_offsets
Owned auxiliary array of external IFD-value ranges, or NULL.
Definition tif_dir.h:380
uint32_t td_curtile
Current tile index, or NOTILE.
Definition tif_dir.h:256
uint32_t td_tilelength
Tile length in rows.
Definition tif_dir.h:162
uint16_t td_nsubifd
Number of child-directory offsets in td_subifd.
Definition tif_dir.h:307
uint64_t * td_subifd
Owned array of td_nsubifd child-directory offsets, or NULL.
Definition tif_dir.h:309
float td_yposition
Vertical image position in resolution units.
Definition tif_dir.h:204
uint32_t td_transferfunction_count
Number of entries in each installed TransferFunction curve, zero when none is installed; the only rec...
Definition tif_dir.h:325
uint16_t td_ycbcrpositioning
YCBCRPOSITION_* placement convention.
Definition tif_dir.h:314
uint32_t td_curstrip
Current strip index, or NOSTRIP.
Definition tif_dir.h:242
Describe an external directory-value byte range.
Definition tif_dir.h:120
uint64_t offset
External value offset in file bytes.
Definition tif_dir.h:122
uint64_t length
External value length in bytes.
Definition tif_dir.h:124
Store one custom field value and its descriptor.
Definition tif_dir.h:46
void * value
Owned custom-value allocation, or NULL after clearing/failure.
Definition tif_dir.h:56
int count
Number of internally stored elements; after a partial setter failure it may be zero or a nonzero coun...
Definition tif_dir.h:54
const TIFFField * info
Borrowed live descriptor; must outlive this custom value.
Definition tif_dir.h:48
Describe a borrowed schema or owned compatibility batch.
Definition tif_dir.h:962
TIFFFieldArrayType type
Namespace/category of the schema.
Definition tif_dir.h:964
uint32_t count
Number of valid descriptors in fields.
Definition tif_dir.h:972
uint32_t allocated_size
Descriptor capacity when owned; zero identifies a static schema.
Definition tif_dir.h:970
TIFFField * fields
Descriptor array; static/borrowed or owned according to allocated_size and creator.
Definition tif_dir.h:978
Describe a field's file type and internal argument contract.
Definition tif_dir.h:993
unsigned char field_oktochange
Nonzero to permit changes after writing starts; ImageLength is separately exempt.
Definition tif_dir.h:1028
TIFFDataType field_type
On-disk TIFFDataType, distinct from the argument representation.
Definition tif_dir.h:1009
unsigned char field_passcount
Nonzero for an explicit count argument; tag-specific exceptions still apply.
Definition tif_dir.h:1033
const char * field_name
Borrowed or anonymous-owned null-terminated name; must remain live while used.
Definition tif_dir.h:1038
unsigned short field_bit
FIELD_* presence index; FIELD_CUSTOM shares storage through the custom list.
Definition tif_dir.h:1023
uint32_t field_anonymous
Nonzero for an automatically created unknown-tag descriptor.
Definition tif_dir.h:1013
uint32_t field_tag
Tag identifier in this schema namespace.
Definition tif_dir.h:995
short field_readcount
Fixed getter count or TIFF_VARIABLE/TIFF_VARIABLE2/TIFF_SPP rule.
Definition tif_dir.h:1001
TIFFSetGetFieldType set_get_field_type
Internal storage/count representation for tag access and conversion.
Definition tif_dir.h:1018
TIFFFieldArray * field_subfields
Borrowed child-directory schema, or NULL; not recursively freed here.
Definition tif_dir.h:1043
short field_writecount
Fixed setter count or variable/sample-count sentinel.
Definition tif_dir.h:1003
Hold private state for one open TIFF library instance.
Definition tiffiop.h:389
Define TIFF file-format types, tag identifiers, and constant values.
Declare the public C library interface and its supporting types.