ReactOS  0.4.14-dev-77-gd9e7c48
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"
Include dependency graph for tiffiop.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  client_info
 
struct  tiff
 

Macros

#define STRIP_SIZE_DEFAULT   8192
 
#define streq(a, b)   (strcmp(a,b) == 0)
 
#define strneq(a, b, n)   (strncmp(a,b,n) == 0)
 
#define TRUE   1
 
#define FALSE   0
 
#define TIFF_FILLORDER   0x00003U /* natural bit fill order for machine */
 
#define TIFF_DIRTYHEADER   0x00004U /* header must be written on close */
 
#define TIFF_DIRTYDIRECT   0x00008U /* current directory must be written */
 
#define TIFF_BUFFERSETUP   0x00010U /* data buffers setup */
 
#define TIFF_CODERSETUP   0x00020U /* encoder/decoder setup done */
 
#define TIFF_BEENWRITING   0x00040U /* written 1+ scanlines to file */
 
#define TIFF_SWAB   0x00080U /* byte swap file information */
 
#define TIFF_NOBITREV   0x00100U /* inhibit bit reversal logic */
 
#define TIFF_MYBUFFER   0x00200U /* my raw data buffer; free on close */
 
#define TIFF_ISTILED   0x00400U /* file is tile, not strip- based */
 
#define TIFF_MAPPED   0x00800U /* file is mapped into memory */
 
#define TIFF_POSTENCODE   0x01000U /* need call to postencode routine */
 
#define TIFF_INSUBIFD   0x02000U /* currently writing a subifd */
 
#define TIFF_UPSAMPLED   0x04000U /* library is doing data up-sampling */
 
#define TIFF_STRIPCHOP   0x08000U /* enable strip chopping support */
 
#define TIFF_HEADERONLY   0x10000U /* read header only, do not process the first directory */
 
#define TIFF_NOREADRAW   0x20000U /* skip reading of raw uncompressed image data */
 
#define TIFF_INCUSTOMIFD   0x40000U /* currently writing a custom IFD */
 
#define TIFF_BIGTIFF   0x80000U /* read/write bigtiff */
 
#define TIFF_BUF4WRITE   0x100000U /* rawcc bytes are for writing */
 
#define TIFF_DIRTYSTRIP   0x200000U /* stripoffsets/stripbytecount dirty*/
 
#define TIFF_PERSAMPLE   0x400000U /* get/set per sample tags as arrays */
 
#define TIFF_BUFFERMMAP   0x800000U /* read buffer (tif_rawdata) points into mmap() memory */
 
#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,(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),(buf),(size))==(size))
 
#define SeekOK(tif, off)   _TIFFSeekOK(tif, off)
 
#define WriteOK(tif, buf, size)   (TIFFWriteFile((tif),(buf),(size))==(size))
 
#define TIFFhowmany_32(x, y)
 
#define TIFFhowmany_32_maxuint_compat(x, y)   (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0))
 
#define TIFFhowmany8_32(x)   (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3)
 
#define TIFFroundup_32(x, y)   (TIFFhowmany_32(x,y)*(y))
 
#define TIFFhowmany_64(x, y)   ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y)))
 
#define TIFFhowmany8_64(x)   (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3)
 
#define TIFFroundup_64(x, y)   (TIFFhowmany_64(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]))
 
#define _TIFF_lseek_f(fildes, offset, whence)   lseek(fildes,offset,whence)
 
#define _TIFF_fseek_f(stream, offset, whence)   fseek(stream,offset,whence)
 
#define _TIFF_fstat_f(fildes, stat_buff)   fstat(fildes,stat_buff)
 
#define _TIFF_stat_s   struct stat
 
#define _TIFF_off_t   off_t
 
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
 

Typedefs

typedef struct client_info TIFFClientInfoLink
 
typedef unsigned char tidataval_t
 
typedef tidataval_ttidata_t
 
typedef void(* TIFFVoidMethod) (TIFF *)
 
typedef int(* TIFFBoolMethod) (TIFF *)
 
typedef int(* TIFFPreMethod) (TIFF *, uint16)
 
typedef int(* TIFFCodeMethod) (TIFF *tif, uint8 *buf, tmsize_t size, uint16 sample)
 
typedef int(* TIFFSeekMethod) (TIFF *, uint32)
 
typedef void(* TIFFPostMethod) (TIFF *tif, uint8 *buf, tmsize_t size)
 
typedef uint32(* TIFFStripMethod) (TIFF *, uint32)
 
typedef void(* TIFFTileMethod) (TIFF *, uint32 *, uint32 *)
 
typedef size_t TIFFIOSize_t
 

Functions

int _TIFFgetMode (const char *mode, const char *module)
 
int _TIFFNoRowEncode (TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
 
int _TIFFNoStripEncode (TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
 
int _TIFFNoTileEncode (TIFF *, uint8 *pp, tmsize_t cc, uint16 s)
 
int _TIFFNoRowDecode (TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
 
int _TIFFNoStripDecode (TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
 
int _TIFFNoTileDecode (TIFF *, uint8 *pp, tmsize_t cc, uint16 s)
 
void _TIFFNoPostDecode (TIFF *tif, uint8 *buf, tmsize_t cc)
 
int _TIFFNoPreCode (TIFF *tif, uint16 s)
 
int _TIFFNoSeek (TIFF *tif, uint32 off)
 
void _TIFFSwab16BitData (TIFF *tif, uint8 *buf, tmsize_t cc)
 
void _TIFFSwab24BitData (TIFF *tif, uint8 *buf, tmsize_t cc)
 
void _TIFFSwab32BitData (TIFF *tif, uint8 *buf, tmsize_t cc)
 
void _TIFFSwab64BitData (TIFF *tif, uint8 *buf, tmsize_t cc)
 
int TIFFFlushData1 (TIFF *tif)
 
int TIFFDefaultDirectory (TIFF *tif)
 
void _TIFFSetDefaultCompressionState (TIFF *tif)
 
int _TIFFRewriteField (TIFF *, uint16, TIFFDataType, tmsize_t, void *)
 
int TIFFSetCompressionScheme (TIFF *tif, int scheme)
 
int TIFFSetDefaultCompressionState (TIFF *tif)
 
uint32 _TIFFDefaultStripSize (TIFF *tif, uint32 s)
 
void _TIFFDefaultTileSize (TIFF *tif, uint32 *tw, uint32 *th)
 
int _TIFFDataSize (TIFFDataType type)
 
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 *)
 
uint32 _TIFFMultiply32 (TIFF *, uint32, uint32, const char *)
 
uint64 _TIFFMultiply64 (TIFF *, uint64, uint64, const char *)
 
void_TIFFCheckMalloc (TIFF *, tmsize_t, tmsize_t, const char *)
 
void_TIFFCheckRealloc (TIFF *, void *, tmsize_t, tmsize_t, const char *)
 
double _TIFFUInt64ToDouble (uint64)
 
float _TIFFUInt64ToFloat (uint64)
 
tmsize_t _TIFFReadEncodedStripAndAllocBuffer (TIFF *tif, uint32 strip, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
 
tmsize_t _TIFFReadEncodedTileAndAllocBuffer (TIFF *tif, uint32 tile, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
 
tmsize_t _TIFFReadTileAndAllocBuffer (TIFF *tif, void **buf, tmsize_t bufsizetoalloc, uint32 x, uint32 y, uint32 z, uint16 s)
 
int _TIFFSeekOK (TIFF *tif, toff_t off)
 
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

◆ _TIFF_fseek_f

#define _TIFF_fseek_f (   stream,
  offset,
  whence 
)    fseek(stream,offset,whence)

Definition at line 308 of file tiffiop.h.

◆ _TIFF_fstat_f

#define _TIFF_fstat_f (   fildes,
  stat_buff 
)    fstat(fildes,stat_buff)

Definition at line 309 of file tiffiop.h.

◆ _TIFF_lseek_f

#define _TIFF_lseek_f (   fildes,
  offset,
  whence 
)    lseek(fildes,offset,whence)

Definition at line 306 of file tiffiop.h.

◆ _TIFF_off_t

#define _TIFF_off_t   off_t

Definition at line 313 of file tiffiop.h.

◆ _TIFF_stat_s

#define _TIFF_stat_s   struct stat

Definition at line 312 of file tiffiop.h.

◆ FALSE

#define FALSE   0

Definition at line 77 of file tiffiop.h.

◆ isFillOrder

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

Definition at line 215 of file tiffiop.h.

◆ isMapped

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

Definition at line 214 of file tiffiop.h.

◆ isPseudoTag

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

Definition at line 211 of file tiffiop.h.

◆ isTiled

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

Definition at line 213 of file tiffiop.h.

◆ isUpSampled

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

Definition at line 216 of file tiffiop.h.

◆ ReadOK

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

Definition at line 236 of file tiffiop.h.

◆ SeekOK

#define SeekOK (   tif,
  off 
)    _TIFFSeekOK(tif, off)

Definition at line 240 of file tiffiop.h.

◆ streq

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

Definition at line 72 of file tiffiop.h.

◆ STRIP_SIZE_DEFAULT

#define STRIP_SIZE_DEFAULT   8192

Definition at line 69 of file tiffiop.h.

◆ strneq

#define strneq (   a,
  b,
  n 
)    (strncmp(a,b,n) == 0)

Definition at line 73 of file tiffiop.h.

◆ TIFF_BEENWRITING

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

Definition at line 112 of file tiffiop.h.

◆ TIFF_BIGTIFF

#define TIFF_BIGTIFF   0x80000U /* read/write bigtiff */

Definition at line 125 of file tiffiop.h.

◆ TIFF_BUF4WRITE

#define TIFF_BUF4WRITE   0x100000U /* rawcc bytes are for writing */

Definition at line 126 of file tiffiop.h.

◆ TIFF_BUFFERMMAP

#define TIFF_BUFFERMMAP   0x800000U /* read buffer (tif_rawdata) points into mmap() memory */

Definition at line 129 of file tiffiop.h.

◆ TIFF_BUFFERSETUP

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

Definition at line 110 of file tiffiop.h.

◆ TIFF_CODERSETUP

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

Definition at line 111 of file tiffiop.h.

◆ TIFF_DIRTYDIRECT

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

Definition at line 109 of file tiffiop.h.

◆ TIFF_DIRTYHEADER

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

Definition at line 108 of file tiffiop.h.

◆ TIFF_DIRTYSTRIP

#define TIFF_DIRTYSTRIP   0x200000U /* stripoffsets/stripbytecount dirty*/

Definition at line 127 of file tiffiop.h.

◆ TIFF_FILLORDER

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

Definition at line 107 of file tiffiop.h.

◆ TIFF_HEADERONLY

#define TIFF_HEADERONLY   0x10000U /* read header only, do not process the first directory */

Definition at line 122 of file tiffiop.h.

◆ TIFF_INCUSTOMIFD

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

Definition at line 124 of file tiffiop.h.

◆ TIFF_INSUBIFD

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

Definition at line 119 of file tiffiop.h.

◆ TIFF_ISTILED

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

Definition at line 116 of file tiffiop.h.

◆ TIFF_MAPPED

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

Definition at line 117 of file tiffiop.h.

◆ TIFF_MYBUFFER

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

Definition at line 115 of file tiffiop.h.

◆ TIFF_NOBITREV

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

Definition at line 114 of file tiffiop.h.

◆ TIFF_NOREADRAW

#define TIFF_NOREADRAW   0x20000U /* skip reading of raw uncompressed image data */

Definition at line 123 of file tiffiop.h.

◆ TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW

#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW

Definition at line 323 of file tiffiop.h.

◆ TIFF_PERSAMPLE

#define TIFF_PERSAMPLE   0x400000U /* get/set per sample tags as arrays */

Definition at line 128 of file tiffiop.h.

◆ TIFF_POSTENCODE

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

Definition at line 118 of file tiffiop.h.

◆ TIFF_STRIPCHOP

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

Definition at line 121 of file tiffiop.h.

◆ TIFF_SWAB

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

Definition at line 113 of file tiffiop.h.

◆ TIFF_UPSAMPLED

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

Definition at line 120 of file tiffiop.h.

◆ TIFFArrayCount

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

Definition at line 267 of file tiffiop.h.

◆ TIFFCloseFile

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

Definition at line 223 of file tiffiop.h.

◆ TIFFGetFileSize

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

Definition at line 225 of file tiffiop.h.

◆ TIFFhowmany8_32

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

Definition at line 255 of file tiffiop.h.

◆ TIFFhowmany8_64

#define TIFFhowmany8_64 (   x)    (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3)

Definition at line 258 of file tiffiop.h.

◆ TIFFhowmany_32

#define TIFFhowmany_32 (   x,
  y 
)
Value:
(((uint32)x < (0xffffffff - (uint32)(y-1))) ? \
((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) : \
0U)
unsigned int uint32
Definition: types.h:32
#define U(x)
Definition: wordpad.c:44
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Definition at line 248 of file tiffiop.h.

◆ TIFFhowmany_32_maxuint_compat

#define TIFFhowmany_32_maxuint_compat (   x,
  y 
)    (((uint32)(x) / (uint32)(y)) + ((((uint32)(x) % (uint32)(y)) != 0) ? 1 : 0))

Definition at line 253 of file tiffiop.h.

◆ TIFFhowmany_64

#define TIFFhowmany_64 (   x,
  y 
)    ((((uint64)(x))+(((uint64)(y))-1))/((uint64)(y)))

Definition at line 257 of file tiffiop.h.

◆ TIFFMapFileContents

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

Definition at line 227 of file tiffiop.h.

◆ TIFFmax

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

Definition at line 264 of file tiffiop.h.

◆ TIFFmin

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

Definition at line 265 of file tiffiop.h.

◆ TIFFReadFile

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

Definition at line 217 of file tiffiop.h.

◆ TIFFroundup_32

#define TIFFroundup_32 (   x,
  y 
)    (TIFFhowmany_32(x,y)*(y))

Definition at line 256 of file tiffiop.h.

◆ TIFFroundup_64

#define TIFFroundup_64 (   x,
  y 
)    (TIFFhowmany_64(x,y)*(y))

Definition at line 259 of file tiffiop.h.

◆ TIFFSafeMultiply

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

Definition at line 262 of file tiffiop.h.

◆ TIFFSeekFile

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

Definition at line 221 of file tiffiop.h.

◆ TIFFUnmapFileContents

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

Definition at line 229 of file tiffiop.h.

◆ TIFFWriteFile

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

Definition at line 219 of file tiffiop.h.

◆ TRUE

#define TRUE   1

Definition at line 76 of file tiffiop.h.

◆ WriteOK

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

Definition at line 243 of file tiffiop.h.

Typedef Documentation

◆ tidata_t

Definition at line 91 of file tiffiop.h.

◆ tidataval_t

typedef unsigned char tidataval_t

Definition at line 90 of file tiffiop.h.

◆ TIFFBoolMethod

typedef int(* TIFFBoolMethod) (TIFF *)

Definition at line 94 of file tiffiop.h.

◆ TIFFClientInfoLink

◆ TIFFCodeMethod

typedef int(* TIFFCodeMethod) (TIFF *tif, uint8 *buf, tmsize_t size, uint16 sample)

Definition at line 96 of file tiffiop.h.

◆ TIFFIOSize_t

Definition at line 305 of file tiffiop.h.

◆ TIFFPostMethod

typedef void(* TIFFPostMethod) (TIFF *tif, uint8 *buf, tmsize_t size)

Definition at line 98 of file tiffiop.h.

◆ TIFFPreMethod

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

Definition at line 95 of file tiffiop.h.

◆ TIFFSeekMethod

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

Definition at line 97 of file tiffiop.h.

◆ TIFFStripMethod

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

Definition at line 99 of file tiffiop.h.

◆ TIFFTileMethod

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

Definition at line 100 of file tiffiop.h.

◆ TIFFVoidMethod

typedef void(* TIFFVoidMethod) (TIFF *)

Definition at line 93 of file tiffiop.h.

Function Documentation

◆ _TIFFCheckMalloc()

void* _TIFFCheckMalloc ( TIFF ,
tmsize_t  ,
tmsize_t  ,
const char  
)

Definition at line 85 of file tif_aux.c.

86 {
87  return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what);
88 }
void * _TIFFCheckRealloc(TIFF *tif, void *buffer, tmsize_t nmemb, tmsize_t elem_size, const char *what)
Definition: tif_aux.c:62
smooth NULL
Definition: ftsmooth.c:416

Referenced by _TIFFMergeFields(), _TIFFRewriteField(), _TIFFVSetField(), ChopUpSingleUncompressedStrip(), EstimateStripByteCounts(), TIFFFetchDirectory(), TIFFFetchStripThing(), TIFFMergeFieldInfo(), TIFFReadDirEntryArrayWithLimit(), and TIFFSetupStrips().

◆ _TIFFCheckRealloc()

void* _TIFFCheckRealloc ( TIFF ,
void ,
tmsize_t  ,
tmsize_t  ,
const char  
)

Definition at line 62 of file tif_aux.c.

64 {
65  void* cp = NULL;
66  tmsize_t bytes = nmemb * elem_size;
67 
68  /*
69  * XXX: Check for integer overflow.
70  */
71  if (nmemb && elem_size && bytes / elem_size == nmemb)
73 
74  if (cp == NULL) {
75  TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
76  "Failed to allocate memory for %s "
77  "(%ld elements of %ld bytes each)",
78  what,(long) nmemb, (long) elem_size);
79  }
80 
81  return cp;
82 }
GLuint buffer
Definition: glext.h:5915
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
smooth NULL
Definition: ftsmooth.c:416
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
void * _TIFFrealloc(void *p, tmsize_t s)
Definition: tif_unix.c:332
POINT cp
Definition: magnifier.c:59

Referenced by _TIFFCheckMalloc(), _TIFFMergeFields(), TIFFCheckDirOffset(), and TIFFMergeFieldInfo().

◆ _TIFFDataSize()

int _TIFFDataSize ( TIFFDataType  type)

Definition at line 476 of file tif_dirinfo.c.

