41#define FAILED_FII ((uint32) -1)
46#define TIFF_INT64_MAX ((int64)(TIFF_UINT64_MAX >> 1))
49# define TIFFCvtIEEEFloatToNative(tif, n, fp)
50# define TIFFCvtIEEEDoubleToNative(tif, n, dp)
594#if defined(__WIN32__) && (_MSC_VER < 1500)
707#if defined(__WIN32__) && (_MSC_VER < 1500)
774#define INITIAL_THRESHOLD (1024 * 1024)
775#define THRESHOLD_MULTIPLIER 10
776#define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD)
781#if SIZEOF_SIZE_T == 8
797 while( already_read <
size )
802#if SIZEOF_SIZE_T == 8
811 *pdest, already_read +
to_read);
812 if( new_dest ==
NULL )
815 "Failed to allocate memory for %s "
816 "(%ld elements of %ld bytes each)",
817 "TIFFReadDirEntryArray",
818 (
long) 1, (
long) (already_read +
to_read));
824 (
char*)*pdest + already_read,
to_read);
825 already_read += bytes_read;
843 target_count64 = (direntry->
tdir_count > maxcount) ?
846 if ((target_count64==0)||(typesize==0))
858 if ((
uint64)(2147483647/typesize)<target_count64)
860 if ((
uint64)(2147483647/desttypesize)<target_count64)
1010 *mb++=(
uint8)(*ma++);
1019 ma=(
int16*)origdata;
1028 *mb++=(
uint8)(*ma++);
1046 *mb++=(
uint8)(*ma++);
1055 ma=(
int32*)origdata;
1064 *mb++=(
uint8)(*ma++);
1082 *mb++=(
uint8)(*ma++);
1091 ma=(
int64*)origdata;
1100 *mb++=(
uint8)(*ma++);
1189 *mb++=(
int8)(*ma++);
1198 ma=(
int16*)origdata;
1207 *mb++=(
int8)(*ma++);
1225 *mb++=(
int8)(*ma++);
1234 ma=(
int32*)origdata;
1243 *mb++=(
int8)(*ma++);
1261 *mb++=(
int8)(*ma++);
1270 ma=(
int64*)origdata;
1279 *mb++=(
int8)(*ma++);
1361 ma=(
uint8*)origdata;
1406 ma=(
int32*)origdata;
1442 ma=(
int64*)origdata;
1533 ma=(
uint8*)origdata;
1536 *mb++=(
int16)(*ma++);
1547 *mb++=(
int16)(*ma++);
1564 *mb++=(
int16)(*ma++);
1573 ma=(
int32*)origdata;
1582 *mb++=(
int16)(*ma++);
1600 *mb++=(
int16)(*ma++);
1609 ma=(
int64*)origdata;
1618 *mb++=(
int16)(*ma++);
1700 ma=(
uint8*)origdata;
1742 ma=(
int16*)origdata;
1778 ma=(
int64*)origdata;
1869 ma=(
uint8*)origdata;
1872 *mb++=(
int32)(*ma++);
1883 *mb++=(
int32)(*ma++);
1897 *mb++=(
int32)(*ma++);
1906 ma=(
int16*)origdata;
1912 *mb++=(
int32)(*ma++);
1930 *mb++=(
int32)(*ma++);
1939 ma=(
int64*)origdata;
1948 *mb++=(
int32)(*ma++);
2031 ma=(
uint8*)origdata;
2073 ma=(
int16*)origdata;
2106 ma=(
int32*)origdata;
2202 ma=(
uint8*)origdata;
2205 *mb++=(
int64)(*ma++);
2216 *mb++=(
int64)(*ma++);
2230 *mb++=(
int64)(*ma++);
2239 ma=(
int16*)origdata;
2245 *mb++=(
int64)(*ma++);
2260 *mb++=(
int64)(*ma++);
2269 ma=(
int32*)origdata;
2275 *mb++=(
int64)(*ma++);
2321 *
value=(
float*)origdata;
2337 ma=(
uint8*)origdata;
2340 *mb++=(
float)(*ma++);
2351 *mb++=(
float)(*ma++);
2365 *mb++=(
float)(*ma++);
2374 ma=(
int16*)origdata;
2380 *mb++=(
float)(*ma++);
2395 *mb++=(
float)(*ma++);
2404 ma=(
int32*)origdata;
2410 *mb++=(
float)(*ma++);
2425#if defined(__WIN32__) && (_MSC_VER < 1500)
2433 *mb++ = (
float)(*ma++);
2443 ma=(
int64*)origdata;
2449 *mb++=(
float)(*ma++);
2473 *mb++=(
float)maa/(
float)mab;
2498 *mb++=(
float)maa/(
float)mab;
2510 ma=(
double*)origdata;
2566 *
value=(
double*)origdata;
2582 ma=(
uint8*)origdata;
2585 *mb++=(
double)(*ma++);
2596 *mb++=(
double)(*ma++);
2619 ma=(
int16*)origdata;
2649 ma=(
int32*)origdata;
2670#if defined(__WIN32__) && (_MSC_VER < 1500)
2688 ma=(
int64*)origdata;
2718 *mb++=(
double)maa/(
double)mab;
2743 *mb++=(
double)maa/(
double)mab;
2755 ma=(
float*)origdata;
2758 *mb++=(
double)(*ma++);
2969 assert(
sizeof(
double)==8);
2989 if (
m.i[0]==0 ||
m.i[1]==0)
2999 assert(
sizeof(
double)==8);
3020 if ((
int32)
m.i[0]==0 ||
m.i[1]==0)
3034 assert(
sizeof(
float)==4);
3036 assert(
sizeof(float_union)==4);
3038 *
value=float_union.f;
3045 assert(
sizeof(
double)==8);
3314 if (
value > 0x7FFFFFFFUL)
3324 if (
value > 0x7FFFFFFF)
3416 "Incorrect count for \"%s\"",
3421 "Incompatible type for \"%s\"",
3426 "IO error during reading of \"%s\"",
3431 "Incorrect value for \"%s\"",
3436 "Cannot handle different values per sample for \"%s\"",
3441 "Sanity check on size of \"%s\" value failed",
3446 "Out of memory reading of \"%s\"",
3457 "Incorrect count for \"%s\"; tag ignored",
3462 "Incompatible type for \"%s\"; tag ignored",
3467 "IO error during reading of \"%s\"; tag ignored",
3472 "Incorrect value for \"%s\"; tag ignored",
3477 "Cannot handle different values per sample for \"%s\"; tag ignored",
3482 "Sanity check on size of \"%s\" value failed; tag ignored",
3487 "Out of memory reading of \"%s\"; tag ignored",
3504 switch (photometric) {
3552 if( offset <= filesize && bytecount > filesize -
offset )
3562 if( bytecount < scanlinesize * tif->tif_dir.td_imagelength)
3576 static const char module[] =
"TIFFReadDirectory";
3584 int bitspersample_read =
FALSE;
3609 for (ma=
dir, mb=0; mb<dircount; ma++, mb++)
3613 for (na=ma+1, nb=mb+1; nb<dircount; na++, nb++)
3624 tif->
tif_flags &= ~TIFF_CHOPPEDUPARRAYS;
3691 for (di=0, dp=
dir; di<dircount; di++, dp++)
3699 "Unknown field with tag %d (0x%x) encountered",
3710 "Registering anonymous field with tag %d (0x%x) failed",
3778 "Planarconfig tag value assumed incorrect, "
3779 "assuming data is contig instead of chunky");
3806 "Cannot handle zero number of %s",
3807 isTiled(tif) ?
"tiles" :
"strips");
3831 isTiled(tif) ?
"TileOffsets" :
"StripOffsets");
3838 for (di=0, dp=
dir; di<dircount; di++, dp++)
3873 bitspersample_read =
TRUE;
3919 uint32 incrementpersample;
3926 if( !bitspersample_read )
3930 "Ignoring %s since BitsPerSample tag not found",
3941 "Ignoring %s because BitsPerSample=%d>24",
3949 countrequired=countpersample;
3950 incrementpersample=0;
3954 countrequired=3*countpersample;
3955 incrementpersample=countpersample;
3984 default:
value=0;
break;
4055 "Photometric tag is missing, assuming data is YCbCr");
4063 "Photometric tag value assumed incorrect, "
4064 "assuming data is YCbCr instead of RGB");
4069 "BitsPerSample tag is missing, assuming 8 bits per sample");
4078 "SamplesPerPixel tag is missing, "
4079 "assuming correct SamplesPerPixel value is 3");
4086 "SamplesPerPixel tag is missing, "
4087 "applying correct SamplesPerPixel value of 3");
4114 "color channels and ExtraSamples doesn't match SamplesPerPixel. "
4115 "Defining non-color channels as ExtraSamples.");
4122 if (!new_sampleinfo) {
4124 "temporary new sampleinfo array (%d 16 bit elements)",
4172 "TIFF directory is missing required "
4173 "\"StripByteCounts\" field, calculating from imagelength");
4187 "Bogus \"StripByteCounts\" field, ignoring and calculating from imagelength");
4209 "Wrong \"StripByteCounts\" field, ignoring and calculating from imagelength");
4227#ifdef STRIPBYTECOUNTSORTED_UNUSED
4236 tif->
tif_dir.td_stripbytecountsorted = 1;
4240 tif->
tif_dir.td_stripbytecountsorted = 0;
4298 "Cannot handle zero scanline size");
4306 "Cannot handle zero tile size");
4312 "Cannot handle zero strip size");
4326 static const char module[] =
"TIFFReadDirectoryCheckOrder";
4331 for (
n=0, o=
dir;
n<dircount;
n++, o++)
4336 "Invalid TIFF directory; tags are not sorted in ascending order");
4349 for (
m=
dir,
n=0;
n<dircount;
m++,
n++)
4351 if (
m->tdir_tag==tagid)
4397 static const char module[] =
"TIFFReadCustomDirectory";
4415 for (di=0, dp=
dir; di<dircount; di++, dp++)
4421 "Unknown field with tag %d (0x%x) encountered",
4428 "Registering anonymous field with tag %d (0x%x) failed",
4458 "Wrong data type %d for \"%s\"; tag ignored",
4511 static const char module[] =
"EstimateStripByteCounts";
4525 "for \"StripByteCounts\" array");
4539 for (dp =
dir,
n = dircount;
n > 0;
n--, dp++)
4544 if (typewidth == 0) {
4546 "Cannot determine size of unknown tag type %d",
4567 if( filesize <
space )
4574 for (strip = 0; strip < td->
td_nstrips; strip++)
4597 for (strip = 0; strip < td->
td_nstrips; strip++)
4602 for (strip = 0; strip < td->
td_nstrips; strip++)
4618 static const char module[] =
"MissingRequired";
4621 "TIFF directory is missing required \"%s\" field",
4640 "Cannot handle more than 65535 TIFF directories");
4684 "incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag ignored",
4688 }
else if ((
uint64)count < dir->tdir_count) {
4691 "incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag trimmed",
4709 static const char module[] =
"TIFFFetchDirectory";
4727 "%s: Seek error accessing TIFF directory",
4735 "%s: Can not read TIFF directory count",
4741 if (dircount16>4096)
4744 "Sanity check on directory count failed, this is probably not a valid IFD offset");
4752 "%s: Can not read TIFF directory count",
4758 if (dircount64>4096)
4761 "Sanity check on directory count failed, this is probably not a valid IFD offset");
4764 dircount16 = (
uint16)dircount64;
4768 dirsize,
"to read TIFF directory");
4769 if (origdir ==
NULL)
4773 "%.100s: Can not read TIFF directory",
4791 *nextdiroff=nextdiroff32;
4823 "Can not read TIFF directory count");
4832 if (dircount16>4096)
4835 "Sanity check on directory count failed, this is probably not a valid IFD offset");
4846 "Can not read TIFF directory count");
4855 if (dircount64>4096)
4858 "Sanity check on directory count failed, this is probably not a valid IFD offset");
4861 dircount16 = (
uint16)dircount64;
4864 if (dircount16 == 0 )
4867 "Sanity check on directory count failed, zero tag directories not supported");
4872 "to read TIFF directory");
4873 if (origdir ==
NULL)
4875 m=off+dircount16*dirsize;
4878 "Can not read TIFF directory");
4883 dircount16 * dirsize);
4886 off += dircount16 * dirsize;
4898 *nextdiroff = nextdiroff32;
4915 "to read TIFF directory");
4923 for (
n=0;
n<dircount16;
n++)
4966 static const char module[] =
"TIFFFetchNormalTag";
4974 "No definition found for tag %d",
5135 "incorrect count for field \"%s\", expected 2, got %d",
5157 "incorrect count for field \"%s\", expected %d, got %d",
5651 static const char module[] =
"TIFFFetchStripThing";
5665 const char* pszMax =
getenv(
"LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT");
5666 uint32 max_nstrips = 1000000;
5672 ( nstrips <= max_nstrips ) );
5674 if( nstrips > max_nstrips )
5681 if (resizeddata==0) {
5700 static const char module[] =
"TIFFFetchSubjectDistance";
5704 assert(
sizeof(
double)==8);
5707 if (
dir->tdir_count!=1)
5723 m.l=
dir->tdir_offset.toff_long8;
5734 else if (
m.i[0]==0xFFFFFFFF ||
m.i[1]==0)
5768 last_offset + last_bytecount <
offset )
5772 bytecount = last_offset + last_bytecount -
offset;
5775 "for chopped \"StripByteCounts\" array");
5777 "for chopped \"StripOffsets\" array");
5778 if (newcounts ==
NULL || newoffsets ==
NULL) {
5783 if (newcounts !=
NULL)
5785 if (newoffsets !=
NULL)
5794 for (
i = 0;
i < nstrips;
i++)
5796 if (stripbytes > bytecount)
5797 stripbytes = bytecount;
5798 newcounts[
i] = stripbytes;
5799 newoffsets[
i] = stripbytes ?
offset : 0;
5801 bytecount -= stripbytes;
5814#ifdef STRIPBYTECOUNTSORTED_UNUSED
5815 td->td_stripbytecountsorted = 1;
5858 stripbytes = rowblockbytes;
5859 rowsperstrip = rowblock;
5860 }
else if (rowblockbytes > 0 ) {
5861 uint32 rowblocksperstrip;
5863 rowsperstrip = rowblocksperstrip * rowblock;
5864 stripbytes = rowblocksperstrip * rowblockbytes;
5881 nstrips > 1000000 &&
5905 uint32 rowblocksperstrip;
5915 assert( stripsize > 0x7FFFFFFFUL );
5929 if( rowblockbytes == 0 || rowblockbytes > 0x7FFFFFFFUL )
5961 rowblocksperstrip = (
uint32) (512 * 1024 * 1024 / rowblockbytes);
5962 if( rowblocksperstrip == 0 )
5963 rowblocksperstrip = 1;
5964 rowsperstrip = rowblocksperstrip * rowblock;
5965 stripbytes = rowblocksperstrip * rowblockbytes;
5966 assert( stripbytes <= 0x7FFFFFFFUL );
5980 if( last_offset > filesize ||
5981 last_bytecount > filesize - last_offset )
6003 int strile,
uint64* panVals )
6005 static const char module[] =
"_TIFFPartialReadStripArray";
6006#define IO_CACHE_PAGE_SIZE 4096
6027 sizeofval =
sizeof(
uint16);
6031 sizeofval =
sizeof(
uint32);
6035 sizeofval =
sizeof(
uint64);
6040 "Invalid type for [Strip|Tile][Offset/ByteCount] tag");
6041 panVals[strile] = 0;
6044 sizeofvalint = (
int)(sizeofval);
6064 "Cannot read offset/size for strile %d", strile);
6065 panVals[strile] = 0;
6068 nOffset = nBaseOffset + sizeofval * strile;
6073 if( nOffset + sizeofval > nOffsetEndPage )
6075#undef IO_CACHE_PAGE_SIZE
6077 nLastStripOffset = nBaseOffset + arraySize * sizeofval;
6078 if( nLastStripOffset < nOffsetEndPage )
6079 nOffsetEndPage = nLastStripOffset;
6080 if( nOffsetStartPage >= nOffsetEndPage )
6083 "Cannot read offset/size for strile %d", strile);
6084 panVals[strile] = 0;
6087 if (!
SeekOK(tif,nOffsetStartPage))
6089 panVals[strile] = 0;
6093 nToRead = (
tmsize_t)(nOffsetEndPage - nOffsetStartPage);
6095 if( nRead < nToRead )
6098 "Cannot read offset/size for strile around ~%d", strile);
6101 iStartBefore = -(
int)((nOffset - nOffsetStartPage) / sizeofval);
6102 if( strile + iStartBefore < 0 )
6103 iStartBefore = -strile;
6104 for(
i = iStartBefore;
6105 (
uint32)(strile +
i) < arraySize &&
6109 if( sizeofval ==
sizeof(
uint16) )
6113 buffer + (nOffset - nOffsetStartPage) +
i * sizeofvalint,
6117 panVals[strile +
i] =
val;
6119 else if( sizeofval ==
sizeof(
uint32) )
6123 buffer + (nOffset - nOffsetStartPage) +
i * sizeofvalint,
6127 panVals[strile +
i] =
val;
6133 buffer + (nOffset - nOffsetStartPage) +
i * sizeofvalint,
6137 panVals[strile +
i] =
val;
6148 static const char module[] =
"_TIFFFetchStrileValue";
6150 if( strile >=
dirent->tdir_count )
6157 uint32 nStripArrayAllocNew;
6163 if( strile > 1000000 )
6169 if( strile > filesize /
sizeof(
uint32) )
6183#define TIFF_MAX(a,b) (((a)>(b)) ? (a) : (b))
6184#define TIFF_MIN(a,b) (((a)<(b)) ? (a) : (b))
6185 nStripArrayAllocNew =
TIFF_MAX(strile + 1, 1024U * 512U );
6186 if( nStripArrayAllocNew < 0xFFFFFFFFU / 2 )
6187 nStripArrayAllocNew *= 2;
6190 assert( strile < nStripArrayAllocNew );
6191 nArraySize64 = (
uint64)
sizeof(
uint64) * nStripArrayAllocNew;
6192 nArraySize = (
size_t)(nArraySize64);
6193#if SIZEOF_SIZE_T == 4
6194 if( nArraySize != nArraySize64 )
6197 "Cannot allocate strip offset and bytecount arrays");
6203 bytecountArray = (
uint64*)(
6207 if( bytecountArray )
6209 if( offsetArray && bytecountArray )
6223 "Cannot allocate strip offset and bytecount arrays");
6234 if( ~((*parray)[strile]) == 0 )
6238 (*parray)[strile] = 0;
6259 dirent->tdir_count <= 4 )
6286 return (*parray)[strile];
6328 int return_value = 1;
6359 if (loadStripByteCount &&
6369#ifdef STRIPBYTECOUNTSORTED_UNUSED
6373 tif->
tif_dir.td_stripbytecountsorted = 1;
6377 tif->
tif_dir.td_stripbytecountsorted = 0;
6384 return return_value;
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
#define memcpy(s1, s2, n)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static float(__cdecl *square_half_float)(float x
union TIFFDirEntry::@3556 tdir_offset
uint64 * td_stripbytecount_p
uint16 td_samplesperpixel
uint32 td_stripoffsetbyteallocsize
TIFFDirEntry td_stripoffset_entry
uint64 * td_stripoffset_p
TIFFDirEntry td_stripbytecount_entry
uint16 td_ycbcrsubsampling[2]
unsigned char field_passcount
TIFFSetGetFieldType set_field_type
tmsize_t tif_scanlinesize
TIFFBoolMethod tif_fixuptags
TIFFVoidMethod tif_cleanup
float _TIFFUInt64ToFloat(uint64 ui64)
double _TIFFUInt64ToDouble(uint64 ui64)
void * _TIFFCheckRealloc(TIFF *tif, void *buffer, tmsize_t nmemb, tmsize_t elem_size, const char *what)
void * _TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what)
#define TIFF_UINT64_FORMAT
void TIFFFreeDirectory(TIFF *tif)
int TIFFDefaultDirectory(TIFF *tif)
int TIFFSetField(TIFF *tif, uint32 tag,...)
void _TIFFsetShortArray(uint16 **wpp, uint16 *wp, uint32 n)
#define FIELD_STRIPOFFSETS
#define FIELD_IMAGEDIMENSIONS
#define TIFFFieldSet(tif, field)
#define FIELD_MAXSAMPLEVALUE
#define FIELD_TILEDIMENSIONS
#define FIELD_ROWSPERSTRIP
#define FIELD_STRIPBYTECOUNTS
#define FIELD_BITSPERSAMPLE
@ TIFF_SETGET_UINT16_PAIR
#define TIFFSetFieldBit(tif, field)
#define FIELD_SAMPLESPERPIXEL
#define FIELD_PHOTOMETRIC
int TIFFDataWidth(TIFFDataType type)
static const TIFFFieldArray exifFieldArray
const TIFFField * TIFFFieldWithTag(TIFF *tif, uint32 tag)
TIFFField * _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type)
void _TIFFSetupFields(TIFF *tif, const TIFFFieldArray *fieldarray)
int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32 n)
int _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
const TIFFFieldArray * _TIFFGetExifFields(void)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong8(int64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSrational(TIFF *tif, TIFFDirEntry *direntry, double *value)
static void MissingRequired(TIFF *, const char *)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongLong8(uint64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong(uint32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF *tif, TIFFDirEntry *direntry, uint64 **value)
#define INITIAL_THRESHOLD
uint64 TIFFGetStrileOffsetWithErr(TIFF *tif, uint32 strile, int *pbErr)
static enum TIFFReadDirEntryErr TIFFReadDirEntryLongArray(TIFF *tif, TIFFDirEntry *direntry, uint32 **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong8(int64 value)
static void TIFFReadDirEntryCheckedSshort(TIFF *tif, TIFFDirEntry *direntry, int16 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryData(TIFF *tif, uint64 offset, tmsize_t size, void *dest)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong(int32 value)
uint64 TIFFGetStrileOffset(TIFF *tif, uint32 strile)
static int TIFFCheckDirOffset(TIFF *tif, uint64 diroff)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong(int32 value)
static int _TIFFFetchStrileValue(TIFF *tif, uint32 strile, TIFFDirEntry *dirent, uint64 **parray)
static void TryChopUpUncompressedBigTiff(TIFF *)
static void TIFFReadDirectoryCheckOrder(TIFF *tif, TIFFDirEntry *dir, uint16 dircount)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortSlong8(int64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedSlong8(TIFF *tif, TIFFDirEntry *direntry, int64 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Slong8(int64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSlong(int32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntrySlongArray(TIFF *tif, TIFFDirEntry *direntry, int32 **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong8(uint64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteShort(uint16 value)
static void TIFFReadDirEntryCheckedShort(TIFF *tif, TIFFDirEntry *direntry, uint16 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Sbyte(int8 value)
static int ByteCountLooksBad(TIFF *tif)
static enum TIFFReadDirEntryErr TIFFReadDirEntryDoubleArray(TIFF *tif, TIFFDirEntry *direntry, double **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8ArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, uint64 **value, uint64 maxcount)
static uint64 TIFFReadUInt64(const uint8 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSbyte(int8 value)
static void TIFFReadDirectoryFindFieldInfo(TIFF *tif, uint16 tagid, uint32 *fii)
void TIFFCvtIEEEFloatToNative(TIFF *, uint32, float *)
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong(TIFF *tif, TIFFDirEntry *direntry, uint32 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSbyte(int8 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntrySshortArray(TIFF *tif, TIFFDirEntry *direntry, int16 **value)
uint64 TIFFGetStrileByteCountWithErr(TIFF *tif, uint32 strile, int *pbErr)
static void TIFFReadDirEntryOutputErr(TIFF *tif, enum TIFFReadDirEntryErr err, const char *module, const char *tagname, int recover)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong(uint32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF *tif, TIFFDirEntry *direntry, uint8 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong8(uint64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedLong8(TIFF *tif, TIFFDirEntry *direntry, uint64 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryFloat(TIFF *tif, TIFFDirEntry *direntry, float *value)
static int EstimateStripByteCounts(TIFF *tif, TIFFDirEntry *dir, uint16 dircount)
static void allocChoppedUpStripArrays(TIFF *tif, uint32 nstrips, uint64 stripbytes, uint32 rowsperstrip)
static void ChopUpSingleUncompressedStrip(TIFF *)
@ TIFFReadDirEntryErrPsdif
@ TIFFReadDirEntryErrRange
@ TIFFReadDirEntryErrSizesan
@ TIFFReadDirEntryErrAlloc
@ TIFFReadDirEntryErrType
@ TIFFReadDirEntryErrCount
int TIFFReadCustomDirectory(TIFF *tif, toff_t diroff, const TIFFFieldArray *infoarray)
static enum TIFFReadDirEntryErr TIFFReadDirEntryArray(TIFF *tif, TIFFDirEntry *direntry, uint32 *count, uint32 desttypesize, void **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortLong(uint32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSshort(int16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSshort(int16 value)
static void TIFFReadDirEntryCheckedLong(TIFF *tif, TIFFDirEntry *direntry, uint32 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong8(uint64 value)
int _TIFFFillStriles(TIFF *tif)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong(int32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8(TIFF *tif, TIFFDirEntry *direntry, uint64 *value)
static void TIFFReadDirEntryCheckedByte(TIFF *tif, TIFFDirEntry *direntry, uint8 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Slong(int32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryShort(TIFF *tif, TIFFDirEntry *direntry, uint16 *value)
#define IO_CACHE_PAGE_SIZE
static int _TIFFPartialReadStripArray(TIFF *tif, TIFFDirEntry *dirent, int strile, uint64 *panVals)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSshort(int16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortLong8(uint64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryDouble(TIFF *tif, TIFFDirEntry *direntry, double *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF *tif, TIFFDirEntry *direntry, int64 **value)
static void TIFFReadDirEntryCheckedFloat(TIFF *tif, TIFFDirEntry *direntry, float *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryShortArray(TIFF *tif, TIFFDirEntry *direntry, uint16 **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteLong8(uint64 value)
uint64 TIFFGetStrileByteCount(TIFF *tif, uint32 strile)
static int CheckDirCount(TIFF *, TIFFDirEntry *, uint32)
#define THRESHOLD_MULTIPLIER
static TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW uint64 _TIFFUnsanitizedAddUInt64AndInt(uint64 a, int b)
static uint16 TIFFFetchDirectory(TIFF *tif, uint64 diroff, TIFFDirEntry **pdir, uint64 *nextdiroff)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSshortShort(uint16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8(TIFF *tif, TIFFDirEntry *direntry, uint64 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSshort(int16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF *tif, TIFFDirEntry *direntry, uint16 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteByte(uint8 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryByteArray(TIFF *tif, TIFFDirEntry *direntry, uint8 **value)
void TIFFCvtIEEEDoubleToNative(TIFF *, uint32, double *)
static int TIFFFetchStripThing(TIFF *tif, TIFFDirEntry *dir, uint32 nstrips, uint64 **lpp)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongLong(uint32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong8(int64 value)
static int _TIFFGetMaxColorChannels(uint16 photometric)
static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF *tif, TIFFDirEntry *direntry, float **value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF *tif, TIFFDirEntry *direntry, uint64 **value)
static void TIFFReadDirEntryCheckedSbyte(TIFF *tif, TIFFDirEntry *direntry, int8 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeShortSlong(int32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeByteSbyte(int8 value)
static TIFFDirEntry * TIFFReadDirectoryFindEntry(TIFF *tif, TIFFDirEntry *dir, uint16 dircount, uint16 tagid)
static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc(TIFF *tif, uint64 offset, tmsize_t size, void **pdest)
static int TIFFFetchSubjectDistance(TIFF *, TIFFDirEntry *)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteLong(uint32 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntrySbyteArray(TIFF *tif, TIFFDirEntry *direntry, int8 **value)
static uint64 _TIFFGetStrileOffsetOrByteCountValue(TIFF *tif, uint32 strile, TIFFDirEntry *dirent, uint64 **parray, int *pbErr)
int TIFFReadEXIFDirectory(TIFF *tif, toff_t diroff)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedDouble(TIFF *tif, TIFFDirEntry *direntry, double *value)
static int _TIFFFillStrilesInternal(TIFF *tif, int loadStripByteCount)
int TIFFReadDirectory(TIFF *tif)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSlongSlong8(int64 value)
static void TIFFReadDirEntryCheckedSlong(TIFF *tif, TIFFDirEntry *direntry, int32 *value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLong8Sshort(int16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckedRational(TIFF *tif, TIFFDirEntry *direntry, double *value)
union _UInt64Aligned_t UInt64Aligned_t
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteShort(uint16 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeSbyteSlong8(int64 value)
static enum TIFFReadDirEntryErr TIFFReadDirEntryArrayWithLimit(TIFF *tif, TIFFDirEntry *direntry, uint32 *count, uint32 desttypesize, void **value, uint64 maxcount)
static int TIFFFetchNormalTag(TIFF *, TIFFDirEntry *, int recover)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
tmsize_t TIFFStripSize(TIFF *tif)
tmsize_t TIFFScanlineSize(TIFF *tif)
uint64 TIFFScanlineSize64(TIFF *tif)
uint64 TIFFVStripSize64(TIFF *tif, uint32 nrows)
uint64 TIFFStripSize64(TIFF *tif)
uint32 TIFFNumberOfStrips(TIFF *tif)
void TIFFSwabArrayOfShort(register uint16 *wp, tmsize_t n)
void TIFFSwabLong(uint32 *lp)
void TIFFSwabShort(uint16 *wp)
void TIFFSwabArrayOfLong8(register uint64 *lp, tmsize_t n)
void TIFFSwabLong8(uint64 *lp)
void TIFFSwabArrayOfLong(register uint32 *lp, tmsize_t n)
tmsize_t TIFFTileSize(TIFF *tif)
uint64 TIFFVTileSize64(TIFF *tif, uint32 nrows)
uint32 TIFFNumberOfTiles(TIFF *tif)
uint64 TIFFTileSize64(TIFF *tif)
void * _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)
void _TIFFmemset(void *p, int v, tmsize_t c)
void * _TIFFmalloc(tmsize_t s)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
void * _TIFFrealloc(void *p, tmsize_t s)
void TIFFWarningExt(thandle_t fd, const char *module, const char *fmt,...)
int TIFFSetupStrips(TIFF *tif)
#define TIFFTAG_BITSPERSAMPLE
#define PLANARCONFIG_SEPARATE
#define OFILETYPE_REDUCEDIMAGE
#define COMPRESSION_OJPEG
#define TIFFTAG_SAMPLESPERPIXEL
#define PHOTOMETRIC_ITULAB
#define PHOTOMETRIC_CIELAB
#define TIFFTAG_IMAGEDEPTH
#define TIFFTAG_PHOTOMETRIC
#define EXIFTAG_SUBJECTDISTANCE
#define TIFFTAG_TILELENGTH
#define TIFFTAG_OSUBFILETYPE
#define TIFFTAG_MAXSAMPLEVALUE
#define TIFFTAG_TILEDEPTH
#define PHOTOMETRIC_PALETTE
#define TIFFTAG_EXTRASAMPLES
#define TIFFTAG_IMAGEWIDTH
#define PHOTOMETRIC_SEPARATED
#define FILETYPE_REDUCEDIMAGE
#define PHOTOMETRIC_LOGLUV
#define TIFFTAG_MINSAMPLEVALUE
#define PHOTOMETRIC_ICCLAB
#define PHOTOMETRIC_YCBCR
#define TIFFTAG_TRANSFERFUNCTION
#define TIFFTAG_TILEBYTECOUNTS
#define PHOTOMETRIC_MINISWHITE
#define TIFFTAG_STRIPBYTECOUNTS
#define TIFFTAG_SMINSAMPLEVALUE
#define TIFFTAG_TILEOFFSETS
#define TIFFTAG_ROWSPERSTRIP
#define TIFFTAG_SMAXSAMPLEVALUE
#define TIFFTAG_SAMPLEFORMAT
#define TIFFTAG_TILEWIDTH
#define TIFFTAG_IMAGELENGTH
#define TIFFTAG_COMPRESSION
#define PHOTOMETRIC_MINISBLACK
#define TIFFTAG_PLANARCONFIG
#define TIFFTAG_STRIPOFFSETS
#define TIFFTAG_SUBFILETYPE
#define PLANARCONFIG_CONTIG
#define TIFFReadFile(tif, buf, size)
#define TIFF_CHOPPEDUPARRAYS
#define TIFF_LAZYSTRILELOAD
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
#define ReadOK(tif, buf, size)
#define STRIP_SIZE_DEFAULT
#define TIFF_DEFERSTRILELOAD
#define TIFFGetFileSize(tif)
#define TIFFhowmany_32(x, y)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList