32 static const long typemask[13] = {
47 static const int bigTypeshift[13] = {
62 static const int litTypeshift[13] = {
84 (void) fd; (void) pbase; (void) psize;
91 (void) fd; (void) base; (void) size;
100 TIFFInitOrder(
TIFF* tif,
int magic,
int bigendian)
140 const char* name,
const char* mode,
151 static const char module[] =
"TIFFClientOpen";
161 TIFFErrorExt(clientdata, module,
"%s: Out of memory (TIFF structure)", name);
167 tif->
tif_mode = m &~ (O_CREAT|O_TRUNC);
173 if (!readproc || !writeproc || !seekproc || !closeproc || !sizeproc) {
175 "One of the client procedures is NULL pointer.");
201 #ifdef STRIPCHOP_DEFAULT 202 if (m == O_RDONLY || m == O_RDWR)
206 {
union { int32 i;
char c[4]; } u; u.i = 1; bigendian = u.c[0] == 0; }
257 for (cp = mode; *cp; cp++)
260 if ((m&O_CREAT) && !bigendian)
264 if ((m&O_CREAT) && bigendian)
306 "Cannot read TIFF header");
332 "Error writing TIFF header");
364 "Not a TIFF or MDI file, bad magic number %d (0x%x)",
368 "Not a TIFF file, bad magic number %d (0x%x)",
389 "This is a BigTIFF file. This format not supported\n" 390 "by this version of libtiff." );
395 "Not a TIFF file, bad version number %d (0x%x)",
469 const char* old_name = tif->
tif_name;
TIFFSeekProc tif_seekproc
int TIFFSetMode(TIFF *tif, int mode)
int(* TIFFCloseProc)(thandle_t)
int TIFFReadDirectory(TIFF *tif)
thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue)
tstrip_t TIFFCurrentStrip(TIFF *tif)
TIFFCloseProc TIFFGetCloseProc(TIFF *tif)
TIFFUnmapFileProc tif_unmapproc
const char * TIFFSetFileName(TIFF *tif, const char *name)
#define WriteOK(tif, buf, size)
#define TIFFSeekFile(tif, off, whence)
#define FILLORDER_LSB2MSB
int TIFFIsMSB2LSB(TIFF *tif)
void TIFFCleanup(TIFF *tif)
uint32 TIFFCurrentRow(TIFF *tif)
int TIFFIsBigEndian(TIFF *tif)
TIFFReadWriteProc TIFFGetWriteProc(TIFF *tif)
toff_t(* TIFFSeekProc)(thandle_t, toff_t, int)
void(* TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t)
toff_t(* TIFFSizeProc)(thandle_t)
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)
TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *tif)
TIFFSizeProc TIFFGetSizeProc(TIFF *tif)
#define TIFFMapFileContents(tif, paddr, psize)
TIFFMapFileProc tif_mapproc
void TIFFSwabShort(uint16 *wp)
tsize_t(* TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t)
ttile_t TIFFCurrentTile(TIFF *tif)
TIFFSeekProc TIFFGetSeekProc(TIFF *tif)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
int(* TIFFMapFileProc)(thandle_t, tdata_t *, toff_t *)
TIFFReadWriteProc TIFFGetReadProc(TIFF *tif)
TIFFReadWriteProc tif_readproc
#define TIFF_BIGTIFF_VERSION
TIFFSizeProc tif_sizeproc
void _TIFFmemset(tdata_t p, int v, tsize_t c)
void _TIFFSetDefaultCompressionState(TIFF *tif)
TIFFCloseProc tif_closeproc
TIFFMapFileProc TIFFGetMapFileProc(TIFF *tif)
int TIFFGetMode(TIFF *tif)
TIFFReadWriteProc tif_writeproc
int TIFFIsByteSwapped(TIFF *tif)
void TIFFSwabLong(uint32 *lp)
#define TIFF_LITTLEENDIAN
int _TIFFgetMode(const char *mode, const char *module)
#define isFillOrder(tif, o)
const char * TIFFFileName(TIFF *tif)
void * _TIFFmalloc(tsize_t s)
const long * tif_typemask
int TIFFDefaultDirectory(TIFF *tif)
#define ReadOK(tif, buf, size)
int TIFFIsTiled(TIFF *tif)
int TIFFSetFileno(TIFF *tif, int fd)
tdir_t TIFFCurrentDirectory(TIFF *tif)
#define STRIPCHOP_DEFAULT
thandle_t TIFFClientdata(TIFF *tif)
const int * tif_typeshift
int TIFFIsUpSampled(TIFF *tif)
#define FILLORDER_MSB2LSB
int TIFFFileno(TIFF *tif)