477 {
478  switch (type)
479  {
480  case TIFF_BYTE:
481  case TIFF_SBYTE:
482  case TIFF_ASCII:
483  case TIFF_UNDEFINED:
484  return 1;
485  case TIFF_SHORT:
486  case TIFF_SSHORT:
487  return 2;
488  case TIFF_LONG:
489  case TIFF_SLONG:
490  case TIFF_FLOAT:
491  case TIFF_IFD:
492  case TIFF_RATIONAL:
493  case TIFF_SRATIONAL:
494  return 4;
495  case TIFF_DOUBLE:
496  case TIFF_LONG8:
497  case TIFF_SLONG8:
498  case TIFF_IFD8:
499  return 8;
500  default:
501  return 0;
502  }
503 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: tiff.h:137

Referenced by _TIFFVSetField(), and TIFFPrintDirectory().

◆ _TIFFDefaultStripSize()

uint32 _TIFFDefaultStripSize ( TIFF tif,
uint32  s 
)

Definition at line 239 of file tif_strip.c.

240 {
241  if ((int32) s < 1) {
242  /*
243  * If RowsPerStrip is unspecified, try to break the
244  * image up into strips that are approximately
245  * STRIP_SIZE_DEFAULT bytes long.
246  */
247  uint64 scanlinesize;
248  uint64 rows;
249  scanlinesize=TIFFScanlineSize64(tif);
250  if (scanlinesize==0)
251  scanlinesize=1;
252  rows=(uint64)STRIP_SIZE_DEFAULT/scanlinesize;
253  if (rows==0)
254  rows=1;
255  else if (rows>0xFFFFFFFF)
256  rows=0xFFFFFFFF;
257  s=(uint32)rows;
258  }
259  return (s);
260 }
unsigned long long uint64
Definition: platform.h:18
#define STRIP_SIZE_DEFAULT
Definition: tiffiop.h:69
unsigned int uint32
Definition: types.h:32
uint64 TIFFScanlineSize64(TIFF *tif)
Definition: tif_strip.c:273
GLdouble s
Definition: gl.h:2039
long int32
Definition: platform.h:12

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFDefaultTileSize()

void _TIFFDefaultTileSize ( TIFF tif,
uint32 tw,
uint32 th 
)

Definition at line 300 of file tif_tile.c.

301 {
302  (void) tif;
303  if (*(int32*) tw < 1)
304  *tw = 256;
305  if (*(int32*) th < 1)
306  *th = 256;
307  /* roundup to a multiple of 16 per the spec */
308  if (*tw & 0xf)
309  *tw = TIFFroundup_32(*tw, 16);
310  if (*th & 0xf)
311  *th = TIFFroundup_32(*th, 16);
312 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
long int32
Definition: platform.h:12
#define TIFFroundup_32(x, y)
Definition: tiffiop.h:256

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFgetMode()

int _TIFFgetMode ( const char mode,
const char module 
)

Definition at line 48 of file tif_open.c.

49 {
50  int m = -1;
51 
52  switch (mode[0]) {
53  case 'r':
54  m = O_RDONLY;
55  if (mode[1] == '+')
56  m = O_RDWR;
57  break;
58  case 'w':
59  case 'a':
60  m = O_RDWR|O_CREAT;
61  if (mode[0] == 'w')
62  m |= O_TRUNC;
63  break;
64  default:
65  TIFFErrorExt(0, module, "\"%s\": Bad mode", mode);
66  break;
67  }
68  return (m);
69 }
const GLfloat * m
Definition: glext.h:10848
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
#define O_TRUNC
Definition: acwin.h:112
GLenum mode
Definition: glext.h:6217
#define O_RDWR
Definition: fcntl.h:36
#define O_CREAT
Definition: acwin.h:110
#define O_RDONLY
Definition: acwin.h:108

Referenced by TIFFClientOpen(), TIFFOpen(), and TIFFOpenW().

◆ _TIFFMultiply32()

uint32 _TIFFMultiply32 ( TIFF ,
uint32  ,
uint32  ,
const char  
)

Definition at line 36 of file tif_aux.c.

37 {
38  uint32 bytes = first * second;
39 
40  if (second && bytes / second != first) {
41  TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
42  bytes = 0;
43  }
44 
45  return bytes;
46 }
unsigned int uint32
Definition: types.h:32
const GLint * first
Definition: glext.h:5794
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65

Referenced by TIFFNumberOfStrips(), and TIFFNumberOfTiles().

◆ _TIFFMultiply64()

uint64 _TIFFMultiply64 ( TIFF ,
uint64  ,
uint64  ,
const char  
)

Definition at line 49 of file tif_aux.c.

50 {
51  uint64 bytes = first * second;
52 
53  if (second && bytes / second != first) {
54  TIFFErrorExt(tif->tif_clientdata, where, "Integer overflow in %s", where);
55  bytes = 0;
56  }
57 
58  return bytes;
59 }
unsigned long long uint64
Definition: platform.h:18
const GLint * first
Definition: glext.h:5794
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65

Referenced by TIFFRasterScanlineSize64(), TIFFScanlineSize64(), TIFFTileRowSize64(), TIFFVStripSize64(), and TIFFVTileSize64().

◆ _TIFFNoPostDecode()

void _TIFFNoPostDecode ( TIFF tif,
uint8 buf,
tmsize_t  cc 
)

Definition at line 1533 of file tif_read.c.

1534 {
1535  (void) tif; (void) buf; (void) cc;
1536 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
uint32_t cc
Definition: isohybrid.c:75

Referenced by _TIFFVSetField(), PredictorSetupDecode(), PredictorSetupEncode(), and TIFFDefaultDirectory().

◆ _TIFFNoPreCode()

int _TIFFNoPreCode ( TIFF tif,
uint16  s 
)

Definition at line 125 of file tif_compress.c.

126 {
127  (void) tif; (void) s;
128  return (1);
129 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLdouble s
Definition: gl.h:2039

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoRowDecode()

int _TIFFNoRowDecode ( TIFF tif,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 95 of file tif_compress.c.

96 {
97  (void) pp; (void) cc; (void) s;
98  return (TIFFNoDecode(tif, "scanline"));
99 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static int TIFFNoDecode(TIFF *tif, const char *method)
Definition: tif_compress.c:72
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoRowEncode()

int _TIFFNoRowEncode ( TIFF tif,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 51 of file tif_compress.c.

52 {
53  (void) pp; (void) cc; (void) s;
54  return (TIFFNoEncode(tif, "scanline"));
55 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75
static int TIFFNoEncode(TIFF *tif, const char *method)
Definition: tif_compress.c:34

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoSeek()

int _TIFFNoSeek ( TIFF tif,
uint32  off 
)

Definition at line 116 of file tif_compress.c.

117 {
118  (void) off;
120  "Compression algorithm does not support random access");
121  return (0);
122 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
thandle_t tif_clientdata
Definition: tiffiop.h:191
char * tif_name
Definition: tiffiop.h:103
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
off
Definition: i386-dis.c:3909

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoStripDecode()

int _TIFFNoStripDecode ( TIFF tif,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 102 of file tif_compress.c.

103 {
104  (void) pp; (void) cc; (void) s;
105  return (TIFFNoDecode(tif, "strip"));
106 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static int TIFFNoDecode(TIFF *tif, const char *method)
Definition: tif_compress.c:72
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoStripEncode()

int _TIFFNoStripEncode ( TIFF tif,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 58 of file tif_compress.c.

59 {
60  (void) pp; (void) cc; (void) s;
61  return (TIFFNoEncode(tif, "strip"));
62 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75
static int TIFFNoEncode(TIFF *tif, const char *method)
Definition: tif_compress.c:34

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoTileDecode()

int _TIFFNoTileDecode ( TIFF ,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 109 of file tif_compress.c.

110 {
111  (void) pp; (void) cc; (void) s;
112  return (TIFFNoDecode(tif, "tile"));
113 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static int TIFFNoDecode(TIFF *tif, const char *method)
Definition: tif_compress.c:72
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFNoTileEncode()

int _TIFFNoTileEncode ( TIFF ,
uint8 pp,
tmsize_t  cc,
uint16  s 
)

Definition at line 65 of file tif_compress.c.

66 {
67  (void) pp; (void) cc; (void) s;
68  return (TIFFNoEncode(tif, "tile"));
69 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define pp
Definition: hlsl.yy.c:978
GLdouble s
Definition: gl.h:2039
uint32_t cc
Definition: isohybrid.c:75
static int TIFFNoEncode(TIFF *tif, const char *method)
Definition: tif_compress.c:34

Referenced by _TIFFSetDefaultCompressionState().

◆ _TIFFprintAscii()

void _TIFFprintAscii ( FILE ,
const char  
)

Definition at line 681 of file tif_print.c.

682 {
684 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static int fd
Definition: io.c:51
POINT cp
Definition: magnifier.c:59
static void _TIFFprintAsciiBounded(FILE *fd, const char *cp, size_t max_chars)
Definition: tif_print.c:687

Referenced by _TIFFprintAsciiTag().

◆ _TIFFprintAsciiTag()

void _TIFFprintAsciiTag ( FILE ,
const char ,
const char  
)

Definition at line 707 of file tif_print.c.

708 {
709  fprintf(fd, " %s: \"", name);
711  fprintf(fd, "\"\n");
712 }
void _TIFFprintAscii(FILE *fd, const char *cp)
Definition: tif_print.c:681
static int fd
Definition: io.c:51
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
Definition: name.c:36

◆ _TIFFReadEncodedStripAndAllocBuffer()

tmsize_t _TIFFReadEncodedStripAndAllocBuffer ( TIFF tif,
uint32  strip,
void **  buf,
tmsize_t  bufsizetoalloc,
tmsize_t  size_to_read 
)

Definition at line 557 of file tif_read.c.

560 {
561  tmsize_t this_stripsize;
562  uint16 plane;
563 
564  if( *buf != NULL )
565  {
566  return TIFFReadEncodedStrip(tif, strip, *buf, size_to_read);
567  }
568 
569  this_stripsize=TIFFReadEncodedStripGetStripSize(tif, strip, &plane);
570  if (this_stripsize==((tmsize_t)(-1)))
571  return((tmsize_t)(-1));
572 
573  if ((size_to_read!=(tmsize_t)(-1))&&(size_to_read<this_stripsize))
574  this_stripsize=size_to_read;
575  if (!TIFFFillStrip(tif,strip))
576  return((tmsize_t)(-1));
577 
578  *buf = _TIFFmalloc(bufsizetoalloc);
579  if (*buf == NULL) {
580  TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer");
581  return((tmsize_t)(-1));
582  }
583  _TIFFmemset(*buf, 0, bufsizetoalloc);
584 
585  if ((*tif->tif_decodestrip)(tif,*buf,this_stripsize,plane)<=0)
586  return((tmsize_t)(-1));
587  (*tif->tif_postdecode)(tif,*buf,this_stripsize);
588  return(this_stripsize);
589 
590 
591 }
void _TIFFmemset(void *p, int v, tmsize_t c)
Definition: tif_unix.c:338
static tmsize_t TIFFReadEncodedStripGetStripSize(TIFF *tif, uint32 strip, uint16 *pplane)
Definition: tif_read.c:473
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
Definition: glfuncs.h:270
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
thandle_t tif_clientdata
Definition: tiffiop.h:191
int TIFFFillStrip(TIFF *tif, uint32 strip)
Definition: tif_read.c:766
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
smooth NULL
Definition: ftsmooth.c:416
TIFFCodeMethod tif_decodestrip
Definition: tiffiop.h:166
void * _TIFFmalloc(tmsize_t s)
Definition: tif_unix.c:309
TIFFPostMethod tif_postdecode
Definition: tiffiop.h:198
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
tmsize_t TIFFReadEncodedStrip(TIFF *tif, uint32 strip, void *buf, tmsize_t size)
Definition: tif_read.c:512
unsigned short uint16
Definition: types.h:30
const char * TIFFFileName(TIFF *tif)
Definition: tif_open.c:496

Referenced by gtStripContig(), and gtStripSeparate().

◆ _TIFFReadEncodedTileAndAllocBuffer()

tmsize_t _TIFFReadEncodedTileAndAllocBuffer ( TIFF tif,
uint32  tile,
void **  buf,
tmsize_t  bufsizetoalloc,
tmsize_t  size_to_read 
)

Definition at line 1051 of file tif_read.c.

1054 {
1055  static const char module[] = "_TIFFReadEncodedTileAndAllocBuffer";
1056  TIFFDirectory *td = &tif->tif_dir;
1057  tmsize_t tilesize = tif->tif_tilesize;
1058 
1059  if( *buf != NULL )
1060  {
1061  return TIFFReadEncodedTile(tif, tile, *buf, size_to_read);
1062  }
1063 
1064  if (!TIFFCheckRead(tif, 1))
1065  return ((tmsize_t)(-1));
1066  if (tile >= td->td_nstrips) {
1068  "%lu: Tile out of range, max %lu",
1069  (unsigned long) tile, (unsigned long) td->td_nstrips);
1070  return ((tmsize_t)(-1));
1071  }
1072 
1073  if (!TIFFFillTile(tif,tile))
1074  return((tmsize_t)(-1));
1075 
1076  *buf = _TIFFmalloc(bufsizetoalloc);
1077  if (*buf == NULL) {
1079  "No space for tile buffer");
1080  return((tmsize_t)(-1));
1081  }
1082  _TIFFmemset(*buf, 0, bufsizetoalloc);
1083 
1084  if (size_to_read == (tmsize_t)(-1))
1085  size_to_read = tilesize;
1086  else if (size_to_read > tilesize)
1087  size_to_read = tilesize;
1088  if( (*tif->tif_decodetile)(tif,
1089  (uint8*) *buf, size_to_read, (uint16)(tile/td->td_stripsperimage))) {
1090  (*tif->tif_postdecode)(tif, (uint8*) *buf, size_to_read);
1091  return (size_to_read);
1092  } else
1093  return ((tmsize_t)(-1));
1094 }
void _TIFFmemset(void *p, int v, tmsize_t c)
Definition: tif_unix.c:338
int TIFFFillTile(TIFF *tif, uint32 tile)
Definition: tif_read.c:1213
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
tmsize_t TIFFReadEncodedTile(TIFF *tif, uint32 tile, void *buf, tmsize_t size)
Definition: tif_read.c:981
thandle_t tif_clientdata
Definition: tiffiop.h:191
tmsize_t tif_tilesize
Definition: tiffiop.h:154
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
uint32 td_stripsperimage
Definition: tif_dir.h:98
smooth NULL
Definition: ftsmooth.c:416
void * _TIFFmalloc(tmsize_t s)
Definition: tif_unix.c:309
uint32 td_nstrips
Definition: tif_dir.h:99
TIFFPostMethod tif_postdecode
Definition: tiffiop.h:198
unsigned char uint8
Definition: types.h:28
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
TIFFCodeMethod tif_decodetile
Definition: tiffiop.h:168
unsigned short uint16
Definition: types.h:30
TIFFDirectory tif_dir
Definition: tiffiop.h:135
const char * TIFFFileName(TIFF *tif)
Definition: tif_open.c:496
static int TIFFCheckRead(TIFF *, int)
Definition: tif_read.c:1517

Referenced by _TIFFReadTileAndAllocBuffer().

◆ _TIFFReadTileAndAllocBuffer()

tmsize_t _TIFFReadTileAndAllocBuffer ( TIFF tif,
void **  buf,
tmsize_t  bufsizetoalloc,
uint32  x,
uint32  y,
uint32  z,
uint16  s 
)

Definition at line 1032 of file tif_read.c.

1035 {
1036  if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
1037  return ((tmsize_t)(-1));
1039  TIFFComputeTile(tif, x, y, z, s),
1040  buf, bufsizetoalloc,
1041  (tmsize_t)(-1)));
1042 }
int TIFFCheckTile(TIFF *tif, uint32 x, uint32 y, uint32 z, uint16 s)
Definition: tif_tile.c:74
uint32 TIFFComputeTile(TIFF *tif, uint32 x, uint32 y, uint32 z, uint16 s)
Definition: tif_tile.c:37
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
GLdouble GLdouble z
Definition: glext.h:5874
GLdouble s
Definition: gl.h:2039
tmsize_t _TIFFReadEncodedTileAndAllocBuffer(TIFF *tif, uint32 tile, void **buf, tmsize_t bufsizetoalloc, tmsize_t size_to_read)
Definition: tif_read.c:1051
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static int TIFFCheckRead(TIFF *, int)
Definition: tif_read.c:1517

Referenced by gtTileContig(), and gtTileSeparate().

◆ _TIFFRewriteField()

int _TIFFRewriteField ( TIFF ,
uint16  ,
TIFFDataType  ,
tmsize_t  ,
void  
)

Definition at line 2683 of file tif_dirwrite.c.

2685 {
2686  static const char module[] = "TIFFResetField";
2687  /* const TIFFField* fip = NULL; */
2688  uint16 dircount;
2689  tmsize_t dirsize;
2690  uint8 direntry_raw[20];
2691  uint16 entry_tag = 0;
2692  uint16 entry_type = 0;
2693  uint64 entry_count = 0;
2694  uint64 entry_offset = 0;
2695  int value_in_entry = 0;
2696  uint64 read_offset;
2697  uint8 *buf_to_write = NULL;
2698  TIFFDataType datatype;
2699 
2700 /* -------------------------------------------------------------------- */
2701 /* Find field definition. */
2702 /* -------------------------------------------------------------------- */
2703  /*fip =*/ TIFFFindField(tif, tag, TIFF_ANY);
2704 
2705 /* -------------------------------------------------------------------- */
2706 /* Do some checking this is a straight forward case. */
2707 /* -------------------------------------------------------------------- */
2708  if( isMapped(tif) )
2709  {
2710  TIFFErrorExt( tif->tif_clientdata, module,
2711  "Memory mapped files not currently supported for this operation." );
2712  return 0;
2713  }
2714 
2715  if( tif->tif_diroff == 0 )
2716  {
2717  TIFFErrorExt( tif->tif_clientdata, module,
2718  "Attempt to reset field on directory not already on disk." );
2719  return 0;
2720  }
2721 
2722 /* -------------------------------------------------------------------- */
2723 /* Read the directory entry count. */
2724 /* -------------------------------------------------------------------- */
2725  if (!SeekOK(tif, tif->tif_diroff)) {
2726  TIFFErrorExt(tif->tif_clientdata, module,
2727  "%s: Seek error accessing TIFF directory",
2728  tif->tif_name);
2729  return 0;
2730  }
2731 
2732  read_offset = tif->tif_diroff;
2733 
2734  if (!(tif->tif_flags&TIFF_BIGTIFF))
2735  {
2736  if (!ReadOK(tif, &dircount, sizeof (uint16))) {
2737  TIFFErrorExt(tif->tif_clientdata, module,
2738  "%s: Can not read TIFF directory count",
2739  tif->tif_name);
2740  return 0;
2741  }
2742  if (tif->tif_flags & TIFF_SWAB)
2743  TIFFSwabShort(&dircount);
2744  dirsize = 12;
2745  read_offset += 2;
2746  } else {
2747  uint64 dircount64;
2748  if (!ReadOK(tif, &dircount64, sizeof (uint64))) {
2749  TIFFErrorExt(tif->tif_clientdata, module,
2750  "%s: Can not read TIFF directory count",
2751  tif->tif_name);
2752  return 0;
2753  }
2754  if (tif->tif_flags & TIFF_SWAB)
2755  TIFFSwabLong8(&dircount64);
2756  dircount = (uint16)dircount64;
2757  dirsize = 20;
2758  read_offset += 8;
2759  }
2760 
2761 /* -------------------------------------------------------------------- */
2762 /* Read through directory to find target tag. */
2763 /* -------------------------------------------------------------------- */
2764  while( dircount > 0 )
2765  {
2766  if (!ReadOK(tif, direntry_raw, dirsize)) {
2767  TIFFErrorExt(tif->tif_clientdata, module,
2768  "%s: Can not read TIFF directory entry.",
2769  tif->tif_name);
2770  return 0;
2771  }
2772 
2773  memcpy( &entry_tag, direntry_raw + 0, sizeof(uint16) );
2774  if (tif->tif_flags&TIFF_SWAB)
2775  TIFFSwabShort( &entry_tag );
2776 
2777  if( entry_tag == tag )
2778  break;
2779 
2780  read_offset += dirsize;
2781  }
2782 
2783  if( entry_tag != tag )
2784  {
2785  TIFFErrorExt(tif->tif_clientdata, module,
2786  "%s: Could not find tag %d.",
2787  tif->tif_name, tag );
2788  return 0;
2789  }
2790 
2791 /* -------------------------------------------------------------------- */
2792 /* Extract the type, count and offset for this entry. */
2793 /* -------------------------------------------------------------------- */
2794  memcpy( &entry_type, direntry_raw + 2, sizeof(uint16) );
2795  if (tif->tif_flags&TIFF_SWAB)
2796  TIFFSwabShort( &entry_type );
2797 
2798  if (!(tif->tif_flags&TIFF_BIGTIFF))
2799  {
2800  uint32 value;
2801 
2802  memcpy( &value, direntry_raw + 4, sizeof(uint32) );
2803  if (tif->tif_flags&TIFF_SWAB)
2804  TIFFSwabLong( &value );
2805  entry_count = value;
2806 
2807  memcpy( &value, direntry_raw + 8, sizeof(uint32) );
2808  if (tif->tif_flags&TIFF_SWAB)
2809  TIFFSwabLong( &value );
2810  entry_offset = value;
2811  }
2812  else
2813  {
2814  memcpy( &entry_count, direntry_raw + 4, sizeof(uint64) );
2815  if (tif->tif_flags&TIFF_SWAB)
2816  TIFFSwabLong8( &entry_count );
2817 
2818  memcpy( &entry_offset, direntry_raw + 12, sizeof(uint64) );
2819  if (tif->tif_flags&TIFF_SWAB)
2820  TIFFSwabLong8( &entry_offset );
2821  }
2822 
2823 /* -------------------------------------------------------------------- */
2824 /* What data type do we want to write this as? */
2825 /* -------------------------------------------------------------------- */
2826  if( TIFFDataWidth(in_datatype) == 8 && !(tif->tif_flags&TIFF_BIGTIFF) )
2827  {
2828  if( in_datatype == TIFF_LONG8 )
2829  datatype = TIFF_LONG;
2830  else if( in_datatype == TIFF_SLONG8 )
2831  datatype = TIFF_SLONG;
2832  else if( in_datatype == TIFF_IFD8 )
2833  datatype = TIFF_IFD;
2834  else
2835  datatype = in_datatype;
2836  }
2837  else
2838  datatype = in_datatype;
2839 
2840 /* -------------------------------------------------------------------- */
2841 /* Prepare buffer of actual data to write. This includes */
2842 /* swabbing as needed. */
2843 /* -------------------------------------------------------------------- */
2844  buf_to_write =
2845  (uint8 *)_TIFFCheckMalloc(tif, count, TIFFDataWidth(datatype),
2846  "for field buffer.");
2847  if (!buf_to_write)
2848  return 0;
2849 
2850  if( datatype == in_datatype )
2851  memcpy( buf_to_write, data, count * TIFFDataWidth(datatype) );
2852  else if( datatype == TIFF_SLONG && in_datatype == TIFF_SLONG8 )
2853  {
2854  tmsize_t i;
2855 
2856  for( i = 0; i < count; i++ )
2857  {
2858  ((int32 *) buf_to_write)[i] =
2859  (int32) ((int64 *) data)[i];
2860  if( (int64) ((int32 *) buf_to_write)[i] != ((int64 *) data)[i] )
2861  {
2862  _TIFFfree( buf_to_write );
2863  TIFFErrorExt( tif->tif_clientdata, module,
2864  "Value exceeds 32bit range of output type." );
2865  return 0;
2866  }
2867  }
2868  }
2869  else if( (datatype == TIFF_LONG && in_datatype == TIFF_LONG8)
2870  || (datatype == TIFF_IFD && in_datatype == TIFF_IFD8) )
2871  {
2872  tmsize_t i;
2873 
2874  for( i = 0; i < count; i++ )
2875  {
2876  ((uint32 *) buf_to_write)[i] =
2877  (uint32) ((uint64 *) data)[i];
2878  if( (uint64) ((uint32 *) buf_to_write)[i] != ((uint64 *) data)[i] )
2879  {
2880  _TIFFfree( buf_to_write );
2881  TIFFErrorExt( tif->tif_clientdata, module,
2882  "Value exceeds 32bit range of output type." );
2883  return 0;
2884  }
2885  }
2886  }
2887 
2888  if( TIFFDataWidth(datatype) > 1 && (tif->tif_flags&TIFF_SWAB) )
2889  {
2890  if( TIFFDataWidth(datatype) == 2 )
2891  TIFFSwabArrayOfShort( (uint16 *) buf_to_write, count );
2892  else if( TIFFDataWidth(datatype) == 4 )
2893  TIFFSwabArrayOfLong( (uint32 *) buf_to_write, count );
2894  else if( TIFFDataWidth(datatype) == 8 )
2895  TIFFSwabArrayOfLong8( (uint64 *) buf_to_write, count );
2896  }
2897 
2898 /* -------------------------------------------------------------------- */
2899 /* Is this a value that fits into the directory entry? */
2900 /* -------------------------------------------------------------------- */
2901  if (!(tif->tif_flags&TIFF_BIGTIFF))
2902  {
2903  if( TIFFDataWidth(datatype) * count <= 4 )
2904  {
2905  entry_offset = read_offset + 8;
2906  value_in_entry = 1;
2907  }
2908  }
2909  else
2910  {
2911  if( TIFFDataWidth(datatype) * count <= 8 )
2912  {
2913  entry_offset = read_offset + 12;
2914  value_in_entry = 1;
2915  }
2916  }
2917 
2918 /* -------------------------------------------------------------------- */
2919 /* If the tag type, and count match, then we just write it out */
2920 /* over the old values without altering the directory entry at */
2921 /* all. */
2922 /* -------------------------------------------------------------------- */
2923  if( entry_count == (uint64)count && entry_type == (uint16) datatype )
2924  {
2925  if (!SeekOK(tif, entry_offset)) {
2926  _TIFFfree( buf_to_write );
2927  TIFFErrorExt(tif->tif_clientdata, module,
2928  "%s: Seek error accessing TIFF directory",
2929  tif->tif_name);
2930  return 0;
2931  }
2932  if (!WriteOK(tif, buf_to_write, count*TIFFDataWidth(datatype))) {
2933  _TIFFfree( buf_to_write );
2934  TIFFErrorExt(tif->tif_clientdata, module,
2935  "Error writing directory link");
2936  return (0);
2937  }
2938 
2939  _TIFFfree( buf_to_write );
2940  return 1;
2941  }
2942 
2943 /* -------------------------------------------------------------------- */
2944 /* Otherwise, we write the new tag data at the end of the file. */
2945 /* -------------------------------------------------------------------- */
2946  if( !value_in_entry )
2947  {
2948  entry_offset = TIFFSeekFile(tif,0,SEEK_END);
2949 
2950  if (!WriteOK(tif, buf_to_write, count*TIFFDataWidth(datatype))) {
2951  _TIFFfree( buf_to_write );
2952  TIFFErrorExt(tif->tif_clientdata, module,
2953  "Error writing directory link");
2954  return (0);
2955  }
2956  }
2957  else
2958  {
2959  memcpy( &entry_offset, buf_to_write, count*TIFFDataWidth(datatype));
2960  }
2961 
2962  _TIFFfree( buf_to_write );
2963  buf_to_write = 0;
2964 
2965 /* -------------------------------------------------------------------- */
2966 /* Adjust the directory entry. */
2967 /* -------------------------------------------------------------------- */
2968  entry_type = datatype;
2969  memcpy( direntry_raw + 2, &entry_type, sizeof(uint16) );
2970  if (tif->tif_flags&TIFF_SWAB)
2971  TIFFSwabShort( (uint16 *) (direntry_raw + 2) );
2972 
2973  if (!(tif->tif_flags&TIFF_BIGTIFF))
2974  {
2975  uint32 value;
2976 
2977  value = (uint32) entry_count;
2978  memcpy( direntry_raw + 4, &value, sizeof(uint32) );
2979  if (tif->tif_flags&TIFF_SWAB)
2980  TIFFSwabLong( (uint32 *) (direntry_raw + 4) );
2981 
2982  value = (uint32) entry_offset;
2983  memcpy( direntry_raw + 8, &value, sizeof(uint32) );
2984  if (tif->tif_flags&TIFF_SWAB)
2985  TIFFSwabLong( (uint32 *) (direntry_raw + 8) );
2986  }
2987  else
2988  {
2989  memcpy( direntry_raw + 4, &entry_count, sizeof(uint64) );
2990  if (tif->tif_flags&TIFF_SWAB)
2991  TIFFSwabLong8( (uint64 *) (direntry_raw + 4) );
2992 
2993  memcpy( direntry_raw + 12, &entry_offset, sizeof(uint64) );
2994  if (tif->tif_flags&TIFF_SWAB)
2995  TIFFSwabLong8( (uint64 *) (direntry_raw + 12) );
2996  }
2997 
2998 /* -------------------------------------------------------------------- */
2999 /* Write the directory entry out to disk. */
3000 /* -------------------------------------------------------------------- */
3001  if (!SeekOK(tif, read_offset )) {
3002  TIFFErrorExt(tif->tif_clientdata, module,
3003  "%s: Seek error accessing TIFF directory",
3004  tif->tif_name);
3005  return 0;
3006  }
3007 
3008  if (!WriteOK(tif, direntry_raw,dirsize))
3009  {
3010  TIFFErrorExt(tif->tif_clientdata, module,
3011  "%s: Can not write TIFF directory entry.",
3012  tif->tif_name);
3013  return 0;
3014  }
3015 
3016  return 1;
3017 }
unsigned long long uint64
Definition: platform.h:18
#define TIFF_ANY
Definition: tiffio.h:312
void TIFFSwabArrayOfShort(register uint16 *wp, tmsize_t n)
Definition: tif_swab.c:71
#define WriteOK(tif, buf, size)
Definition: tiffiop.h:243
GLuint GLuint GLsizei count
Definition: gl.h:1545
unsigned int uint32
Definition: types.h:32
#define TIFFSeekFile(tif, off, whence)
Definition: tiffiop.h:221
Definition: ecma_167.h:138
long long int64
Definition: platform.h:13
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TIFF_BIGTIFF
Definition: tiffiop.h:125
#define TIFF_SWAB
Definition: tiffiop.h:113
TIFF_SSIZE_T tmsize_t
Definition: tiffio.h:65
void * _TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what)
Definition: tif_aux.c:85
smooth NULL
Definition: ftsmooth.c:416
#define isMapped(tif)
Definition: tiffiop.h:214
void TIFFSwabShort(uint16 *wp)
Definition: tif_swab.c:34
unsigned char uint8
Definition: types.h:28
void TIFFSwabArrayOfLong(register uint32 *lp, tmsize_t n)
Definition: tif_swab.c:103
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
Definition: tif_error.c:65
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLsizei const GLfloat * value
Definition: glext.h:6069
int TIFFDataWidth(TIFFDataType type)
Definition: tif_dirinfo.c:438
void TIFFSwabLong(uint32 *lp)
Definition: tif_swab.c:45
unsigned short uint16
Definition: types.h:30
void TIFFSwabArrayOfLong8(register uint64 *lp, tmsize_t n)
Definition: tif_swab.c:120
#define SeekOK(tif, off)
Definition: tiffiop.h:240
long int32
Definition: platform.h:12
#define ReadOK(tif, buf, size)
Definition: tiffiop.h:236
const TIFFField * TIFFFindField(TIFF *tif, uint32 tag, TIFFDataType dt)
Definition: tif_dirinfo.c:506
#define SEEK_END
Definition: cabinet.c:27
Definition: tiff.h:137
void _TIFFfree(void *p)
Definition: tif_unix.c:326
TIFFDataType
Definition: tiff.h:123
void TIFFSwabLong8(uint64 *lp)
Definition: tif_swab.c:57

Referenced by TIFFFlush().

◆ _TIFFSeekOK()

int _TIFFSeekOK ( TIFF tif,
toff_t  off 
)

Definition at line 361 of file tif_aux.c.

362 {
363  /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */
364  /* See http://bugzilla.maptools.org/show_bug.cgi?id=2726 */
365  return off <= (~(uint64)0)/2 && TIFFSeekFile(tif,off,SEEK_SET)==off;
366 }
unsigned long long uint64
Definition: platform.h:18
#define TIFFSeekFile(tif, off, whence)
Definition: tiffiop.h:221
#define SEEK_SET
Definition: jmemansi.c:26
off
Definition: i386-dis.c:3909

◆ _TIFFsetByteArray()

void _TIFFsetByteArray ( void **  ,
void ,
uint32   
)

Definition at line 57 of file tif_dir.c.

58  { setByteArray(vpp, vp, n, 1); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
GLdouble n
Definition: glext.h:7729

◆ _TIFFSetDefaultCompressionState()

void _TIFFSetDefaultCompressionState ( TIFF tif)

Definition at line 135 of file tif_compress.c.

136 {
138  tif->tif_decodestatus = TRUE;
139  tif->tif_setupdecode = _TIFFtrue;
144  tif->tif_encodestatus = TRUE;
145  tif->tif_setupencode = _TIFFtrue;
147  tif->tif_postencode = _TIFFtrue;
151  tif->tif_close = _TIFFvoid;
152  tif->tif_seek = _TIFFNoSeek;
153  tif->tif_cleanup = _TIFFvoid;
157 }
TIFFCodeMethod tif_decoderow
Definition: tiffiop.h:164
#define TRUE
Definition: types.h:120
TIFFPreMethod tif_predecode
Definition: tiffiop.h:159
int _TIFFNoTileDecode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:109
static int _TIFFtrue(TIFF *tif)
Definition: tif_compress.c:131
static void _TIFFvoid(TIFF *tif)
Definition: tif_compress.c:132
TIFFCodeMethod tif_encodestrip
Definition: tiffiop.h:167
int _TIFFNoPreCode(TIFF *tif, uint16 s)
Definition: tif_compress.c:125
#define TIFF_NOREADRAW
Definition: tiffiop.h:123
TIFFCodeMethod tif_encoderow
Definition: tiffiop.h:165
TIFFVoidMethod tif_close
Definition: tiffiop.h:170
int _TIFFNoSeek(TIFF *tif, uint32 off)
Definition: tif_compress.c:116
static int _TIFFNoFixupTags(TIFF *tif)
Definition: tif_compress.c:88
int _TIFFNoTileEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:65
int _TIFFNoRowDecode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:95
uint32 tif_flags
Definition: tiffiop.h:106
int tif_encodestatus
Definition: tiffiop.h:161
TIFFCodeMethod tif_decodestrip
Definition: tiffiop.h:166
TIFFCodeMethod tif_encodetile
Definition: tiffiop.h:169
TIFFSeekMethod tif_seek
Definition: tiffiop.h:171
int _TIFFNoStripEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:58
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
TIFFBoolMethod tif_postencode
Definition: tiffiop.h:163
int _TIFFNoRowEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:51
TIFFCodeMethod tif_decodetile
Definition: tiffiop.h:168
#define TIFF_NOBITREV
Definition: tiffiop.h:114
TIFFVoidMethod tif_cleanup
Definition: tiffiop.h:172
void _TIFFDefaultTileSize(TIFF *tif, uint32 *tw, uint32 *th)
Definition: tif_tile.c:300
int _TIFFNoStripDecode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_compress.c:102
int tif_decodestatus
Definition: tiffiop.h:156
TIFFBoolMethod tif_fixuptags
Definition: tiffiop.h:157
TIFFBoolMethod tif_setupencode
Definition: tiffiop.h:160
TIFFStripMethod tif_defstripsize
Definition: tiffiop.h:173
TIFFBoolMethod tif_setupdecode
Definition: tiffiop.h:158

Referenced by TIFFClientOpen(), and TIFFSetCompressionScheme().

◆ _TIFFsetDoubleArray()

void _TIFFsetDoubleArray ( double **  ,
double ,
uint32   
)

Definition at line 71 of file tif_dir.c.

72  { setByteArray((void**) dpp, (void*) dp, n, sizeof (double)); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
GLdouble n
Definition: glext.h:7729

Referenced by _TIFFVSetField().

◆ _TIFFsetFloatArray()

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

Definition at line 69 of file tif_dir.c.

70  { setByteArray((void**) fpp, (void*) fp, n, sizeof (float)); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
GLdouble n
Definition: glext.h:7729

Referenced by _TIFFVSetField().

◆ _TIFFsetLongArray()

void _TIFFsetLongArray ( uint32 **  ,
uint32 ,
uint32   
)

Definition at line 65 of file tif_dir.c.

66  { setByteArray((void**) lpp, (void*) lp, n, sizeof (uint32)); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
unsigned int uint32
Definition: types.h:32
GLdouble n
Definition: glext.h:7729

◆ _TIFFsetShortArray()

void _TIFFsetShortArray ( uint16 **  ,
uint16 ,
uint32   
)

Definition at line 63 of file tif_dir.c.

64  { setByteArray((void**) wpp, (void*) wp, n, sizeof (uint16)); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
GLdouble n
Definition: glext.h:7729
unsigned short uint16
Definition: types.h:30

Referenced by _TIFFVSetField(), setExtraSamples(), and TIFFReadDirectory().

◆ _TIFFsetString()

void _TIFFsetString ( char **  ,
char  
)

Definition at line 59 of file tif_dir.c.

60  { setByteArray((void**) cpp, (void*) cp, strlen(cp)+1, 1); }
static void setByteArray(void **vpp, void *vp, size_t nmemb, size_t elem_size)
Definition: tif_dir.c:43
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
POINT cp
Definition: magnifier.c:59

◆ _TIFFSwab16BitData()

void _TIFFSwab16BitData ( TIFF tif,
uint8 buf,
tmsize_t  cc 
)

Definition at line 1539 of file tif_read.c.

1540 {
1541  (void) tif;
1542  assert((cc & 1) == 0);
1544 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
void TIFFSwabArrayOfShort(register uint16 *wp, tmsize_t n)
Definition: tif_swab.c:71
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define assert(x)
Definition: debug.h:53
uint32_t cc
Definition: isohybrid.c:75
unsigned short uint16
Definition: types.h:30

Referenced by _TIFFVSetField().

◆ _TIFFSwab24BitData()

void _TIFFSwab24BitData ( TIFF tif,
uint8 buf,
tmsize_t  cc 
)

Definition at line 1547 of file tif_read.c.

1548 {
1549  (void) tif;
1550  assert((cc % 3) == 0);
1552 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define assert(x)
Definition: debug.h:53
unsigned char uint8
Definition: types.h:28
uint32_t cc
Definition: isohybrid.c:75
void TIFFSwabArrayOfTriples(register uint8 *tp, tmsize_t n)
Definition: tif_swab.c:87

Referenced by _TIFFVSetField().

◆ _TIFFSwab32BitData()

void _TIFFSwab32BitData ( TIFF tif,
uint8 buf,
tmsize_t  cc 
)

Definition at line 1555 of file tif_read.c.

1556 {
1557  (void) tif;
1558  assert((cc & 3) == 0);
1560 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
unsigned int uint32
Definition: types.h:32
#define assert(x)
Definition: debug.h:53
void TIFFSwabArrayOfLong(register uint32 *lp, tmsize_t n)
Definition: tif_swab.c:103
uint32_t cc
Definition: isohybrid.c:75

Referenced by _TIFFVSetField().

◆ _TIFFSwab64BitData()

void _TIFFSwab64BitData ( TIFF tif,
uint8 buf,
tmsize_t  cc 
)

Definition at line 1563 of file tif_read.c.

1564 {
1565  (void) tif;
1566  assert((cc & 7) == 0);
1567  TIFFSwabArrayOfDouble((double*) buf, cc/8);
1568 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define assert(x)
Definition: debug.h:53
uint32_t cc
Definition: isohybrid.c:75
void TIFFSwabArrayOfDouble(double *dp, tmsize_t n)
Definition: tif_swab.c:182

Referenced by _TIFFVSetField().

◆ _TIFFUInt64ToDouble()

double _TIFFUInt64ToDouble ( uint64  )

Definition at line 346 of file tif_aux.c.

347 {
348  _Int64 i;
349 
350  i.value = ui64;
351  if (i.part.high >= 0) {
352  return (double)i.value;
353  } else {
354  long double df;
355  df = (long double)i.value;
356  df += 18446744073709551616.0; /* adding 2**64 */
357  return (double)df;
358  }
359 }
return
Definition: dirsup.c:529
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80

Referenced by TIFFReadDirEntryDouble(), and TIFFReadDirEntryDoubleArray().

◆ _TIFFUInt64ToFloat()

float _TIFFUInt64ToFloat ( uint64  )

Definition at line 330 of file tif_aux.c.

331 {
332  _Int64 i;
333 
334  i.value = ui64;
335  if (i.part.high >= 0) {
336  return (float)i.value;
337  } else {
338  long double df;
339  df = (long double)i.value;
340  df += 18446744073709551616.0; /* adding 2**64 */
341  return (float)df;
342  }
343 }
return
Definition: dirsup.c:529
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80

Referenced by TIFFReadDirEntryFloat(), and TIFFReadDirEntryFloatArray().

◆ TIFFDefaultDirectory()

int TIFFDefaultDirectory ( TIFF tif)

Definition at line 1356 of file tif_dir.c.

1357 {
1358  register TIFFDirectory* td = &tif->tif_dir;
1360 
1363 
1364  _TIFFmemset(td, 0, sizeof (*td));
1366  td->td_bitspersample = 1;
1369  td->td_samplesperpixel = 1;
1370  td->td_rowsperstrip = (uint32) -1;
1371  td->td_tilewidth = 0;
1372  td->td_tilelength = 0;
1373  td->td_tiledepth = 1;
1374  td->td_stripbytecountsorted = 1; /* Our own arrays always sorted. */
1377  td->td_imagedepth = 1;
1378  td->td_ycbcrsubsampling[0] = 2;
1379  td->td_ycbcrsubsampling[1] = 2;
1382  tif->tif_foundfield = NULL;
1385  tif->tif_tagmethods.printdir = NULL;
1386  /*
1387  * Give client code a chance to install their own
1388  * tag extensions & methods, prior to compression overloads,
1389  * but do some prior cleanup first. (http://trac.osgeo.org/gdal/ticket/5054)
1390  */
1391  if (tif->tif_nfieldscompat > 0) {
1392  uint32 i;
1393 
1394  for (i = 0; i < tif->tif_nfieldscompat; i++) {
1395  if (tif->tif_fieldscompat[i].allocated_size)
1397  }
1399  tif->tif_nfieldscompat = 0;
1400  tif->tif_fieldscompat = NULL;
1401  }
1402  if (_TIFFextender)
1403  (*_TIFFextender)(tif);
1405  /*
1406  * NB: The directory is marked dirty as a result of setting
1407  * up the default compression scheme. However, this really
1408  * isn't correct -- we want TIFF_DIRTYDIRECT to be set only
1409  * if the user does something. We could just do the setup
1410  * by hand, but it seems better to use the normal mechanism
1411  * (i.e. TIFFSetField).
1412  */
1413  tif->tif_flags &= ~TIFF_DIRTYDIRECT;
1414 
1415  /*
1416  * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19
1417  * we clear the ISTILED flag when setting up a new directory.
1418  * Should we also be clearing stuff like INSUBIFD?
1419  */
1420  tif->tif_flags &= ~TIFF_ISTILED;
1421 
1422  return (1);
1423 }
TIFFTagMethods tif_tagmethods
Definition: tiffiop.h:203
void _TIFFmemset(void *p, int v, tmsize_t c)
Definition: tif_unix.c:338
uint16 td_ycbcrpositioning
Definition: tif_dir.h:111
uint16 td_bitspersample
Definition: tif_dir.h:74
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
uint32 td_tiledepth
Definition: tif_dir.h:72
#define THRESHHOLD_BILEVEL
Definition: tiff.h:210
static int _TIFFVGetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_dir.c:856
unsigned int uint32
Definition: types.h:32
#define TIFF_ISTILED
Definition: tiffiop.h:116
static const TIFFFieldArray tiffFieldArray
Definition: tif_dirinfo.c:48
static int _TIFFVSetField(TIFF *tif, uint32 tag, va_list ap)
Definition: tif_dir.c:166
const TIFFFieldArray * _TIFFGetFields(void)
Definition: tif_dirinfo.c:305
uint32 td_imagedepth
Definition: tif_dir.h:71
#define ORIENTATION_TOPLEFT
Definition: tiff.h:224
#define TIFF_DIRTYDIRECT
Definition: tiffiop.h:109
#define RESUNIT_INCH
Definition: tiff.h:264
uint32 td_tilelength
Definition: tif_dir.h:72
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
TIFFPrintMethod printdir
Definition: tiffio.h:340
int td_stripbytecountsorted
Definition: tif_dir.h:102
#define YCBCRPOSITION_CENTERED
Definition: tiff.h:369
uint16 td_resolutionunit
Definition: tif_dir.h:87
static TIFFExtendProc _TIFFextender
Definition: tif_dir.c:1293
uint32 tif_flags
Definition: tiffiop.h:106
smooth NULL
Definition: ftsmooth.c:416
TIFFFieldArray * tif_fieldscompat
Definition: tiffiop.h:207
uint16 td_orientation
Definition: tif_dir.h:80
uint32 allocated_size
Definition: tif_dir.h:273
void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *fieldarray)
Definition: tif_dirinfo.c:317
#define SAMPLEFORMAT_UINT
Definition: tiff.h:309
TIFFField * fields
Definition: tif_dir.h:275
TIFFPostMethod tif_postdecode
Definition: tiffiop.h:198
uint16 td_fillorder
Definition: tif_dir.h:79
#define COMPRESSION_NONE
Definition: tiff.h:158
#define TIFFTAG_COMPRESSION
Definition: tiff.h:157
uint32 td_tilewidth
Definition: tif_dir.h:72
uint16 td_sampleformat
Definition: tif_dir.h:75
uint16 td_threshholding
Definition: tif_dir.h:78
void _TIFFNoPostDecode(TIFF *tif, uint8 *buf, tmsize_t cc)
Definition: tif_read.c:1533
uint32 td_rowsperstrip
Definition: tif_dir.h:82
TIFFVGetMethod vgetfield
Definition: tiffio.h:339
uint16 td_ycbcrsubsampling[2]
Definition: tif_dir.h:110
TIFFDirectory tif_dir
Definition: tiffiop.h:135
size_t tif_nfieldscompat
Definition: tiffiop.h:208
TIFFVSetMethod vsetfield
Definition: tiffio.h:338
uint16 td_samplesperpixel
Definition: tif_dir.h:81
const TIFFField * tif_foundfield
Definition: tiffiop.h:202
void _TIFFfree(void *p)
Definition: tif_unix.c:326
int TIFFSetField(TIFF *tif, uint32 tag,...)
Definition: tif_dir.c:790
#define FILLORDER_MSB2LSB
Definition: tiff.h:216

Referenced by TIFFClientOpen(), TIFFCreateCustomDirectory(), TIFFCreateDirectory(), TIFFReadDirectory(), and TIFFUnlinkDirectory().

◆ TIFFFlushData1()

int TIFFFlushData1 ( TIFF tif)

Definition at line 792 of file tif_write.c.

793 {
794  if (tif->tif_rawcc > 0 && tif->tif_flags & TIFF_BUF4WRITE ) {
795  if (!isFillOrder(tif, tif->tif_dir.td_fillorder) &&
796  (tif->tif_flags & TIFF_NOBITREV) == 0)
798  tif->tif_rawcc);
799  if (!TIFFAppendToStrip(tif,
800  isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip,
801  tif->tif_rawdata, tif->tif_rawcc))
802  {
803  /* We update those variables even in case of error since there's */
804  /* code that doesn't really check the return code of this */
805  /* function */
806  tif->tif_rawcc = 0;
807  tif->tif_rawcp = tif->tif_rawdata;
808  return (0);
809  }
810  tif->tif_rawcc = 0;
811  tif->tif_rawcp = tif->tif_rawdata;
812  }
813  return (1);
814 }
uint8 * tif_rawcp
Definition: tiffiop.h:183
uint32 tif_curstrip
Definition: tiffiop.h:145
uint8 * tif_rawdata
Definition: tiffiop.h:179
tmsize_t tif_rawcc
Definition: tiffiop.h:184
uint32 tif_flags
Definition: tiffiop.h:106
#define TIFF_BUF4WRITE
Definition: tiffiop.h:126
unsigned char uint8
Definition: types.h:28
uint16 td_fillorder
Definition: tif_dir.h:79
uint32 tif_curtile
Definition: tiffiop.h:153
#define TIFF_NOBITREV
Definition: tiffiop.h:114
#define isTiled(tif)
Definition: tiffiop.h:213
static int TIFFAppendToStrip(TIFF *tif, uint32 strip, uint8 *data, tmsize_t cc)
Definition: tif_write.c:717
TIFFDirectory tif_dir
Definition: tiffiop.h:135
#define isFillOrder(tif, o)
Definition: tiffiop.h:215
void TIFFReverseBits(uint8 *cp, tmsize_t n)
Definition: tif_swab.c:284

Referenced by DumpModeEncode(), TIFFFlushData(), and TIFFWriteDirectorySec().

◆ TIFFInitCCITTFax3()

int TIFFInitCCITTFax3 ( TIFF ,
int   
)

◆ TIFFInitCCITTFax4()

int TIFFInitCCITTFax4 ( TIFF ,
int   
)

◆ TIFFInitCCITTRLE()

int TIFFInitCCITTRLE ( TIFF ,
int   
)

◆ TIFFInitCCITTRLEW()

int TIFFInitCCITTRLEW ( TIFF ,
int   
)

◆ TIFFInitDumpMode()

int TIFFInitDumpMode ( TIFF ,
int   
)

Definition at line 123 of file tif_dumpmode.c.

124 {
125  (void) scheme;
126  tif->tif_fixuptags = DumpFixupTags;
127  tif->tif_decoderow = DumpModeDecode;
128  tif->tif_decodestrip = DumpModeDecode;
129  tif->tif_decodetile = DumpModeDecode;
130  tif->tif_encoderow = DumpModeEncode;
131  tif->tif_encodestrip = DumpModeEncode;
132  tif->tif_encodetile = DumpModeEncode;
133  tif->tif_seek = DumpModeSeek;
134  return (1);
135 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
DWORD scheme
static int DumpModeEncode(TIFF *tif, uint8 *pp, tmsize_t cc, uint16 s)
Definition: tif_dumpmode.c:44
static int DumpModeSeek(TIFF *tif, uint32 nrows)
Definition: tif_dumpmode.c:112
static int DumpFixupTags(TIFF *tif)
Definition: tif_dumpmode.c:34
static int DumpModeDecode(TIFF *tif, uint8 *buf, tmsize_t cc, uint16 s)
Definition: tif_dumpmode.c:77

◆ TIFFInitLZW()

int TIFFInitLZW ( TIFF ,
int   
)

◆ TIFFInitNeXT()

int TIFFInitNeXT ( TIFF ,
int   
)

◆ TIFFInitPackBits()

int TIFFInitPackBits ( TIFF ,
int   
)

◆ TIFFInitPixarLog()

int TIFFInitPixarLog ( TIFF ,
int   
)

◆ TIFFInitSGILog()

int TIFFInitSGILog ( TIFF ,
int   
)

◆ TIFFInitThunderScan()

int TIFFInitThunderScan ( TIFF ,
int   
)

◆ TIFFInitZIP()

int TIFFInitZIP ( TIFF ,
int   
)

◆ TIFFSetCompressionScheme()

int TIFFSetCompressionScheme ( TIFF tif,
int  scheme 
)

Definition at line 160 of file tif_compress.c.

161 {
162  const TIFFCodec *c = TIFFFindCODEC((uint16) scheme);
163 
165  /*
166  * Don't treat an unknown compression scheme as an error.
167  * This permits applications to open files with data that
168  * the library does not have builtin support for, but which
169  * may still be meaningful.
170  */
171  return (c ? (*c->init)(tif, scheme) : 1);
172 }
DWORD scheme
const GLubyte * c
Definition: glext.h:8905
const TIFFCodec * TIFFFindCODEC(uint16 scheme)
Definition: tif_compress.c:186
void _TIFFSetDefaultCompressionState(TIFF *tif)
Definition: tif_compress.c:135
unsigned short uint16
Definition: types.h:30

Referenced by _TIFFVSetField().

◆ TIFFSetDefaultCompressionState()

int TIFFSetDefaultCompressionState ( TIFF tif)

Variable Documentation

◆ _TIFFBuiltinCODECS

TIFFCodec _TIFFBuiltinCODECS[]

Definition at line 87 of file tif_codec.c.

Referenced by TIFFFindCODEC(), and TIFFGetConfiguredCODECs().

◆ _TIFFerrorHandler

TIFFErrorHandler _TIFFerrorHandler

Definition at line 374 of file tif_unix.c.

Referenced by TIFFError(), TIFFErrorExt(), and TIFFSetErrorHandler().

◆ _TIFFerrorHandlerExt

TIFFErrorHandlerExt _TIFFerrorHandlerExt

Definition at line 30 of file tif_error.c.

Referenced by TIFFError(), TIFFErrorExt(), and TIFFSetErrorHandlerExt().

◆ _TIFFwarningHandler

TIFFErrorHandler _TIFFwarningHandler

Definition at line 364 of file tif_unix.c.

Referenced by TIFFSetWarningHandler(), TIFFWarning(), and TIFFWarningExt().

◆ _TIFFwarningHandlerExt

TIFFErrorHandlerExt _TIFFwarningHandlerExt

Definition at line 30 of file tif_warning.c.

Referenced by TIFFSetWarningHandlerExt(), TIFFWarning(), and TIFFWarningExt().