|
ReactOS 0.4.16-dev-2617-g01a0906
|
#include "tif_config.h"#include <fcntl.h>#include <sys/types.h>#include <string.h>#include <assert.h>#include "tif_hash_set.h"#include "tiffio.h"#include "tif_dir.h"#include <limits.h>

Go to the source code of this file.
Classes | |
| struct | client_info |
| struct | TIFFOffsetAndDirNumber |
| union | TIFFHeaderUnion |
| struct | tiff |
| struct | TIFFOpenOptions |
Macros | |
| #define | TIFF_NON_EXISTENT_DIR_NUMBER UINT_MAX |
| #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 | TIFF_DEFERSTRILELOAD 0x1000000U /* defer strip/tile offset/bytecount array loading. */ |
| #define | TIFF_LAZYSTRILELOAD |
| #define | TIFF_CHOPPEDUPARRAYS |
| #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) |
| #define | TIFFhowmany8_32(x) (((x)&0x07) ? ((uint32_t)(x) >> 3) + 1 : (uint32_t)(x) >> 3) |
| #define | TIFFroundup_32(x, y) (TIFFhowmany_32(x, y) * (y)) |
| #define | TIFFhowmany_64(x, y) ((((uint64_t)(x)) + (((uint64_t)(y)) - 1)) / ((uint64_t)(y))) |
| #define | TIFFhowmany8_64(x) (((x)&0x07) ? ((uint64_t)(x) >> 3) + 1 : (uint64_t)(x) >> 3) |
| #define | TIFFroundup_64(x, y) (TIFFhowmany_64(x, y) * (y)) |
| #define | TIFFSafeMultiply(t, v, m) |
| #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 | fseek(stream, offset, whence) fseeko(stream, offset, whence) |
| #define | ftell(stream, offset, whence) ftello(stream, offset, whence) |
| #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_t * | tidata_t |
| typedef void(* | TIFFVoidMethod) (TIFF *) |
| typedef int(* | TIFFBoolMethod) (TIFF *) |
| typedef int(* | TIFFPreMethod) (TIFF *, uint16_t) |
| typedef int(* | TIFFCodeMethod) (TIFF *tif, uint8_t *buf, tmsize_t size, uint16_t sample) |
| typedef int(* | TIFFSeekMethod) (TIFF *, uint32_t) |
| typedef void(* | TIFFPostMethod) (TIFF *tif, uint8_t *buf, tmsize_t size) |
| typedef uint32_t(* | TIFFStripMethod) (TIFF *, uint32_t) |
| typedef void(* | TIFFTileMethod) (TIFF *, uint32_t *, uint32_t *) |
| typedef struct TIFFOffsetAndDirNumber | TIFFOffsetAndDirNumber |
| typedef size_t | TIFFIOSize_t |
| #define isFillOrder | ( | tif, | |
| o | |||
| ) | (((tif)->tif_flags & (o)) != 0) |
| #define isMapped | ( | tif | ) | (((tif)->tif_flags & TIFF_MAPPED) != 0) |
| #define isTiled | ( | tif | ) | (((tif)->tif_flags & TIFF_ISTILED) != 0) |
| #define isUpSampled | ( | tif | ) | (((tif)->tif_flags & TIFF_UPSAMPLED) != 0) |
| #define SeekOK | ( | tif, | |
| off | |||
| ) | _TIFFSeekOK(tif, off) |
| #define TIFF_CHOPPEDUPARRAYS |
| #define TIFF_LAZYSTRILELOAD |
| #define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */ |
| #define TIFF_NOREADRAW 0x20000U /* skip reading of raw uncompressed image data */ |
| #define TIFF_SWAB 0x00080U /* byte swap file information */ |
| #define TIFFCloseFile | ( | tif | ) | ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) |
| #define TIFFGetFileSize | ( | tif | ) | ((*(tif)->tif_sizeproc)((tif)->tif_clientdata)) |
| #define TIFFSeekFile | ( | tif, | |
| off, | |||
| whence | |||
| ) | ((*(tif)->tif_seekproc)((tif)->tif_clientdata, (off), (whence))) |
| typedef tidataval_t* tidata_t |
| typedef unsigned char tidataval_t |
| typedef struct client_info TIFFClientInfoLink |
| typedef size_t TIFFIOSize_t |
calloc() version that takes into account memory-specific open options
Definition at line 201 of file tif_open.c.
Referenced by TIFFReadBufferSetup(), and TIFFReadDirectory().
Definition at line 84 of file tif_aux.c.
Referenced by TIFFRasterScanlineSize(), TIFFReadRawStrip(), TIFFReadRawTile(), TIFFScanlineSize(), TIFFStripSize(), TIFFTileRowSize(), TIFFTileSize(), TIFFVStripSize(), and TIFFVTileSize().
Definition at line 122 of file tif_aux.c.
Referenced by _TIFFMergeFields(), _TIFFRewriteField(), _TIFFVSetField(), allocChoppedUpStripArrays(), EstimateStripByteCounts(), TIFFFetchDirectory(), TIFFFetchStripThing(), TIFFMergeFieldInfo(), TIFFReadDirEntryArrayWithLimit(), and TIFFSetupStrips().
| void * _TIFFCheckRealloc | ( | TIFF * | tif, |
| void * | buffer, | ||
| tmsize_t | nmemb, | ||
| tmsize_t | elem_size, | ||
| const char * | what | ||
| ) |
Definition at line 97 of file tif_aux.c.
Referenced by _TIFFCheckMalloc(), _TIFFMergeFields(), and TIFFMergeFieldInfo().
Definition at line 391 of file tif_aux.c.
Referenced by _TIFFVSetField(), and TIFFWriteDirectoryTagSampleformatArray().
Definition at line 127 of file tif_close.c.
Referenced by TIFFCleanup(), TIFFCreateCustomDirectory(), TIFFSetDirectory(), TIFFSetSubDirectory(), and TIFFUnlinkDirectory().
Definition at line 223 of file tif_strip.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 272 of file tif_tile.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 40 of file tif_open.c.
Referenced by TIFFClientOpenExt(), and TIFFFdOpenExt().
Definition at line 48 of file tif_open.c.
Referenced by TIFFClientOpenExt(), and TIFFFdOpenExt().
| void _TIFFErrorEarly | ( | TIFFOpenOptions * | opts, |
| thandle_t | clientdata, | ||
| const char * | module, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
free() version that takes into account memory-specific open options
Definition at line 275 of file tif_open.c.
Referenced by _TIFFCreateAnonField(), _TIFFFetchStrileValue(), _TIFFFillStrilesInternal(), _TIFFRewriteField(), _TIFFSetupFields(), _TIFFVSetField(), allocChoppedUpStripArrays(), EstimateStripByteCounts(), fpAcc(), fpDiff(), gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), initCIELabConversion(), PredictorEncodeRow(), PredictorEncodeTile(), setByteArray(), setDoubleArrayOneValue(), setExtraSamples(), setupMap(), TIFFAppendToStrip(), TIFFCleanup(), TIFFClientOpenExt(), TIFFDefaultDirectory(), TIFFDefaultTransferFunction(), TIFFFetchDirectory(), TIFFFetchNormalTag(), TIFFFetchStripThing(), TIFFFillStrip(), TIFFFillTile(), TIFFFreeDirectory(), TIFFGetConfiguredCODECs(), TIFFGrowStrips(), TIFFPrintDirectory(), TIFFReadAndRealloc(), TIFFReadBufferSetup(), TIFFReadCustomDirectory(), TIFFReadDirectory(), TIFFReadDirEntryArrayWithLimit(), TIFFReadDirEntryByteArray(), TIFFReadDirEntryDoubleArray(), TIFFReadDirEntryFloatArray(), TIFFReadDirEntryIfd8Array(), TIFFReadDirEntryLong8ArrayWithLimit(), TIFFReadDirEntryLongArray(), TIFFReadDirEntryPersampleShort(), TIFFReadDirEntrySbyteArray(), TIFFReadDirEntryShortArray(), TIFFReadDirEntrySlong8Array(), TIFFReadDirEntrySlongArray(), TIFFReadDirEntrySshortArray(), TIFFRGBAImageEnd(), TIFFSetupStrips(), TIFFUnlinkDirectory(), TIFFUnRegisterCODEC(), TIFFUnsetField(), TIFFWriteBufferSetup(), TIFFWriteDirectorySec(), TIFFWriteDirectoryTagCheckedRationalArray(), TIFFWriteDirectoryTagCheckedRationalDoubleArray(), TIFFWriteDirectoryTagCheckedSrationalArray(), TIFFWriteDirectoryTagCheckedSrationalDoubleArray(), TIFFWriteDirectoryTagColormap(), TIFFWriteDirectoryTagIfdIfd8Array(), TIFFWriteDirectoryTagLong8Array(), TIFFWriteDirectoryTagLongLong8Array(), TIFFWriteDirectoryTagSampleformatArray(), TIFFWriteDirectoryTagShortPerSample(), TIFFWriteDirectoryTagSlong8Array(), TIFFWriteDirectoryTagSubifd(), and TIFFWriteDirectoryTagTransferfunction().
| int _TIFFgetMode | ( | TIFFOpenOptions * | opts, |
| thandle_t | clientdata, | ||
| const char * | mode, | ||
| const char * | module | ||
| ) |
Definition at line 55 of file tif_open.c.
Referenced by TIFFClientOpenExt(), TIFFOpenExt(), and TIFFOpenWExt().
malloc() version that takes into account memory-specific open options
Definition at line 173 of file tif_open.c.
Referenced by _TIFFCreateAnonField(), _TIFFReadEncodedStripAndAllocBuffer(), _TIFFReadEncodedTileAndAllocBuffer(), BuildMapBitdepth16To8(), BuildMapUaToAa(), fpAcc(), fpDiff(), initCIELabConversion(), initYCbCrConversion(), makebwmap(), makecmap(), PredictorEncodeRow(), PredictorEncodeTile(), setByteArray(), setDoubleArrayOneValue(), setupMap(), TIFFAppendToStrip(), TIFFClientOpenExt(), TIFFDefaultRefBlackWhite(), TIFFDefaultTransferFunction(), TIFFFetchNormalTag(), TIFFPrintDirectory(), TIFFReadCustomDirectory(), TIFFReadDirectory(), TIFFReadDirEntryByteArray(), TIFFReadDirEntryDoubleArray(), TIFFReadDirEntryFloatArray(), TIFFReadDirEntryIfd8Array(), TIFFReadDirEntryLong8ArrayWithLimit(), TIFFReadDirEntryLongArray(), TIFFReadDirEntrySbyteArray(), TIFFReadDirEntryShortArray(), TIFFReadDirEntrySlong8Array(), TIFFReadDirEntrySlongArray(), TIFFReadDirEntrySshortArray(), TIFFRegisterCODEC(), TIFFRGBAImageBegin(), TIFFSetClientInfo(), TIFFWriteBufferSetup(), TIFFWriteDirectorySec(), TIFFWriteDirectoryTagCheckedRationalArray(), TIFFWriteDirectoryTagCheckedRationalDoubleArray(), TIFFWriteDirectoryTagCheckedSrationalArray(), TIFFWriteDirectoryTagCheckedSrationalDoubleArray(), TIFFWriteDirectoryTagColormap(), TIFFWriteDirectoryTagIfdIfd8Array(), TIFFWriteDirectoryTagLong8Array(), TIFFWriteDirectoryTagLongLong8Array(), TIFFWriteDirectoryTagSampleformatArray(), TIFFWriteDirectoryTagShortPerSample(), TIFFWriteDirectoryTagSlong8Array(), TIFFWriteDirectoryTagSubifd(), and TIFFWriteDirectoryTagTransferfunction().
Definition at line 35 of file tif_aux.c.
Referenced by TIFFNumberOfStrips(), and TIFFNumberOfTiles().
Definition at line 47 of file tif_aux.c.
Referenced by TIFFRasterScanlineSize64(), TIFFScanlineSize64(), TIFFTileRowSize64(), TIFFVStripSize64(), and TIFFVTileSize64().
Definition at line 59 of file tif_aux.c.
Referenced by _TIFFCheckRealloc(), gtStripSeparate(), gtTileSeparate(), and setByteArray().
Definition at line 1648 of file tif_read.c.
Referenced by _TIFFVSetField(), PredictorSetupDecode(), PredictorSetupEncode(), and TIFFDefaultDirectory().
Definition at line 128 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 96 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 51 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 120 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 104 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 59 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 112 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 67 of file tif_compress.c.
Referenced by _TIFFSetDefaultCompressionState().
Definition at line 725 of file tif_print.c.
Referenced by _TIFFprintAsciiTag().
Definition at line 751 of file tif_print.c.
| tmsize_t _TIFFReadEncodedStripAndAllocBuffer | ( | TIFF * | tif, |
| uint32_t | strip, | ||
| void ** | buf, | ||
| tmsize_t | bufsizetoalloc, | ||
| tmsize_t | size_to_read | ||
| ) |
Definition at line 584 of file tif_read.c.
Referenced by gtStripContig(), and gtStripSeparate().
| tmsize_t _TIFFReadEncodedTileAndAllocBuffer | ( | TIFF * | tif, |
| uint32_t | tile, | ||
| void ** | buf, | ||
| tmsize_t | bufsizetoalloc, | ||
| tmsize_t | size_to_read | ||
| ) |
Definition at line 1029 of file tif_read.c.
Referenced by _TIFFReadTileAndAllocBuffer().
| tmsize_t _TIFFReadTileAndAllocBuffer | ( | TIFF * | tif, |
| void ** | buf, | ||
| tmsize_t | bufsizetoalloc, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | z, | ||
| uint16_t | s | ||
| ) |
Definition at line 1012 of file tif_read.c.
Referenced by gtTileContig(), and gtTileSeparate().
realloc() version that takes into account memory-specific open options
Definition at line 235 of file tif_open.c.
Referenced by _TIFFCheckRealloc(), _TIFFFetchStrileValue(), _TIFFVSetField(), TIFFGetConfiguredCODECs(), TIFFGrowStrips(), TIFFReadAndRealloc(), and TIFFReadDirEntryDataAndRealloc().
| int _TIFFRewriteField | ( | TIFF * | tif, |
| uint16_t | tag, | ||
| TIFFDataType | in_datatype, | ||
| tmsize_t | count, | ||
| void * | data | ||
| ) |
Definition at line 3377 of file tif_dirwrite.c.
Referenced by TIFFForceStrileArrayWriting().
Definition at line 60 of file tif_dir.c.
Definition at line 142 of file tif_compress.c.
Referenced by TIFFClientOpenExt(), and TIFFSetCompressionScheme().
Definition at line 113 of file tif_dir.c.
Referenced by _TIFFVSetField().
Definition at line 104 of file tif_dir.c.
Referenced by _TIFFVSetField().
Definition at line 78 of file tif_dir.c.
Referenced by _TIFFVSetField(), setExtraSamples(), and TIFFReadDirectory().
Definition at line 1655 of file tif_read.c.
Referenced by _TIFFVSetField().
Definition at line 1662 of file tif_read.c.
Referenced by _TIFFVSetField().
Definition at line 1669 of file tif_read.c.
Referenced by _TIFFVSetField().
Definition at line 1676 of file tif_read.c.
Referenced by _TIFFVSetField().
| void TIFFCIELab16ToXYZ | ( | TIFFCIELabToRGB * | cielab, |
| uint32_t | l, | ||
| int32_t | a, | ||
| int32_t | b, | ||
| float * | X, | ||
| float * | Y, | ||
| float * | Z | ||
| ) |
Definition at line 55 of file tif_color.c.
Referenced by DECLAREContigPutFunc(), and TIFFCIELabToXYZ().
Definition at line 1752 of file tif_dir.c.
Referenced by TIFFClientOpenExt(), TIFFCreateCustomDirectory(), TIFFCreateDirectory(), TIFFReadCustomDirectory(), TIFFReadDirectory(), and TIFFUnlinkDirectory().
Definition at line 931 of file tif_write.c.
Referenced by DumpModeEncode(), TIFFFlushData(), and TIFFWriteDirectorySec().
Definition at line 110 of file tif_dumpmode.c.
Referenced by TIFFFillStripPartial().
Definition at line 166 of file tif_compress.c.
Referenced by _TIFFVSetField().
Definition at line 86 of file tif_codec.c.
Referenced by TIFFFindCODEC(), and TIFFGetConfiguredCODECs().
|
extern |
Definition at line 382 of file tif_unix.c.
Referenced by _TIFFErrorEarly(), TIFFError(), TIFFErrorExt(), TIFFErrorExtR(), and TIFFSetErrorHandler().
|
extern |
Definition at line 30 of file tif_error.c.
Referenced by _TIFFErrorEarly(), TIFFError(), TIFFErrorExt(), TIFFErrorExtR(), and TIFFSetErrorHandlerExt().
|
extern |
Definition at line 373 of file tif_unix.c.
Referenced by TIFFSetWarningHandler(), TIFFWarning(), TIFFWarningExt(), and TIFFWarningExtR().
|
extern |
Definition at line 30 of file tif_warning.c.
Referenced by TIFFSetWarningHandlerExt(), TIFFWarning(), TIFFWarningExt(), and TIFFWarningExtR().