@@ -65,6 +65,12 @@ typedef struct
65
65
tif_dirread.c */
66
66
} TIFFDirEntry ;
67
67
68
+ typedef struct
69
+ {
70
+ uint64_t offset ;
71
+ uint64_t length ;
72
+ } TIFFEntryOffsetAndLength ; /* auxiliary for evaluating size of IFD data */
73
+
68
74
/*
69
75
* Internal format of a TIFF directory entry.
70
76
*/
@@ -115,6 +121,9 @@ typedef struct
115
121
#ifdef STRIPBYTECOUNTSORTED_UNUSED
116
122
int td_stripbytecountsorted ; /* is the bytecount array sorted ascending? */
117
123
#endif
124
+ /* Be aware that the parameters of td_stripoffset_entry and
125
+ * td_stripbytecount_entry are swapped but tdir_offset is not
126
+ * and has to be swapped when used. */
118
127
TIFFDirEntry td_stripoffset_entry ; /* for deferred loading */
119
128
TIFFDirEntry td_stripbytecount_entry ; /* for deferred loading */
120
129
uint16_t td_nsubifd ;
@@ -135,6 +144,21 @@ typedef struct
135
144
136
145
unsigned char
137
146
td_deferstrilearraywriting ; /* see TIFFDeferStrileArrayWriting() */
147
+
148
+ /* LibTIFF writes all data that does not fit into the IFD entries directly
149
+ * after the IFD tag enty part. When reading, only the IFD data directly and
150
+ * continuously behind the IFD tags is taken into account for the IFD data
151
+ * size.*/
152
+ uint64_t td_dirdatasize_write ; /* auxiliary for evaluating size of IFD data
153
+ to be written */
154
+ uint64_t td_dirdatasize_read ; /* auxiliary for evaluating size of IFD data
155
+ read from file */
156
+ uint32_t td_dirdatasize_Noffsets ; /* auxiliary counter for
157
+ tif_dir.td_dirdatasize_offsets array */
158
+ TIFFEntryOffsetAndLength
159
+ * td_dirdatasize_offsets ; /* auxiliary array for all offsets of IFD tag
160
+ entries with data outside the IFD tag
161
+ entries. */
138
162
} TIFFDirectory ;
139
163
140
164
/*
0 commit comments