ReactOS  0.4.14-dev-337-gf981a68
tiffiop.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 _TIFFIOP_
26 #define _TIFFIOP_
27 /*
28  * ``Library-private'' definitions.
29  */
30 
31 #include "tif_config.h"
32 
33 #ifdef HAVE_FCNTL_H
34 # include <fcntl.h>
35 #endif
36 
37 #ifdef HAVE_SYS_TYPES_H
38 # include <sys/types.h>
39 #endif
40 
41 #ifdef HAVE_STRING_H
42 # include <string.h>
43 #endif
44 
45 #ifdef HAVE_ASSERT_H
46 # include <assert.h>
47 #else
48 # define assert(x)
49 #endif
50 
51 #ifdef HAVE_SEARCH_H
52 # include <search.h>
53 #else
54 extern void *lfind(const void *, const void *, size_t *, size_t,
55  int (*)(const void *, const void *));
56 #endif
57 
58 #if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
59 #undef snprintf
60 #define snprintf _TIFF_snprintf_f
61 extern int snprintf(char* str, size_t size, const char* format, ...);
62 #endif
63 
64 #include "tiffio.h"
65 
66 #include "tif_dir.h"
67 
68 #ifndef STRIP_SIZE_DEFAULT
69 # define STRIP_SIZE_DEFAULT 8192
70 #endif
71 
72 #define streq(a,b) (strcmp(a,b) == 0)
73 #define strneq(a,b,n) (strncmp(a,b,n) == 0)
74 
75 #ifndef TRUE
76 #define TRUE 1
77 #define FALSE 0
78 #endif
79 
80 typedef struct client_info {
81  struct client_info *next;
82  void *data;
83  char *name;
85 
86 /*
87  * Typedefs for ``method pointers'' used internally.
88  * these are deprecated and provided only for backwards compatibility.
89  */
90 typedef unsigned char tidataval_t; /* internal image data value type */
91 typedef tidataval_t* tidata_t; /* reference to internal image data */
92 
93 typedef void (*TIFFVoidMethod)(TIFF*);
94 typedef int (*TIFFBoolMethod)(TIFF*);
95 typedef int (*TIFFPreMethod)(TIFF*, uint16);
96 typedef int (*TIFFCodeMethod)(TIFF* tif, uint8* buf, tmsize_t size, uint16 sample);
97 typedef int (*TIFFSeekMethod)(TIFF*, uint32);
101 
102 struct tiff {
103  char* tif_name; /* name of open file */
104  int tif_fd; /* open file descriptor */
105  int tif_mode; /* open mode (O_*) */
107  #define TIFF_FILLORDER 0x00003U /* natural bit fill order for machine */
108  #define TIFF_DIRTYHEADER 0x00004U /* header must be written on close */
109  #define TIFF_DIRTYDIRECT 0x00008U /* current directory must be written */
110  #define TIFF_BUFFERSETUP 0x00010U /* data buffers setup */
111  #define TIFF_CODERSETUP 0x00020U /* encoder/decoder setup done */
112  #define TIFF_BEENWRITING 0x00040U /* written 1+ scanlines to file */
113  #define TIFF_SWAB 0x00080U /* byte swap file information */
114  #define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */
115  #define TIFF_MYBUFFER 0x00200U /* my raw data buffer; free on close */
116  #define TIFF_ISTILED 0x00400U /* file is tile, not strip- based */
117  #define TIFF_MAPPED 0x00800U /* file is mapped into memory */
118  #define TIFF_POSTENCODE 0x01000U /* need call to postencode routine */
119  #define TIFF_INSUBIFD 0x02000U /* currently writing a subifd */
120  #define TIFF_UPSAMPLED 0x04000U /* library is doing data up-sampling */
121  #define TIFF_STRIPCHOP 0x08000U /* enable strip chopping support */
122  #define TIFF_HEADERONLY 0x10000U /* read header only, do not process the first directory */
123  #define TIFF_NOREADRAW 0x20000U /* skip reading of raw uncompressed image data */
124  #define TIFF_INCUSTOMIFD 0x40000U /* currently writing a custom IFD */
125  #define TIFF_BIGTIFF 0x80000U /* read/write bigtiff */
126  #define TIFF_BUF4WRITE 0x100000U /* rawcc bytes are for writing */
127  #define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/
128  #define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */
129  #define TIFF_BUFFERMMAP 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */
130  uint64 tif_diroff; /* file offset of current directory */
131  uint64 tif_nextdiroff; /* file offset of following directory */
132  uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
133  uint16 tif_dirlistsize; /* number of entries in offset list */
134  uint16 tif_dirnumber; /* number of already seen directories */
135  TIFFDirectory tif_dir; /* internal rep of current directory */
136  TIFFDirectory tif_customdir; /* custom IFDs are separated from the main ones */
137  union {
141  } tif_header;
142  uint16 tif_header_size; /* file's header block and its length */
143  uint32 tif_row; /* current scanline */
144  uint16 tif_curdir; /* current directory (index) */
145  uint32 tif_curstrip; /* current strip for read/write */
146  uint64 tif_curoff; /* current offset for read/write */
147  uint64 tif_dataoff; /* current offset for writing dir */
148  /* SubIFD support */
149  uint16 tif_nsubifd; /* remaining subifds to write */
150  uint64 tif_subifdoff; /* offset for patching SubIFD link */
151  /* tiling support */
152  uint32 tif_col; /* current column (offset by row too) */
153  uint32 tif_curtile; /* current tile for read/write */
154  tmsize_t tif_tilesize; /* # of bytes in a tile */
155  /* compression scheme hooks */
157  TIFFBoolMethod tif_fixuptags; /* called in TIFFReadDirectory */
158  TIFFBoolMethod tif_setupdecode; /* called once before predecode */
159  TIFFPreMethod tif_predecode; /* pre- row/strip/tile decoding */
160  TIFFBoolMethod tif_setupencode; /* called once before preencode */
162  TIFFPreMethod tif_preencode; /* pre- row/strip/tile encoding */
163  TIFFBoolMethod tif_postencode; /* post- row/strip/tile encoding */
164  TIFFCodeMethod tif_decoderow; /* scanline decoding routine */
165  TIFFCodeMethod tif_encoderow; /* scanline encoding routine */
166  TIFFCodeMethod tif_decodestrip; /* strip decoding routine */
167  TIFFCodeMethod tif_encodestrip; /* strip encoding routine */
168  TIFFCodeMethod tif_decodetile; /* tile decoding routine */
169  TIFFCodeMethod tif_encodetile; /* tile encoding routine */
170  TIFFVoidMethod tif_close; /* cleanup-on-close routine */
171  TIFFSeekMethod tif_seek; /* position within a strip routine */
172  TIFFVoidMethod tif_cleanup; /* cleanup state routine */
173  TIFFStripMethod tif_defstripsize; /* calculate/constrain strip size */
174  TIFFTileMethod tif_deftilesize; /* calculate/constrain tile size */
175  uint8* tif_data; /* compression scheme private data */
176  /* input/output buffering */
177  tmsize_t tif_scanlinesize; /* # of bytes in a scanline */
178  tmsize_t tif_scanlineskew; /* scanline skew for reading strips */
179  uint8* tif_rawdata; /* raw data buffer */
180  tmsize_t tif_rawdatasize; /* # of bytes in raw data buffer */
181  tmsize_t tif_rawdataoff; /* rawdata offset within strip */
182  tmsize_t tif_rawdataloaded;/* amount of data in rawdata */
183  uint8* tif_rawcp; /* current spot in raw buffer */
184  tmsize_t tif_rawcc; /* bytes unread from raw buffer */
185  /* memory-mapped file support */
186  uint8* tif_base; /* base of mapped file */
187  tmsize_t tif_size; /* size of mapped file region (bytes, thus tmsize_t) */
188  TIFFMapFileProc tif_mapproc; /* map file method */
189  TIFFUnmapFileProc tif_unmapproc; /* unmap file method */
190  /* input/output callback methods */
191  thandle_t tif_clientdata; /* callback parameter */
192  TIFFReadWriteProc tif_readproc; /* read method */
193  TIFFReadWriteProc tif_writeproc; /* write method */
194  TIFFSeekProc tif_seekproc; /* lseek method */
195  TIFFCloseProc tif_closeproc; /* close method */
196  TIFFSizeProc tif_sizeproc; /* filesize method */
197  /* post-decoding support */
198  TIFFPostMethod tif_postdecode; /* post decoding routine */
199  /* tag support */
200  TIFFField** tif_fields; /* sorted table of registered tags */
201  size_t tif_nfields; /* # entries in registered tag table */
202  const TIFFField* tif_foundfield; /* cached pointer to already found tag */
203  TIFFTagMethods tif_tagmethods; /* tag get/set/print routines */
204  TIFFClientInfoLink* tif_clientinfo; /* extra client information. */
205  /* Backward compatibility stuff. We need these two fields for
206  * setting up an old tag extension scheme. */
209 };
210 
211 #define isPseudoTag(t) (t > 0xffff) /* is tag value normal or pseudo */
212 
213 #define isTiled(tif) (((tif)->tif_flags & TIFF_ISTILED) != 0)
214 #define isMapped(tif) (((tif)->tif_flags & TIFF_MAPPED) != 0)
215 #define isFillOrder(tif, o) (((tif)->tif_flags & (o)) != 0)
216 #define isUpSampled(tif) (((tif)->tif_flags & TIFF_UPSAMPLED) != 0)
217 #define TIFFReadFile(tif, buf, size) \
218  ((*(tif)->tif_readproc)((tif)->tif_clientdata,(buf),(size)))
219 #define TIFFWriteFile(tif, buf, size) \
220  ((*(tif)->tif_writeproc)((tif)->tif_clientdata,(buf),(size)))
221 #define TIFFSeekFile(tif, off, whence) \
222  ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(off),(whence)))
223 #define TIFFCloseFile(tif) \
224  ((*(tif)->tif_closeproc)((tif)->tif_clientdata))
225 #define TIFFGetFileSize(tif) \
226  ((*(tif)->tif_sizeproc)((tif)->tif_clientdata))
227 #define TIFFMapFileContents(tif, paddr, psize) \
228  ((*(tif)->tif_mapproc)((tif)->tif_clientdata,(paddr),(psize)))
229 #define TIFFUnmapFileContents(tif, addr, size) \
230  ((*(tif)->tif_unmapproc)((tif)->tif_clientdata,(addr),(size)))
231 
232 /*
233  * Default Read/Seek/Write definitions.
234  */
235 #ifndef ReadOK
236 #define ReadOK(tif, buf, size) \
237  (TIFFReadFile((tif),(buf),(size))==(size))
238 #endif
239 #ifndef SeekOK
240 #define SeekOK(tif, off) _TIFFSeekOK(tif, off)
241 #endif
242 #ifndef WriteOK
243 #define WriteOK(tif, buf, size) \
244  (TIFFWriteFile((tif),(buf),(size))==(size))
245 #endif
246 
247 /* NB: the uint32 casts are to silence certain ANSI-C compilers */
248 #define TIFFhowmany_32(x, y) (((uint32)x < (0xffffffff - (uint32)(y-1))) ? \
249  ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \
250  0U)
251 /* Variant of TIFFhowmany_32() that doesn't return 0 if x close to MAXUINT. */
252 /* Caution: TIFFhowmany_32_maxuint_compat(x,y)*y might overflow */
253 #define TIFFhowmany_32_maxuint_compat(x, y) \
254  (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0))
255 #define TIFFhowmany8_32(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3)
256 #define TIFFroundup_32(x, y) (TIFFhowmany_32(x,y)*(y))
257 #define TIFFhowmany_64(x, y) ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y)))
258 #define TIFFhowmany8_64(x) (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3)
259 #define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y))
260 
261 /* Safe multiply which returns zero if there is an integer overflow */
262 #define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0)
263 
264 #define TIFFmax(A,B) ((A)>(B)?(A):(B))
265 #define TIFFmin(A,B) ((A)<(B)?(A):(B))
266 
267 #define TIFFArrayCount(a) (sizeof (a) / sizeof ((a)[0]))
268 
269 /*
270  Support for large files.
271 
272  Windows read/write APIs support only 'unsigned int' rather than 'size_t'.
273  Windows off_t is only 32-bit, even in 64-bit builds.
274 */
275 #if defined(HAVE_FSEEKO)
276 /*
277  Use fseeko() and ftello() if they are available since they use
278  'off_t' rather than 'long'. It is wrong to use fseeko() and
279  ftello() only on systems with special LFS support since some systems
280  (e.g. FreeBSD) support a 64-bit off_t by default.
281 
282  For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these
283  interfaces. The MinGW compiler must support the requested version. MinGW
284  does not distribute the CRT (it is supplied by Microsoft) so the correct CRT
285  must be available on the target computer in order for the program to run.
286 */
287 #if defined(HAVE_FSEEKO)
288 # define fseek(stream,offset,whence) fseeko(stream,offset,whence)
289 # define ftell(stream,offset,whence) ftello(stream,offset,whence)
290 #endif
291 #endif
292 #if defined(__WIN32__) && \
293  !(defined(_MSC_VER) && _MSC_VER < 1400) && \
294  !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800)
295 typedef unsigned int TIFFIOSize_t;
296 #define _TIFF_lseek_f(fildes,offset,whence) _lseeki64(fildes,/* __int64 */ offset,whence)
297 /* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */
298 #define _TIFF_fseek_f(stream,offset,whence) _fseeki64(stream,/* __int64 */ offset,whence)
299 #define _TIFF_fstat_f(fildes,stat_buff) _fstati64(fildes,/* struct _stati64 */ stat_buff)
300 /* #define _TIFF_ftell_f(stream) /\* __int64 *\/ _ftelli64(stream) */
301 /* #define _TIFF_stat_f(path,stat_buff) _stati64(path,/\* struct _stati64 *\/ stat_buff) */
302 #define _TIFF_stat_s struct _stati64
303 #define _TIFF_off_t __int64
304 #else
305 typedef size_t TIFFIOSize_t;
306 #define _TIFF_lseek_f(fildes,offset,whence) lseek(fildes,offset,whence)
307 /* #define _TIFF_tell_f(fildes) (_TIFF_lseek_f(fildes,0,SEEK_CUR)) */
308 #define _TIFF_fseek_f(stream,offset,whence) fseek(stream,offset,whence)
309 #define _TIFF_fstat_f(fildes,stat_buff) fstat(fildes,stat_buff)
310 /* #define _TIFF_ftell_f(stream) ftell(stream) */
311 /* #define _TIFF_stat_f(path,stat_buff) stat(path,stat_buff) */
312 #define _TIFF_stat_s struct stat
313 #define _TIFF_off_t off_t
314 #endif
315 
316 #if defined(__has_attribute) && defined(__clang__)
317 #if __has_attribute(no_sanitize)
318 #define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow")))
319 #else
320 #define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
321 #endif
322 #else
323 #define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
324 #endif
325 
326 
327 #if defined(__cplusplus)
328 extern "C" {
329 #endif
330 extern int _TIFFgetMode(const char* mode, const char* module);
331 extern int _TIFFNoRowEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s);
332 extern int _TIFFNoStripEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s);
333 extern int _TIFFNoTileEncode(TIFF*, uint8* pp, tmsize_t cc, uint16 s);
334 extern int _TIFFNoRowDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s);
335 extern int _TIFFNoStripDecode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s);
336 extern int _TIFFNoTileDecode(TIFF*, uint8* pp, tmsize_t cc, uint16 s);
337 extern void _TIFFNoPostDecode(TIFF* tif, uint8* buf, tmsize_t cc);
338 extern int _TIFFNoPreCode(TIFF* tif, uint16 s);
339 extern int _TIFFNoSeek(TIFF* tif, uint32 off);
340 extern void _TIFFSwab16BitData(TIFF* tif, uint8* buf, tmsize_t cc);
341 extern void _TIFFSwab24BitData(TIFF* tif, uint8* buf, tmsize_t cc);
342 extern void _TIFFSwab32BitData(TIFF* tif, uint8* buf, tmsize_t cc);
343 extern void _TIFFSwab64BitData(TIFF* tif, uint8* buf, tmsize_t cc);
344 extern int TIFFFlushData1(TIFF* tif);
345 extern int TIFFDefaultDirectory(TIFF* tif);
346 extern void _TIFFSetDefaultCompressionState(TIFF* tif);
347 extern int _TIFFRewriteField(TIFF *, uint16, TIFFDataType, tmsize_t, void *);
348 extern int TIFFSetCompressionScheme(TIFF* tif, int scheme);
349 extern int TIFFSetDefaultCompressionState(TIFF* tif);
351 extern void _TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th);
352 extern int _TIFFDataSize(TIFFDataType type);
353 
354 extern void _TIFFsetByteArray(void**, void*, uint32);
355 extern void _TIFFsetString(char**, char*);
356 extern void _TIFFsetShortArray(uint16**, uint16*, uint32);
357 extern void _TIFFsetLongArray(uint32**, uint32*, uint32);
358 extern void _TIFFsetFloatArray(float**, float*, uint32);
359 extern void _TIFFsetDoubleArray(double**, double*, uint32);
360 
361 extern void _TIFFprintAscii(FILE*, const char*);
362 extern void _TIFFprintAsciiTag(FILE*, const char*, const char*);
363 
368 
369 extern uint32 _TIFFMultiply32(TIFF*, uint32, uint32, const char*);
370 extern uint64 _TIFFMultiply64(TIFF*, uint64, uint64, const char*);
371 extern void* _TIFFCheckMalloc(TIFF*, tmsize_t, tmsize_t, const char*);
372 extern void* _TIFFCheckRealloc(TIFF*, void*, tmsize_t, tmsize_t, const char*);
373 
374 extern double _TIFFUInt64ToDouble(uint64);
375 extern float _TIFFUInt64ToFloat(uint64);
376 
377 extern tmsize_t
379  void **buf, tmsize_t bufsizetoalloc,
380  tmsize_t size_to_read);
381 extern tmsize_t
383  void **buf, tmsize_t bufsizetoalloc,
384  tmsize_t size_to_read);
385 extern tmsize_t
387  void **buf, tmsize_t bufsizetoalloc,
388  uint32 x, uint32 y, uint32 z, uint16 s);
389 extern int _TIFFSeekOK(TIFF* tif, toff_t off);
390 
391 extern int TIFFInitDumpMode(TIFF*, int);
392 #ifdef PACKBITS_SUPPORT
393 extern int TIFFInitPackBits(TIFF*, int);
394 #endif
395 #ifdef CCITT_SUPPORT
396 extern int TIFFInitCCITTRLE(TIFF*, int), TIFFInitCCITTRLEW(TIFF*, int);
397 extern int TIFFInitCCITTFax3(TIFF*, int), TIFFInitCCITTFax4(TIFF*, int);
398 #endif
399 #ifdef THUNDER_SUPPORT
400 extern int TIFFInitThunderScan(TIFF*, int);
401 #endif
402 #ifdef NEXT_SUPPORT
403 extern int TIFFInitNeXT(TIFF*, int);
404 #endif
405 #ifdef LZW_SUPPORT
406 extern int TIFFInitLZW(TIFF*, int);
407 #endif
408 #ifdef OJPEG_SUPPORT
409 extern int TIFFInitOJPEG(TIFF*, int);
410 #endif
411 #ifdef JPEG_SUPPORT
412 extern int TIFFInitJPEG(TIFF*, int);
413 extern int TIFFJPEGIsFullStripRequired(TIFF*);
414 #endif
415 #ifdef JBIG_SUPPORT
416 extern int TIFFInitJBIG(TIFF*, int);
417 #endif
418 #ifdef ZIP_SUPPORT
419 extern int TIFFInitZIP(TIFF*, int);
420 #endif
421 #ifdef PIXARLOG_SUPPORT
422 extern int TIFFInitPixarLog(TIFF*, int);
423 #endif
424 #ifdef LOGLUV_SUPPORT
425 extern int TIFFInitSGILog(TIFF*, int);
426 #endif
427 #ifdef LZMA_SUPPORT
428 extern int TIFFInitLZMA(TIFF*, int);
429 #endif
430 #ifdef ZSTD_SUPPORT
431 extern int TIFFInitZSTD(TIFF*, int);
432 #endif
433 #ifdef WEBP_SUPPORT
434 extern int TIFFInitWebP(TIFF*, int);
435 #endif
436 #ifdef VMS
437 extern const TIFFCodec _TIFFBuiltinCODECS[];
438 #else
440 #endif
441 
442 #if defined(__cplusplus)
443 }
444 #endif
445 #endif /* _TIFFIOP_ */
446 
447 /* vim: set ts=8 sts=8 sw=8 noet: */
448 /*
449  * Local Variables:
450  * mode: c
451  * c-basic-offset: 8
452  * fill-column: 78
453  * End:
454  */
unsigned long long uint64
Definition: platform.h:18
TIFFSeekProc tif_seekproc
Definition: tiffiop.h:194
TIFFCodeMethod tif_decoderow
Definition: tiffiop.h:164
TIFFTagMethods tif_tagmethods
Definition: tiffiop.h:203
int TIFFInitZIP(TIFF *, int)
uint8 * tif_rawcp
Definition: tiffiop.h:183
void * data
Definition: tiffiop.h:82
tmsize_t(* TIFFReadWriteProc)(thandle_t, void *, tmsize_t)
Definition: tiffio.h:278
uint16 tif_header_size
Definition: tiffiop.h:142
TIFFErrorHandlerExt _TIFFwarningHandlerExt
Definition: tif_warning.c:30
int(* TIFFCloseProc)(thandle_t)
Definition: tiffio.h:280
TIFFPreMethod tif_predecode
Definition: tiffiop.h:159
void(* TIFFVoidMethod)(TIFF *)
Definition: tiffiop.h:93
int _TIFFNoTileEncode(TIFF *, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:65
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
struct client_info TIFFClientInfoLink
tmsize_t tif_scanlineskew
Definition: tiffiop.h:178
uint8 * tif_base
Definition: tiffiop.h:186
void(* TIFFUnmapFileProc)(thandle_t, void *base, toff_t size)
Definition: tiffio.h:283
void * _TIFFCheckRealloc(TIFF *, void *, tmsize_t, tmsize_t, const char *)
Definition: tif_aux.c:62
int TIFFInitCCITTFax4(TIFF *, int)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
TIFFCodeMethod tif_encodestrip
Definition: tiffiop.h:167
uint32(* TIFFStripMethod)(TIFF *, uint32)
Definition: tiffiop.h:99
TIFFUnmapFileProc tif_unmapproc
Definition: tiffiop.h:189
void _TIFFNoPostDecode(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1533
unsigned int uint32
Definition: types.h:32
void _TIFFDefaultTileSize(TIFF *tif, uint32 *tw, uint32 *th)
Definition: tif_tile.c:300
uint32 _TIFFMultiply32(TIFF *, uint32, uint32, const char *)
Definition: tif_aux.c:36
float _TIFFUInt64ToFloat(uint64)
Definition: tif_aux.c:330
int _TIFFNoSeek(TIFF *tif, uint32 off)
Definition: tif_compress.c:116
uint64 toff_t
Definition: tiffio.h:66
int TIFFInitCCITTRLEW(TIFF *, int)
TIFFClientInfoLink * tif_clientinfo
Definition: tiffiop.h:204
TIFFCodeMethod tif_encoderow
Definition: tiffiop.h:165
uint32 tif_curstrip
Definition: tiffiop.h:145
DWORD scheme
#define snprintf
Definition: wintirpc.h:48
int TIFFInitCCITTFax3(TIFF *, int)
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
TIFFDirectory tif_customdir
Definition: tiffiop.h:136
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
TIFFVoidMethod tif_close
Definition: tiffiop.h:170
uint8 * tif_rawdata
Definition: tiffiop.h:179
void(* TIFFErrorHandler)(const char *, const char *, va_list)
Definition: tiffio.h:276
tmsize_t tif_scanlinesize
Definition: tiffiop.h:177
double _TIFFUInt64ToDouble(uint64)
Definition: tif_aux.c:346
uint64 tif_curoff
Definition: tiffiop.h:146
thandle_t tif_clientdata
Definition: tiffiop.h:191
tmsize_t tif_rawdataoff
Definition: tiffiop.h:181
void _TIFFprintAscii(FILE *, const char *)
Definition: tif_print.c:681
tmsize_t tif_rawcc
Definition: tiffiop.h:184
uint16 tif_curdir
Definition: tiffiop.h:144
int TIFFDefaultDirectory(TIFF *tif)
Definition: tif_dir.c:1356
int TIFFInitDumpMode(TIFF *, int)
Definition: tif_dumpmode.c:123
tmsize_t tif_tilesize
Definition: tiffiop.h:154
int TIFFSetDefaultCompressionState(TIFF *tif)
char * tif_name
Definition: tiffiop.h:103
void * _TIFFCheckMalloc(TIFF *, tmsize_t, tmsize_t, const char *)
Definition: tif_aux.c:85
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
Definition: tiffiop.h:102
#define TIFFInitOJPEG
Definition: tif_codec.c:51
int tif_fd
Definition: tiffiop.h:104
_Check_return_ _CRTIMP void *__cdecl lfind(_In_ const void *_Key, _In_reads_bytes_((*_NumOfElements) *_SizeOfElements) const void *_Base, _Inout_ unsigned int *_NumOfElements, _In_ unsigned int _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
int TIFFInitCCITTRLE(TIFF *, int)
char * name
Definition: tiffiop.h:83
TIFFHeaderCommon common
Definition: tiffiop.h:138
void _TIFFsetByteArray(void **, void *, uint32)
Definition: tif_dir.c:57
uint64 _TIFFMultiply64(TIFF *, uint64, uint64, const char *)
Definition: tif_aux.c:49
uint16 tif_nsubifd
Definition: tiffiop.h:149
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
toff_t(* TIFFSeekProc)(thandle_t, toff_t, int)
Definition: tiffio.h:279
int TIFFInitSGILog(TIFF *, int)
toff_t(* TIFFSizeProc)(thandle_t)
Definition: tiffio.h:281
TIFFErrorHandler _TIFFerrorHandler
Definition: tif_unix.c:374
int _TIFFNoRowEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:51
#define pp
Definition: hlsl.yy.c:1208
int tif_mode
Definition: tiffiop.h:105
GLdouble GLdouble z
Definition: glext.h:5874
const WCHAR * str
uint32 tif_flags
Definition: tiffiop.h:106
void _TIFFSetDefaultCompressionState(TIFF *tif)
Definition: tif_compress.c:135
int tif_encodestatus
Definition: tiffiop.h:161
TIFFCodeMethod tif_decodestrip
Definition: tiffiop.h:166
size_t tif_nfields
Definition: tiffiop.h:201
TIFFFieldArray * tif_fieldscompat
Definition: tiffiop.h:207
TIFFCodeMethod tif_encodetile
Definition: tiffiop.h:169
int(* TIFFBoolMethod)(TIFF *)
Definition: tiffiop.h:94
uint64 tif_nextdiroff
Definition: tiffiop.h:131
TIFFCodec _TIFFBuiltinCODECS[]
Definition: tif_codec.c:87
TIFFMapFileProc tif_mapproc
Definition: tiffiop.h:188
void _TIFFSwab64BitData(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1563
#define TIFFInitJBIG
Definition: tif_codec.c:60
TIFFSeekMethod tif_seek
Definition: tiffiop.h:171
int TIFFInitThunderScan(TIFF *, int)
#define TIFFInitLZMA
Definition: tif_codec.c:72
void _TIFFSwab32BitData(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1555
TIFFTileMethod tif_deftilesize
Definition: tiffiop.h:174
TIFFPreMethod tif_preencode
Definition: tiffiop.h:162
uint32 _TIFFDefaultStripSize(TIFF *tif, uint32 s)
Definition: tif_strip.c:239
int _TIFFDataSize(TIFFDataType type)
Definition: tif_dirinfo.c:476
GLsizeiptr size
Definition: glext.h:5919
TIFFBoolMethod tif_postencode
Definition: tiffiop.h:163
void _TIFFSwab24BitData(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1547
TIFFPostMethod tif_postdecode
Definition: tiffiop.h:198
struct client_info * next
Definition: tiffiop.h:81
int TIFFInitNeXT(TIFF *, int)
uint64 tif_subifdoff
Definition: tiffiop.h:150
unsigned char uint8
Definition: types.h:28
uint64 tif_dataoff
Definition: tiffiop.h:147
int _TIFFNoPreCode(TIFF *tif, uint16 s)
Definition: tif_compress.c:125
int TIFFInitLZW(TIFF *, int)
tmsize_t tif_rawdatasize
Definition: tiffiop.h:180
int _TIFFRewriteField(TIFF *, uint16, TIFFDataType, tmsize_t, void *)
TIFFErrorHandler _TIFFwarningHandler
Definition: tif_unix.c:364
#define TIFFInitZSTD
Definition: tif_codec.c:75
tmsize_t tif_rawdataloaded
Definition: tiffiop.h:182
tmsize_t _TIFFReadEncodedTileAndAllocBuffer(TIFF *tif, uint32 tile, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
Definition: tif_read.c:1051
TIFFCodeMethod tif_decodetile
Definition: tiffiop.h:168
uint64 * tif_dirlist
Definition: tiffiop.h:132
uint16 tif_dirnumber
Definition: tiffiop.h:134
void(* TIFFErrorHandlerExt)(thandle_t, const char *, const char *, va_list)
Definition: tiffio.h:277
int _TIFFNoTileDecode(TIFF *, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:109
int(* TIFFSeekMethod)(TIFF *, uint32)
Definition: tiffiop.h:97
uint8 * tif_data
Definition: tiffiop.h:175
uint64 tif_diroff
Definition: tiffiop.h:130
uint32 tif_curtile
Definition: tiffiop.h:153
TIFFReadWriteProc tif_readproc
Definition: tiffiop.h:192
tmsize_t tif_size
Definition: tiffiop.h:187
TIFFVoidMethod tif_cleanup
Definition: tiffiop.h:172
GLdouble s
Definition: gl.h:2039
TIFFSizeProc tif_sizeproc
Definition: tiffiop.h:196
GLenum mode
Definition: glext.h:6217
union tiff::@3328 tif_header
TIFFCloseProc tif_closeproc
Definition: tiffiop.h:195
void _TIFFsetShortArray(uint16 **, uint16 *, uint32)
Definition: tif_dir.c:63
void _TIFFsetLongArray(uint32 **, uint32 *, uint32)
Definition: tif_dir.c:65
tidataval_t * tidata_t
Definition: tiffiop.h:91
void(* TIFFPostMethod)(TIFF *tif, uint8 *buf, tmsize_t size)
Definition: tiffiop.h:98
int _TIFFNoStripEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:58
TIFFField ** tif_fields
Definition: tiffiop.h:200
int _TIFFNoRowDecode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:95
uint32_t cc
Definition: isohybrid.c:75
int TIFFSetCompressionScheme(TIFF *tif, int scheme)
Definition: tif_compress.c:160
int tif_decodestatus
Definition: tiffiop.h:156
unsigned char tidataval_t
Definition: tiffiop.h:90
void _TIFFprintAsciiTag(FILE *, const char *, const char *)
Definition: tif_print.c:707
TIFFReadWriteProc tif_writeproc
Definition: tiffiop.h:193
TIFFHeaderBig big
Definition: tiffiop.h:140
int TIFFInitPackBits(TIFF *, int)
size_t TIFFIOSize_t
Definition: tiffiop.h:305
uint32 tif_row
Definition: tiffiop.h:143
int(* TIFFCodeMethod)(TIFF *tif, uint8 *buf, tmsize_t size, uint16 sample)
Definition: tiffiop.h:96
tmsize_t _TIFFReadEncodedStripAndAllocBuffer(TIFF *tif, uint32 strip, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
Definition: tif_read.c:557
void(* TIFFTileMethod)(TIFF *, uint32 *, uint32 *)
Definition: tiffiop.h:100
unsigned short uint16
Definition: types.h:30
TIFFBoolMethod tif_fixuptags
Definition: tiffiop.h:157
TIFFDirectory tif_dir
Definition: tiffiop.h:135
int _TIFFgetMode(const char *mode, const char *module)
Definition: tif_open.c:48
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
size_t tif_nfieldscompat
Definition: tiffiop.h:208
int(* TIFFPreMethod)(TIFF *, uint16)
Definition: tiffiop.h:95
void _TIFFsetString(char **, char *)
Definition: tif_dir.c:59
void _TIFFSwab16BitData(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1539
tmsize_t _TIFFReadTileAndAllocBuffer(TIFF *tif, void **buf, tmsize_t bufsizetoalloc, uint32 x, uint32 y, uint32 z, uint16 s)
Definition: tif_read.c:1032
int _TIFFNoStripDecode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:102
int TIFFInitPixarLog(TIFF *, int)
int _TIFFSeekOK(TIFF *tif, toff_t off)
Definition: tif_aux.c:361
TIFFHeaderClassic classic
Definition: tiffiop.h:139
void _TIFFsetFloatArray(float **, float *, uint32)
Definition: tif_dir.c:69
const TIFFField * tif_foundfield
Definition: tiffiop.h:202
uint32 tif_col
Definition: tiffiop.h:152
int(* TIFFMapFileProc)(thandle_t, void **base, toff_t *size)
Definition: tiffio.h:282
void _TIFFsetDoubleArray(double **, double *, uint32)
Definition: tif_dir.c:71
int TIFFFlushData1(TIFF *tif)
Definition: tif_write.c:792
#define TIFFInitWebP
Definition: tif_codec.c:78
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:160
TIFFStripMethod tif_defstripsize
Definition: tiffiop.h:173
uint16 tif_dirlistsize
Definition: tiffiop.h:133
TIFFErrorHandlerExt _TIFFerrorHandlerExt
Definition: tif_error.c:30
TIFFDataType
Definition: tiff.h:123
#define TIFFInitJPEG
Definition: tif_codec.c:48
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
off
Definition: i386-dis.c:3909
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:158