ReactOS 0.4.15-dev-7924-g5949c20
tif_open.c
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/*
26 * TIFF Library.
27 */
28#include <precomp.h>
29
30/*
31 * Dummy functions to fill the omitted client procedures.
32 */
33static int
35{
36 (void) fd; (void) pbase; (void) psize;
37 return (0);
38}
39
40static void
42{
43 (void) fd; (void) base; (void) size;
44}
45
46int
47_TIFFgetMode(const char* mode, const char* module)
48{
49 int m = -1;
50
51 switch (mode[0]) {
52 case 'r':
53 m = O_RDONLY;
54 if (mode[1] == '+')
55 m = O_RDWR;
56 break;
57 case 'w':
58 case 'a':
60 if (mode[0] == 'w')
61 m |= O_TRUNC;
62 break;
63 default:
64 TIFFErrorExt(0, module, "\"%s\": Bad mode", mode);
65 break;
66 }
67 return (m);
68}
69
70TIFF*
72 const char* name, const char* mode,
73 thandle_t clientdata,
75 TIFFReadWriteProc writeproc,
76 TIFFSeekProc seekproc,
77 TIFFCloseProc closeproc,
78 TIFFSizeProc sizeproc,
79 TIFFMapFileProc mapproc,
80 TIFFUnmapFileProc unmapproc
81)
82{
83 static const char module[] = "TIFFClientOpen";
84 TIFF *tif;
85 int m;
86 const char* cp;
87
88 /* The following are configuration checks. They should be redundant, but should not
89 * compile to any actual code in an optimised release build anyway. If any of them
90 * fail, (makefile-based or other) configuration is not correct */
91 assert(sizeof(uint8)==1);
92 assert(sizeof(int8)==1);
93 assert(sizeof(uint16)==2);
94 assert(sizeof(int16)==2);
95 assert(sizeof(uint32)==4);
96 assert(sizeof(int32)==4);
97 assert(sizeof(uint64)==8);
98 assert(sizeof(int64)==8);
99 assert(sizeof(tmsize_t)==sizeof(void*));
100 {
101 union{
102 uint8 a8[2];
103 uint16 a16;
104 } n;
105 n.a8[0]=1;
106 n.a8[1]=0;
107 #ifdef WORDS_BIGENDIAN
108 assert(n.a16==256);
109 #else
110 assert(n.a16==1);
111 #endif
112 }
113
115 if (m == -1)
116 goto bad2;
117 tif = (TIFF *)_TIFFmalloc((tmsize_t)(sizeof (TIFF) + strlen(name) + 1));
118 if (tif == NULL) {
119 TIFFErrorExt(clientdata, module, "%s: Out of memory (TIFF structure)", name);
120 goto bad2;
121 }
122 _TIFFmemset(tif, 0, sizeof (*tif));
123 tif->tif_name = (char *)tif + sizeof (TIFF);
124 strcpy(tif->tif_name, name);
125 tif->tif_mode = m &~ (O_CREAT|O_TRUNC);
126 tif->tif_curdir = (uint16) -1; /* non-existent directory */
127 tif->tif_curoff = 0;
128 tif->tif_curstrip = (uint32) -1; /* invalid strip */
129 tif->tif_row = (uint32) -1; /* read/write pre-increment */
130 tif->tif_clientdata = clientdata;
131 if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) {
132 TIFFErrorExt(clientdata, module,
133 "One of the client procedures is NULL pointer.");
134 _TIFFfree(tif);
135 goto bad2;
136 }
137 tif->tif_readproc = readproc;
138 tif->tif_writeproc = writeproc;
139 tif->tif_seekproc = seekproc;
140 tif->tif_closeproc = closeproc;
141 tif->tif_sizeproc = sizeproc;
142 if (mapproc)
143 tif->tif_mapproc = mapproc;
144 else
146 if (unmapproc)
147 tif->tif_unmapproc = unmapproc;
148 else
150 _TIFFSetDefaultCompressionState(tif); /* setup default state */
151 /*
152 * Default is to return data MSB2LSB and enable the
153 * use of memory-mapped files and strip chopping when
154 * a file is opened read-only.
155 */
157 if (m == O_RDONLY )
158 tif->tif_flags |= TIFF_MAPPED;
159
160 #ifdef STRIPCHOP_DEFAULT
161 if (m == O_RDONLY || m == O_RDWR)
163 #endif
164
165 /*
166 * Process library-specific flags in the open mode string.
167 * The following flags may be used to control intrinsic library
168 * behaviour that may or may not be desirable (usually for
169 * compatibility with some application that claims to support
170 * TIFF but only supports some brain dead idea of what the
171 * vendor thinks TIFF is):
172 *
173 * 'l' use little-endian byte order for creating a file
174 * 'b' use big-endian byte order for creating a file
175 * 'L' read/write information using LSB2MSB bit order
176 * 'B' read/write information using MSB2LSB bit order
177 * 'H' read/write information using host bit order
178 * 'M' enable use of memory-mapped files when supported
179 * 'm' disable use of memory-mapped files
180 * 'C' enable strip chopping support when reading
181 * 'c' disable strip chopping support
182 * 'h' read TIFF header only, do not load the first IFD
183 * '4' ClassicTIFF for creating a file (default)
184 * '8' BigTIFF for creating a file
185 * 'D' enable use of deferred strip/tile offset/bytecount array loading.
186 * 'O' on-demand loading of values instead of whole array loading (implies D)
187 *
188 * The use of the 'l' and 'b' flags is strongly discouraged.
189 * These flags are provided solely because numerous vendors,
190 * typically on the PC, do not correctly support TIFF; they
191 * only support the Intel little-endian byte order. This
192 * support is not configured by default because it supports
193 * the violation of the TIFF spec that says that readers *MUST*
194 * support both byte orders. It is strongly recommended that
195 * you not use this feature except to deal with busted apps
196 * that write invalid TIFF. And even in those cases you should
197 * bang on the vendors to fix their software.
198 *
199 * The 'L', 'B', and 'H' flags are intended for applications
200 * that can optimize operations on data by using a particular
201 * bit order. By default the library returns data in MSB2LSB
202 * bit order for compatibility with older versions of this
203 * library. Returning data in the bit order of the native CPU
204 * makes the most sense but also requires applications to check
205 * the value of the FillOrder tag; something they probably do
206 * not do right now.
207 *
208 * The 'M' and 'm' flags are provided because some virtual memory
209 * systems exhibit poor behaviour when large images are mapped.
210 * These options permit clients to control the use of memory-mapped
211 * files on a per-file basis.
212 *
213 * The 'C' and 'c' flags are provided because the library support
214 * for chopping up large strips into multiple smaller strips is not
215 * application-transparent and as such can cause problems. The 'c'
216 * option permits applications that only want to look at the tags,
217 * for example, to get the unadulterated TIFF tag information.
218 */
219 for (cp = mode; *cp; cp++)
220 switch (*cp) {
221 case 'b':
222 #ifndef WORDS_BIGENDIAN
223 if (m&O_CREAT)
224 tif->tif_flags |= TIFF_SWAB;
225 #endif
226 break;
227 case 'l':
228 #ifdef WORDS_BIGENDIAN
229 if ((m&O_CREAT))
230 tif->tif_flags |= TIFF_SWAB;
231 #endif
232 break;
233 case 'B':
234 tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
236 break;
237 case 'L':
238 tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
240 break;
241 case 'H':
242 tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
244 break;
245 case 'M':
246 if (m == O_RDONLY)
247 tif->tif_flags |= TIFF_MAPPED;
248 break;
249 case 'm':
250 if (m == O_RDONLY)
251 tif->tif_flags &= ~TIFF_MAPPED;
252 break;
253 case 'C':
254 if (m == O_RDONLY)
256 break;
257 case 'c':
258 if (m == O_RDONLY)
259 tif->tif_flags &= ~TIFF_STRIPCHOP;
260 break;
261 case 'h':
263 break;
264 case '8':
265 if (m&O_CREAT)
266 tif->tif_flags |= TIFF_BIGTIFF;
267 break;
268 case 'D':
270 break;
271 case 'O':
272 if( m == O_RDONLY )
274 break;
275 }
276
277#ifdef DEFER_STRILE_LOAD
278 /* Compatibility with old DEFER_STRILE_LOAD compilation flag */
279 /* Probably unneeded, since to the best of my knowledge (E. Rouault) */
280 /* GDAL was the only user of this, and will now use the new 'D' flag */
282#endif
283
284 /*
285 * Read in TIFF header.
286 */
287 if ((m & O_TRUNC) ||
288 !ReadOK(tif, &tif->tif_header, sizeof (TIFFHeaderClassic))) {
289 if (tif->tif_mode == O_RDONLY) {
291 "Cannot read TIFF header");
292 goto bad;
293 }
294 /*
295 * Setup header and write.
296 */
297 #ifdef WORDS_BIGENDIAN
300 #else
303 #endif
304 if (!(tif->tif_flags&TIFF_BIGTIFF))
305 {
308 if (tif->tif_flags & TIFF_SWAB)
310 tif->tif_header_size = sizeof(TIFFHeaderClassic);
311 }
312 else
313 {
316 tif->tif_header.big.tiff_unused = 0;
317 tif->tif_header.big.tiff_diroff = 0;
318 if (tif->tif_flags & TIFF_SWAB)
319 {
322 }
323 tif->tif_header_size = sizeof (TIFFHeaderBig);
324 }
325 /*
326 * The doc for "fopen" for some STD_C_LIBs says that if you
327 * open a file for modify ("+"), then you must fseek (or
328 * fflush?) between any freads and fwrites. This is not
329 * necessary on most systems, but has been shown to be needed
330 * on Solaris.
331 */
332 TIFFSeekFile( tif, 0, SEEK_SET );
333 if (!WriteOK(tif, &tif->tif_header, (tmsize_t)(tif->tif_header_size))) {
335 "Error writing TIFF header");
336 goto bad;
337 }
338 /*
339 * Setup the byte order handling.
340 */
342 #ifndef WORDS_BIGENDIAN
343 tif->tif_flags |= TIFF_SWAB;
344 #endif
345 } else {
346 #ifdef WORDS_BIGENDIAN
347 tif->tif_flags |= TIFF_SWAB;
348 #endif
349 }
350 /*
351 * Setup default directory.
352 */
353 if (!TIFFDefaultDirectory(tif))
354 goto bad;
355 tif->tif_diroff = 0;
356 tif->tif_dirlist = NULL;
357 tif->tif_dirlistsize = 0;
358 tif->tif_dirnumber = 0;
359 return (tif);
360 }
361 /*
362 * Setup the byte order handling.
363 */
366 #if MDI_SUPPORT
367 &&
370 #else
372 #endif
373 ) {
375 "Not a TIFF or MDI file, bad magic number %d (0x%x)",
376 #else
377 ) {
379 "Not a TIFF file, bad magic number %d (0x%x)",
380 #endif
383 goto bad;
384 }
386 #ifndef WORDS_BIGENDIAN
387 tif->tif_flags |= TIFF_SWAB;
388 #endif
389 } else {
390 #ifdef WORDS_BIGENDIAN
391 tif->tif_flags |= TIFF_SWAB;
392 #endif
393 }
394 if (tif->tif_flags & TIFF_SWAB)
399 "Not a TIFF file, bad version number %d (0x%x)",
402 goto bad;
403 }
405 {
406 if (tif->tif_flags & TIFF_SWAB)
408 tif->tif_header_size = sizeof(TIFFHeaderClassic);
409 }
410 else
411 {
412 if (!ReadOK(tif, ((uint8*)(&tif->tif_header) + sizeof(TIFFHeaderClassic)), (sizeof(TIFFHeaderBig)-sizeof(TIFFHeaderClassic))))
413 {
415 "Cannot read TIFF header");
416 goto bad;
417 }
418 if (tif->tif_flags & TIFF_SWAB)
419 {
422 }
423 if (tif->tif_header.big.tiff_offsetsize != 8)
424 {
426 "Not a TIFF file, bad BigTIFF offsetsize %d (0x%x)",
429 goto bad;
430 }
431 if (tif->tif_header.big.tiff_unused != 0)
432 {
434 "Not a TIFF file, bad BigTIFF unused %d (0x%x)",
437 goto bad;
438 }
439 tif->tif_header_size = sizeof(TIFFHeaderBig);
440 tif->tif_flags |= TIFF_BIGTIFF;
441 }
442 tif->tif_flags |= TIFF_MYBUFFER;
443 tif->tif_rawcp = tif->tif_rawdata = 0;
444 tif->tif_rawdatasize = 0;
445 tif->tif_rawdataoff = 0;
446 tif->tif_rawdataloaded = 0;
447
448 switch (mode[0]) {
449 case 'r':
450 if (!(tif->tif_flags&TIFF_BIGTIFF))
452 else
454 /*
455 * Try to use a memory-mapped file if the client
456 * has not explicitly suppressed usage with the
457 * 'm' flag in the open mode (see above).
458 */
459 if (tif->tif_flags & TIFF_MAPPED)
460 {
461 toff_t n;
462 if (TIFFMapFileContents(tif,(void**)(&tif->tif_base),&n))
463 {
464 tif->tif_size=(tmsize_t)n;
465 assert((toff_t)tif->tif_size==n);
466 }
467 else
468 tif->tif_flags &= ~TIFF_MAPPED;
469 }
470 /*
471 * Sometimes we do not want to read the first directory (for example,
472 * it may be broken) and want to proceed to other directories. I this
473 * case we use the TIFF_HEADERONLY flag to open file and return
474 * immediately after reading TIFF header.
475 */
476 if (tif->tif_flags & TIFF_HEADERONLY)
477 return (tif);
478
479 /*
480 * Setup initial directory.
481 */
482 if (TIFFReadDirectory(tif)) {
483 tif->tif_rawcc = (tmsize_t)-1;
485 return (tif);
486 }
487 break;
488 case 'a':
489 /*
490 * New directories are automatically append
491 * to the end of the directory chain when they
492 * are written out (see TIFFWriteDirectory).
493 */
494 if (!TIFFDefaultDirectory(tif))
495 goto bad;
496 return (tif);
497 }
498bad:
499 tif->tif_mode = O_RDONLY; /* XXX avoid flush */
500 TIFFCleanup(tif);
501bad2:
502 return ((TIFF*)0);
503}
504
505/*
506 * Query functions to access private data.
507 */
508
509/*
510 * Return open file's name.
511 */
512const char *
514{
515 return (tif->tif_name);
516}
517
518/*
519 * Set the file name.
520 */
521const char *
522TIFFSetFileName(TIFF* tif, const char *name)
523{
524 const char* old_name = tif->tif_name;
525 tif->tif_name = (char *)name;
526 return (old_name);
527}
528
529/*
530 * Return open file's I/O descriptor.
531 */
532int
534{
535 return (tif->tif_fd);
536}
537
538/*
539 * Set open file's I/O descriptor, and return previous value.
540 */
541int
543{
544 int old_fd = tif->tif_fd;
545 tif->tif_fd = fd;
546 return old_fd;
547}
548
549/*
550 * Return open file's clientdata.
551 */
554{
555 return (tif->tif_clientdata);
556}
557
558/*
559 * Set open file's clientdata, and return previous value.
560 */
563{
565 tif->tif_clientdata = newvalue;
566 return m;
567}
568
569/*
570 * Return read/write mode.
571 */
572int
574{
575 return (tif->tif_mode);
576}
577
578/*
579 * Return read/write mode.
580 */
581int
583{
584 int old_mode = tif->tif_mode;
585 tif->tif_mode = mode;
586 return (old_mode);
587}
588
589/*
590 * Return nonzero if file is organized in
591 * tiles; zero if organized as strips.
592 */
593int
595{
596 return (isTiled(tif));
597}
598
599/*
600 * Return current row being read/written.
601 */
602uint32
604{
605 return (tif->tif_row);
606}
607
608/*
609 * Return index of the current directory.
610 */
611uint16
613{
614 return (tif->tif_curdir);
615}
616
617/*
618 * Return current strip.
619 */
620uint32
622{
623 return (tif->tif_curstrip);
624}
625
626/*
627 * Return current tile.
628 */
629uint32
631{
632 return (tif->tif_curtile);
633}
634
635/*
636 * Return nonzero if the file has byte-swapped data.
637 */
638int
640{
641 return ((tif->tif_flags & TIFF_SWAB) != 0);
642}
643
644/*
645 * Return nonzero if the data is returned up-sampled.
646 */
647int
649{
650 return (isUpSampled(tif));
651}
652
653/*
654 * Return nonzero if the data is returned in MSB-to-LSB bit order.
655 */
656int
658{
659 return (isFillOrder(tif, FILLORDER_MSB2LSB));
660}
661
662/*
663 * Return nonzero if given file was written in big-endian order.
664 */
665int
667{
669}
670
671/*
672 * Return pointer to file read method.
673 */
676{
677 return (tif->tif_readproc);
678}
679
680/*
681 * Return pointer to file write method.
682 */
685{
686 return (tif->tif_writeproc);
687}
688
689/*
690 * Return pointer to file seek method.
691 */
694{
695 return (tif->tif_seekproc);
696}
697
698/*
699 * Return pointer to file close method.
700 */
703{
704 return (tif->tif_closeproc);
705}
706
707/*
708 * Return pointer to file size requesting method.
709 */
712{
713 return (tif->tif_sizeproc);
714}
715
716/*
717 * Return pointer to memory mapping method.
718 */
721{
722 return (tif->tif_mapproc);
723}
724
725/*
726 * Return pointer to memory unmapping method.
727 */
730{
731 return (tif->tif_unmapproc);
732}
733
734/* vim: set ts=8 sts=8 sw=8 noet: */
735/*
736 * Local Variables:
737 * mode: c
738 * c-basic-offset: 8
739 * fill-column: 78
740 * End:
741 */
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define O_CREAT
Definition: acwin.h:110
#define O_RDONLY
Definition: acwin.h:108
#define O_TRUNC
Definition: acwin.h:112
unsigned short uint16
Definition: types.h:30
unsigned int uint32
Definition: types.h:32
unsigned char uint8
Definition: types.h:28
#define NULL
Definition: types.h:112
#define assert(x)
Definition: debug.h:53
unsigned long long uint64
Definition: platform.h:18
short int16
Definition: platform.h:11
long int32
Definition: platform.h:12
char int8
Definition: platform.h:10
long long int64
Definition: platform.h:13
GLsizeiptr size
Definition: glext.h:5919
GLdouble n
Definition: glext.h:7729
GLenum mode
Definition: glext.h:6217
const GLfloat * m
Definition: glext.h:10848
#define O_RDWR
Definition: fcntl.h:36
#define SEEK_SET
Definition: jmemansi.c:26
if(dx< 0)
Definition: linetemp.h:194
POINT cp
Definition: magnifier.c:59
static BOOL readproc(HANDLE proc, LPVOID address, PVOID target, DWORD size)
Definition: env.c:191
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
static int fd
Definition: io.c:51
uint64 tiff_diroff
Definition: tiff.h:105
uint16 tiff_offsetsize
Definition: tiff.h:103
uint16 tiff_unused
Definition: tiff.h:104
uint32 tiff_diroff
Definition: tiff.h:98
uint16 tiff_version
Definition: tiff.h:93
uint16 tiff_magic
Definition: tiff.h:92
Definition: name.c:39
Definition: tiffiop.h:115
uint64 * tif_dirlist
Definition: tiffiop.h:148
TIFFReadWriteProc tif_readproc
Definition: tiffiop.h:208
TIFFReadWriteProc tif_writeproc
Definition: tiffiop.h:209
uint16 tif_dirnumber
Definition: tiffiop.h:150
TIFFUnmapFileProc tif_unmapproc
Definition: tiffiop.h:205
TIFFHeaderClassic classic
Definition: tiffiop.h:155
TIFFSeekProc tif_seekproc
Definition: tiffiop.h:210
TIFFHeaderBig big
Definition: tiffiop.h:156
tmsize_t tif_rawdataloaded
Definition: tiffiop.h:198
tmsize_t tif_rawcc
Definition: tiffiop.h:200
TIFFCloseProc tif_closeproc
Definition: tiffiop.h:211
thandle_t tif_clientdata
Definition: tiffiop.h:207
uint8 * tif_base
Definition: tiffiop.h:202
char * tif_name
Definition: tiffiop.h:116
uint16 tif_curdir
Definition: tiffiop.h:160
uint32 tif_flags
Definition: tiffiop.h:119
tmsize_t tif_size
Definition: tiffiop.h:203
uint64 tif_nextdiroff
Definition: tiffiop.h:147
int tif_fd
Definition: tiffiop.h:117
uint32 tif_curstrip
Definition: tiffiop.h:161
uint32 tif_row
Definition: tiffiop.h:159
TIFFMapFileProc tif_mapproc
Definition: tiffiop.h:204
uint32 tif_curtile
Definition: tiffiop.h:169
uint64 tif_diroff
Definition: tiffiop.h:146
tmsize_t tif_rawdatasize
Definition: tiffiop.h:196
union tiff::@3468 tif_header
tmsize_t tif_rawdataoff
Definition: tiffiop.h:197
uint8 * tif_rawcp
Definition: tiffiop.h:199
uint16 tif_header_size
Definition: tiffiop.h:158
int tif_mode
Definition: tiffiop.h:118
uint64 tif_curoff
Definition: tiffiop.h:162
uint8 * tif_rawdata
Definition: tiffiop.h:195
TIFFSizeProc tif_sizeproc
Definition: tiffiop.h:212
uint16 tif_dirlistsize
Definition: tiffiop.h:149
TIFFHeaderCommon common
Definition: tiffiop.h:154
void TIFFCleanup(TIFF *tif)
Definition: tif_close.c:46
void _TIFFSetDefaultCompressionState(TIFF *tif)
Definition: tif_compress.c:135
#define HOST_FILLORDER
Definition: tif_config.h:113
int TIFFDefaultDirectory(TIFF *tif)
Definition: tif_dir.c:1372
int TIFFReadDirectory(TIFF *tif)
Definition: tif_dirread.c:3574
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
int TIFFGetMode(TIFF *tif)
Definition: tif_open.c:573
int TIFFFileno(TIFF *tif)
Definition: tif_open.c:533
TIFF * TIFFClientOpen(const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
Definition: tif_open.c:71
TIFFReadWriteProc TIFFGetReadProc(TIFF *tif)
Definition: tif_open.c:675
uint32 TIFFCurrentTile(TIFF *tif)
Definition: tif_open.c:630
int TIFFSetFileno(TIFF *tif, int fd)
Definition: tif_open.c:542
TIFFCloseProc TIFFGetCloseProc(TIFF *tif)
Definition: tif_open.c:702
const char * TIFFFileName(TIFF *tif)
Definition: tif_open.c:513
uint16 TIFFCurrentDirectory(TIFF *tif)
Definition: tif_open.c:612
TIFFSizeProc TIFFGetSizeProc(TIFF *tif)
Definition: tif_open.c:711
int TIFFSetMode(TIFF *tif, int mode)
Definition: tif_open.c:582
static void _tiffDummyUnmapProc(thandle_t fd, void *base, toff_t size)
Definition: tif_open.c:41
int _TIFFgetMode(const char *mode, const char *module)
Definition: tif_open.c:47
int TIFFIsMSB2LSB(TIFF *tif)
Definition: tif_open.c:657
int TIFFIsByteSwapped(TIFF *tif)
Definition: tif_open.c:639
TIFFMapFileProc TIFFGetMapFileProc(TIFF *tif)
Definition: tif_open.c:720
int TIFFIsTiled(TIFF *tif)
Definition: tif_open.c:594
const char * TIFFSetFileName(TIFF *tif, const char *name)
Definition: tif_open.c:522
uint32 TIFFCurrentRow(TIFF *tif)
Definition: tif_open.c:603
TIFFSeekProc TIFFGetSeekProc(TIFF *tif)
Definition: tif_open.c:693
thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue)
Definition: tif_open.c:562
TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *tif)
Definition: tif_open.c:729
int TIFFIsBigEndian(TIFF *tif)
Definition: tif_open.c:666
static int _tiffDummyMapProc(thandle_t fd, void **pbase, toff_t *psize)
Definition: tif_open.c:34
int TIFFIsUpSampled(TIFF *tif)
Definition: tif_open.c:648
TIFFReadWriteProc TIFFGetWriteProc(TIFF *tif)
Definition: tif_open.c:684
uint32 TIFFCurrentStrip(TIFF *tif)
Definition: tif_open.c:621
thandle_t TIFFClientdata(TIFF *tif)
Definition: tif_open.c:553
void TIFFSwabLong(uint32 *lp)
Definition: tif_swab.c:45
void TIFFSwabShort(uint16 *wp)
Definition: tif_swab.c:34
void TIFFSwabLong8(uint64 *lp)
Definition: tif_swab.c:57
void _TIFFfree(void *p)
Definition: tif_unix.c:326
void _TIFFmemset(void *p, int v, tmsize_t c)
Definition: tif_unix.c:338
void * _TIFFmalloc(tmsize_t s)
Definition: tif_unix.c:309
#define FILLORDER_LSB2MSB
Definition: tiff.h:216
#define TIFF_LITTLEENDIAN
Definition: tiff.h:52
#define MDI_LITTLEENDIAN
Definition: tiff.h:53
#define FILLORDER_MSB2LSB
Definition: tiff.h:215
#define MDI_BIGENDIAN
Definition: tiff.h:54
#define TIFF_VERSION_BIG
Definition: tiff.h:49
#define TIFF_VERSION_CLASSIC
Definition: tiff.h:48
#define TIFF_BIGENDIAN
Definition: tiff.h:51
#define HOST_BIGENDIAN
Definition: tiffconf.h:86
#define STRIPCHOP_DEFAULT
Definition: tiffconf.h:124
#define MDI_SUPPORT
Definition: tiffconf.h:139
uint64 toff_t
Definition: tiffio.h:66
int(* TIFFMapFileProc)(thandle_t, void **base, toff_t *size)
Definition: tiffio.h:277
struct tiff TIFF
Definition: tiffio.h:38
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
void(* TIFFUnmapFileProc)(thandle_t, void *base, toff_t size)
Definition: tiffio.h:278
toff_t(* TIFFSizeProc)(thandle_t)
Definition: tiffio.h:276
tmsize_t(* TIFFReadWriteProc)(thandle_t, void *, tmsize_t)
Definition: tiffio.h:273
toff_t(* TIFFSeekProc)(thandle_t, toff_t, int)
Definition: tiffio.h:274
int(* TIFFCloseProc)(thandle_t)
Definition: tiffio.h:275
#define isTiled(tif)
Definition: tiffiop.h:229
#define TIFF_LAZYSTRILELOAD
Definition: tiffiop.h:144
#define WriteOK(tif, buf, size)
Definition: tiffiop.h:259
#define isUpSampled(tif)
Definition: tiffiop.h:232
#define TIFF_MYBUFFER
Definition: tiffiop.h:128
#define TIFF_BUFFERSETUP
Definition: tiffiop.h:123
#define ReadOK(tif, buf, size)
Definition: tiffiop.h:252
#define TIFF_HEADERONLY
Definition: tiffiop.h:135
#define TIFFMapFileContents(tif, paddr, psize)
Definition: tiffiop.h:243
#define TIFF_STRIPCHOP
Definition: tiffiop.h:134
#define TIFF_DEFERSTRILELOAD
Definition: tiffiop.h:143
#define isFillOrder(tif, o)
Definition: tiffiop.h:231
#define TIFFSeekFile(tif, off, whence)
Definition: tiffiop.h:237
#define TIFF_MAPPED
Definition: tiffiop.h:130
#define TIFF_BIGTIFF
Definition: tiffiop.h:138
#define TIFF_SWAB
Definition: tiffiop.h:126
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList