Bsoft  1.9
Bernard's software package
tiffiop.h File Reference
#include "tif_config.h"
#include <fcntl.h>
#include <sys/types.h>
#include <string.h>
#include <assert.h>
#include <search.h>
#include "tiffio.h"
#include "tif_dir.h"

Go to the source code of this file.

Classes

struct  client_info
 
struct  tiff
 

Macros

#define streq(a, b)    (strcmp(a,b) == 0)
 
#define TRUE   1
 
#define FALSE   0
 
#define TIFF_FILLORDER   0x00003 /* natural bit fill order for machine */
 
#define TIFF_DIRTYHEADER   0x00004 /* header must be written on close */
 
#define TIFF_DIRTYDIRECT   0x00008 /* current directory must be written */
 
#define TIFF_BUFFERSETUP   0x00010 /* data buffers setup */
 
#define TIFF_CODERSETUP   0x00020 /* encoder/decoder setup done */
 
#define TIFF_BEENWRITING   0x00040 /* written 1+ scanlines to file */
 
#define TIFF_SWAB   0x00080 /* byte swap file information */
 
#define TIFF_NOBITREV   0x00100 /* inhibit bit reversal logic */
 
#define TIFF_MYBUFFER   0x00200 /* my raw data buffer; free on close */
 
#define TIFF_ISTILED   0x00400 /* file is tile, not strip- based */
 
#define TIFF_MAPPED   0x00800 /* file is mapped into memory */
 
#define TIFF_POSTENCODE   0x01000 /* need call to postencode routine */
 
#define TIFF_INSUBIFD   0x02000 /* currently writing a subifd */
 
#define TIFF_UPSAMPLED   0x04000 /* library is doing data up-sampling */
 
#define TIFF_STRIPCHOP   0x08000 /* enable strip chopping support */
 
#define TIFF_HEADERONLY   0x10000 /* read header only, do not process */
 
#define TIFF_NOREADRAW   0x20000 /* skip reading of raw uncompressed */
 
#define TIFF_INCUSTOMIFD   0x40000 /* currently writing a custom IFD */
 
#define isPseudoTag(t)   (t > 0xffff) /* is tag value normal or pseudo */
 
#define isTiled(tif)   (((tif)->tif_flags & TIFF_ISTILED) != 0)
 
#define isMapped(tif)   (((tif)->tif_flags & TIFF_MAPPED) != 0)
 
#define isFillOrder(tif, o)   (((tif)->tif_flags & (o)) != 0)
 
#define isUpSampled(tif)   (((tif)->tif_flags & TIFF_UPSAMPLED) != 0)
 
#define TIFFReadFile(tif, buf, size)   ((*(tif)->tif_readproc)((tif)->tif_clientdata,buf,size))
 
#define TIFFWriteFile(tif, buf, size)   ((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size))
 
#define TIFFSeekFile(tif, off, whence)   ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence))
 
#define TIFFCloseFile(tif)   ((*(tif)->tif_closeproc)((tif)->tif_clientdata))
 
#define TIFFGetFileSize(tif)   ((*(tif)->tif_sizeproc)((tif)->tif_clientdata))
 
#define TIFFMapFileContents(tif, paddr, psize)   ((*(tif)->tif_mapproc)((tif)->tif_clientdata,paddr,psize))
 
#define TIFFUnmapFileContents(tif, addr, size)   ((*(tif)->tif_unmapproc)((tif)->tif_clientdata,addr,size))
 
#define ReadOK(tif, buf, size)   (TIFFReadFile(tif, (tdata_t) buf, (tsize_t)(size)) == (tsize_t)(size))
 
#define SeekOK(tif, off)   (TIFFSeekFile(tif, (toff_t) off, SEEK_SET) == (toff_t) off)
 
#define WriteOK(tif, buf, size)   (TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size)
 
#define TIFFhowmany(x, y)
 
#define TIFFhowmany8(x)   (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3)
 
#define TIFFroundup(x, y)   (TIFFhowmany(x,y)*(y))
 
#define TIFFSafeMultiply(t, v, m)   ((((t)m != (t)0) && (((t)((v*m)/m)) == (t)v)) ? (t)(v*m) : (t)0)
 
#define TIFFmax(A, B)   ((A)>(B)?(A):(B))
 
#define TIFFmin(A, B)   ((A)<(B)?(A):(B))
 
#define TIFFArrayCount(a)   (sizeof (a) / sizeof ((a)[0]))
 

Typedefs

typedef TIFF_INT64_T int64
 
typedef TIFF_UINT64_T uint64
 
typedef struct client_info TIFFClientInfoLink
 
typedef unsigned char tidataval_t
 
typedef tidataval_t * tidata_t
 
typedef void(* TIFFVoidMethod) (TIFF *)
 
typedef int(* TIFFBoolMethod) (TIFF *)
 
typedef int(* TIFFPreMethod) (TIFF *, tsample_t)
 
typedef int(* TIFFCodeMethod) (TIFF *, tidata_t, tsize_t, tsample_t)
 
typedef int(* TIFFSeekMethod) (TIFF *, uint32)
 
typedef void(* TIFFPostMethod) (TIFF *, tidata_t, tsize_t)
 
typedef uint32(* TIFFStripMethod) (TIFF *, uint32)
 
typedef void(* TIFFTileMethod) (TIFF *, uint32 *, uint32 *)
 

Functions

int _TIFFgetMode (const char *, const char *)
 
int _TIFFNoRowEncode (TIFF *, tidata_t, tsize_t, tsample_t)
 
int _TIFFNoStripEncode (TIFF *, tidata_t, tsize_t, tsample_t)
 
int _TIFFNoTileEncode (TIFF *, tidata_t, tsize_t, tsample_t)
 
int _TIFFNoRowDecode (TIFF *, tidata_t, tsize_t, tsample_t)
 
int _TIFFNoStripDecode (TIFF *, tidata_t, tsize_t, tsample_t)
 
int _TIFFNoTileDecode (TIFF *, tidata_t, tsize_t, tsample_t)
 
void _TIFFNoPostDecode (TIFF *, tidata_t, tsize_t)
 
int _TIFFNoPreCode (TIFF *, tsample_t)
 
int _TIFFNoSeek (TIFF *, uint32)
 
void _TIFFSwab16BitData (TIFF *, tidata_t, tsize_t)
 
void _TIFFSwab24BitData (TIFF *, tidata_t, tsize_t)
 
void _TIFFSwab32BitData (TIFF *, tidata_t, tsize_t)
 
void _TIFFSwab64BitData (TIFF *, tidata_t, tsize_t)
 
int TIFFFlushData1 (TIFF *)
 
int TIFFDefaultDirectory (TIFF *)
 
void _TIFFSetDefaultCompressionState (TIFF *)
 
int TIFFSetCompressionScheme (TIFF *, int)
 
int TIFFSetDefaultCompressionState (TIFF *)
 
uint32 _TIFFDefaultStripSize (TIFF *, uint32)
 
void _TIFFDefaultTileSize (TIFF *, uint32 *, uint32 *)
 
int _TIFFDataSize (TIFFDataType)
 
void _TIFFsetByteArray (void **, void *, uint32)
 
void _TIFFsetString (char **, char *)
 
void _TIFFsetShortArray (uint16 **, uint16 *, uint32)
 
void _TIFFsetLongArray (uint32 **, uint32 *, uint32)
 
void _TIFFsetFloatArray (float **, float *, uint32)
 
void _TIFFsetDoubleArray (double **, double *, uint32)
 
void _TIFFprintAscii (FILE *, const char *)
 
void _TIFFprintAsciiTag (FILE *, const char *, const char *)
 
tdata_t _TIFFCheckMalloc (TIFF *, size_t, size_t, const char *)
 
tdata_t _TIFFCheckRealloc (TIFF *, tdata_t, size_t, size_t, const char *)
 
int TIFFInitDumpMode (TIFF *, int)
 
int TIFFInitPackBits (TIFF *, int)
 
int TIFFInitCCITTRLE (TIFF *, int)
 
int TIFFInitCCITTRLEW (TIFF *, int)
 
int TIFFInitCCITTFax3 (TIFF *, int)
 
int TIFFInitCCITTFax4 (TIFF *, int)
 
int TIFFInitThunderScan (TIFF *, int)
 
int TIFFInitNeXT (TIFF *, int)
 
int TIFFInitLZW (TIFF *, int)
 
int TIFFInitZIP (TIFF *, int)
 
int TIFFInitPixarLog (TIFF *, int)
 
int TIFFInitSGILog (TIFF *, int)
 

Variables

TIFFErrorHandler _TIFFwarningHandler
 
TIFFErrorHandler _TIFFerrorHandler
 
TIFFErrorHandlerExt _TIFFwarningHandlerExt
 
TIFFErrorHandlerExt _TIFFerrorHandlerExt
 
TIFFCodec _TIFFBuiltinCODECS []
 

Macro Definition Documentation

#define FALSE   0

Definition at line 78 of file tiffiop.h.

#define isFillOrder (   tif,
  o 
)    (((tif)->tif_flags & (o)) != 0)

Definition at line 205 of file tiffiop.h.

#define isMapped (   tif)    (((tif)->tif_flags & TIFF_MAPPED) != 0)

Definition at line 204 of file tiffiop.h.

#define isPseudoTag (   t)    (t > 0xffff) /* is tag value normal or pseudo */

Definition at line 201 of file tiffiop.h.

#define isTiled (   tif)    (((tif)->tif_flags & TIFF_ISTILED) != 0)

Definition at line 203 of file tiffiop.h.

#define isUpSampled (   tif)    (((tif)->tif_flags & TIFF_UPSAMPLED) != 0)

Definition at line 206 of file tiffiop.h.

#define ReadOK (   tif,
  buf,
  size 
)    (TIFFReadFile(tif, (tdata_t) buf, (tsize_t)(size)) == (tsize_t)(size))

Definition at line 226 of file tiffiop.h.

#define SeekOK (   tif,
  off 
)    (TIFFSeekFile(tif, (toff_t) off, SEEK_SET) == (toff_t) off)

Definition at line 230 of file tiffiop.h.

#define streq (   a,
  b 
)    (strcmp(a,b) == 0)

Definition at line 74 of file tiffiop.h.

#define TIFF_BEENWRITING   0x00040 /* written 1+ scanlines to file */

Definition at line 112 of file tiffiop.h.

#define TIFF_BUFFERSETUP   0x00010 /* data buffers setup */

Definition at line 110 of file tiffiop.h.

#define TIFF_CODERSETUP   0x00020 /* encoder/decoder setup done */

Definition at line 111 of file tiffiop.h.

#define TIFF_DIRTYDIRECT   0x00008 /* current directory must be written */

Definition at line 109 of file tiffiop.h.

#define TIFF_DIRTYHEADER   0x00004 /* header must be written on close */

Definition at line 108 of file tiffiop.h.

#define TIFF_FILLORDER   0x00003 /* natural bit fill order for machine */

Definition at line 107 of file tiffiop.h.

#define TIFF_HEADERONLY   0x10000 /* read header only, do not process */

Definition at line 122 of file tiffiop.h.

#define TIFF_INCUSTOMIFD   0x40000 /* currently writing a custom IFD */

Definition at line 126 of file tiffiop.h.

#define TIFF_INSUBIFD   0x02000 /* currently writing a subifd */

Definition at line 119 of file tiffiop.h.

#define TIFF_ISTILED   0x00400 /* file is tile, not strip- based */

Definition at line 116 of file tiffiop.h.

#define TIFF_MAPPED   0x00800 /* file is mapped into memory */

Definition at line 117 of file tiffiop.h.

#define TIFF_MYBUFFER   0x00200 /* my raw data buffer; free on close */

Definition at line 115 of file tiffiop.h.

#define TIFF_NOBITREV   0x00100 /* inhibit bit reversal logic */

Definition at line 114 of file tiffiop.h.

#define TIFF_NOREADRAW   0x20000 /* skip reading of raw uncompressed */

Definition at line 124 of file tiffiop.h.

#define TIFF_POSTENCODE   0x01000 /* need call to postencode routine */

Definition at line 118 of file tiffiop.h.

#define TIFF_STRIPCHOP   0x08000 /* enable strip chopping support */

Definition at line 121 of file tiffiop.h.

#define TIFF_SWAB   0x00080 /* byte swap file information */

Definition at line 113 of file tiffiop.h.

#define TIFF_UPSAMPLED   0x04000 /* library is doing data up-sampling */

Definition at line 120 of file tiffiop.h.

#define TIFFArrayCount (   a)    (sizeof (a) / sizeof ((a)[0]))

Definition at line 251 of file tiffiop.h.

#define TIFFCloseFile (   tif)    ((*(tif)->tif_closeproc)((tif)->tif_clientdata))

Definition at line 213 of file tiffiop.h.

#define TIFFGetFileSize (   tif)    ((*(tif)->tif_sizeproc)((tif)->tif_clientdata))

Definition at line 215 of file tiffiop.h.

#define TIFFhowmany (   x,
  y 
)
Value:
(((uint32)x < (0xffffffff - (uint32)(y-1))) ? \
((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \
0U)

Definition at line 239 of file tiffiop.h.

#define TIFFhowmany8 (   x)    (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3)

Definition at line 242 of file tiffiop.h.

#define TIFFMapFileContents (   tif,
  paddr,
  psize 
)    ((*(tif)->tif_mapproc)((tif)->tif_clientdata,paddr,psize))

Definition at line 217 of file tiffiop.h.

#define TIFFmax (   A,
  B 
)    ((A)>(B)?(A):(B))

Definition at line 248 of file tiffiop.h.

#define TIFFmin (   A,
  B 
)    ((A)<(B)?(A):(B))

Definition at line 249 of file tiffiop.h.

#define TIFFReadFile (   tif,
  buf,
  size 
)    ((*(tif)->tif_readproc)((tif)->tif_clientdata,buf,size))

Definition at line 207 of file tiffiop.h.

#define TIFFroundup (   x,
  y 
)    (TIFFhowmany(x,y)*(y))

Definition at line 243 of file tiffiop.h.

#define TIFFSafeMultiply (   t,
  v,
  m 
)    ((((t)m != (t)0) && (((t)((v*m)/m)) == (t)v)) ? (t)(v*m) : (t)0)

Definition at line 246 of file tiffiop.h.

#define TIFFSeekFile (   tif,
  off,
  whence 
)    ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence))

Definition at line 211 of file tiffiop.h.

#define TIFFUnmapFileContents (   tif,
  addr,
  size 
)    ((*(tif)->tif_unmapproc)((tif)->tif_clientdata,addr,size))

Definition at line 219 of file tiffiop.h.

#define TIFFWriteFile (   tif,
  buf,
  size 
)    ((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size))

Definition at line 209 of file tiffiop.h.

#define TRUE   1

Definition at line 77 of file tiffiop.h.

#define WriteOK (   tif,
  buf,
  size 
)    (TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size)

Definition at line 234 of file tiffiop.h.

Typedef Documentation

Definition at line 64 of file tiffiop.h.

Definition at line 91 of file tiffiop.h.

typedef unsigned char tidataval_t

Definition at line 90 of file tiffiop.h.

typedef int(* TIFFBoolMethod) (TIFF *)

Definition at line 94 of file tiffiop.h.

typedef int(* TIFFCodeMethod) (TIFF *, tidata_t, tsize_t, tsample_t)

Definition at line 96 of file tiffiop.h.

typedef void(* TIFFPostMethod) (TIFF *, tidata_t, tsize_t)

Definition at line 98 of file tiffiop.h.

typedef int(* TIFFPreMethod) (TIFF *, tsample_t)

Definition at line 95 of file tiffiop.h.

typedef int(* TIFFSeekMethod) (TIFF *, uint32)

Definition at line 97 of file tiffiop.h.

typedef uint32(* TIFFStripMethod) (TIFF *, uint32)

Definition at line 99 of file tiffiop.h.

typedef void(* TIFFTileMethod) (TIFF *, uint32 *, uint32 *)

Definition at line 100 of file tiffiop.h.

typedef void(* TIFFVoidMethod) (TIFF *)

Definition at line 93 of file tiffiop.h.

Definition at line 65 of file tiffiop.h.

Function Documentation

tdata_t _TIFFCheckMalloc ( TIFF *  ,
size_t  ,
size_t  ,
const char *   
)

Definition at line 59 of file tif_aux.c.

tdata_t _TIFFCheckRealloc ( TIFF *  ,
tdata_t  ,
size_t  ,
size_t  ,
const char *   
)

Definition at line 37 of file tif_aux.c.

int _TIFFDataSize ( TIFFDataType  )

Definition at line 697 of file tif_dirinfo.c.

uint32 _TIFFDefaultStripSize ( TIFF *  ,
uint32   
)

Definition at line 204 of file tif_strip.c.

void _TIFFDefaultTileSize ( TIFF *  ,
uint32 *  ,
uint32 *   
)

Definition at line 259 of file tif_tile.c.

int _TIFFgetMode ( const char *  ,
const char *   
)

Definition at line 115 of file tif_open.c.

void _TIFFNoPostDecode ( TIFF *  ,
tidata_t  ,
tsize_t   
)

Definition at line 706 of file tif_read.c.

int _TIFFNoPreCode ( TIFF *  ,
tsample_t   
)

Definition at line 119 of file tif_compress.c.

int _TIFFNoRowDecode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 89 of file tif_compress.c.

int _TIFFNoRowEncode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 52 of file tif_compress.c.

int _TIFFNoSeek ( TIFF *  ,
uint32   
)

Definition at line 110 of file tif_compress.c.

int _TIFFNoStripDecode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 96 of file tif_compress.c.

int _TIFFNoStripEncode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 59 of file tif_compress.c.

int _TIFFNoTileDecode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 103 of file tif_compress.c.

int _TIFFNoTileEncode ( TIFF *  ,
tidata_t  ,
tsize_t  ,
tsample_t   
)

Definition at line 66 of file tif_compress.c.

void _TIFFprintAscii ( FILE *  ,
const char *   
)

Definition at line 612 of file tif_print.c.

void _TIFFprintAsciiTag ( FILE *  ,
const char *  ,
const char *   
)

Definition at line 632 of file tif_print.c.

void _TIFFsetByteArray ( void **  ,
void *  ,
uint32   
)

Definition at line 56 of file tif_dir.c.

void _TIFFSetDefaultCompressionState ( TIFF *  )

Definition at line 129 of file tif_compress.c.

void _TIFFsetDoubleArray ( double **  ,
double *  ,
uint32   
)

Definition at line 68 of file tif_dir.c.

void _TIFFsetFloatArray ( float **  ,
float *  ,
uint32   
)

Definition at line 66 of file tif_dir.c.

void _TIFFsetLongArray ( uint32 **  ,
uint32 *  ,
uint32   
)

Definition at line 64 of file tif_dir.c.

void _TIFFsetShortArray ( uint16 **  ,
uint16 *  ,
uint32   
)

Definition at line 62 of file tif_dir.c.

void _TIFFsetString ( char **  ,
char *   
)

Definition at line 58 of file tif_dir.c.

void _TIFFSwab16BitData ( TIFF *  ,
tidata_t  ,
tsize_t   
)

Definition at line 712 of file tif_read.c.

void _TIFFSwab24BitData ( TIFF *  ,
tidata_t  ,
tsize_t   
)

Definition at line 720 of file tif_read.c.

void _TIFFSwab32BitData ( TIFF *  ,
tidata_t  ,
tsize_t   
)

Definition at line 728 of file tif_read.c.

void _TIFFSwab64BitData ( TIFF *  ,
tidata_t  ,
tsize_t   
)

Definition at line 736 of file tif_read.c.

int TIFFDefaultDirectory ( TIFF *  )

Definition at line 1056 of file tif_dir.c.

int TIFFFlushData1 ( TIFF *  )

Definition at line 682 of file tif_write.c.

int TIFFInitCCITTFax3 ( TIFF *  ,
int   
)
int TIFFInitCCITTFax4 ( TIFF *  ,
int   
)

Definition at line 1503 of file tif_fax3.c.

int TIFFInitCCITTRLE ( TIFF *  ,
int   
)
int TIFFInitCCITTRLEW ( TIFF *  ,
int   
)

Definition at line 1602 of file tif_fax3.c.

int TIFFInitDumpMode ( TIFF *  ,
int   
)

Definition at line 108 of file tif_dumpmode.c.

int TIFFInitLZW ( TIFF *  ,
int   
)

Definition at line 1060 of file tif_lzw.c.

int TIFFInitNeXT ( TIFF *  ,
int   
)

Definition at line 137 of file tif_next.c.

int TIFFInitPackBits ( TIFF *  ,
int   
)

Definition at line 278 of file tif_packbits.c.

int TIFFInitPixarLog ( TIFF *  ,
int   
)

Definition at line 1290 of file tif_pixarlog.c.

int TIFFInitSGILog ( TIFF *  ,
int   
)

Definition at line 1562 of file tif_luv.c.

int TIFFInitThunderScan ( TIFF *  ,
int   
)

Definition at line 149 of file tif_thunder.c.

int TIFFInitZIP ( TIFF *  ,
int   
)

Definition at line 343 of file tif_zip.c.

int TIFFSetCompressionScheme ( TIFF *  ,
int   
)

Definition at line 153 of file tif_compress.c.

int TIFFSetDefaultCompressionState ( TIFF *  )

Variable Documentation

TIFFCodec _TIFFBuiltinCODECS[]

Definition at line 79 of file tif_codec.c.

TIFFErrorHandler _TIFFerrorHandler

Definition at line 519 of file tif_acorn.c.

TIFFErrorHandlerExt _TIFFerrorHandlerExt

Definition at line 32 of file tif_error.c.

TIFFErrorHandler _TIFFwarningHandler

Definition at line 507 of file tif_acorn.c.

TIFFErrorHandlerExt _TIFFwarningHandlerExt

Definition at line 32 of file tif_warning.c.