34 #define TIFFCvtNativeToIEEEFloat(tif, n, fp) 35 #define TIFFCvtNativeToIEEEDouble(tif, n, dp) 212 static const char module[] =
"TIFFDeferStrileArrayWriting";
216 "File opened in read-only mode");
222 "Directory has already been written");
263 static const char module[] =
"TIFFRewriteDirectory";
285 "Error updating TIFF header");
297 if (!
SeekOK(tif, nextdir) ||
298 !
ReadOK(tif, &dircount, 2)) {
300 "Error fetching directory count");
307 if (!
ReadOK(tif, &nextnextdir, 4)) {
309 "Error fetching directory link");
322 "Error writing directory link");
343 "Error updating TIFF header");
356 if (!
SeekOK(tif, nextdir) ||
357 !
ReadOK(tif, &dircount64, 8)) {
359 "Error fetching directory count");
364 if (dircount64>0xFFFF)
367 "Sanity check on tag count failed, likely corrupt TIFF");
370 dircount=(
uint16)dircount64;
373 if (!
ReadOK(tif, &nextnextdir, 8)) {
375 "Error fetching directory link");
388 "Error writing directory link");
409 static const char module[] =
"TIFFWriteDirectorySec";
433 "Error post-encoding before directory write");
451 "Error flushing data before directory write");
744 "Cannot write tag %d (%s)",
868 for (na=0, nb=
dir; ; na++, nb++)
873 "Cannot find SubIFD tag");
902 for (
m=0;
m<ndir;
m++)
938 for (
m=0;
m<ndir;
m++)
1014 if(
val > 0x7FFFFFFF )
1017 return -0x7FFFFFFF-1;
1051 static const char module[] =
"TIFFWriteDirectoryTagSampleformatArray";
1132 return(TIFFWriteDirectoryTagFloatPerSample(tif,ndir,
dir,
tag,(
float)
value));
1134 return(TIFFWriteDirectoryTagDoublePerSample(tif,ndir,
dir,
tag,
value));
1137 return(TIFFWriteDirectoryTagSbytePerSample(tif,ndir,
dir,
tag,(
int8)
value));
1139 return(TIFFWriteDirectoryTagSshortPerSample(tif,ndir,
dir,
tag,(
int16)
value));
1141 return(TIFFWriteDirectoryTagSlongPerSample(tif,ndir,
dir,
tag,(
int32)
value));
1186 return(TIFFWriteDirectoryTagCheckedByte(tif,ndir,
dir,
tag,
value));
1205 static const char module[] =
"TIFFWriteDirectoryTagBytePerSample";
1238 return(TIFFWriteDirectoryTagCheckedSbyte(tif,ndir,
dir,
tag,
value));
1257 static const char module[] =
"TIFFWriteDirectoryTagSbytePerSample";
1306 static const char module[] =
"TIFFWriteDirectoryTagShortPerSample";
1338 return(TIFFWriteDirectoryTagCheckedSshort(tif,ndir,
dir,
tag,
value));
1357 static const char module[] =
"TIFFWriteDirectoryTagSshortPerSample";
1407 static const char module[] =
"TIFFWriteDirectoryTagLongPerSample";
1440 return(TIFFWriteDirectoryTagCheckedSlong(tif,ndir,
dir,
tag,
value));
1459 static const char module[] =
"TIFFWriteDirectoryTagSlongPerSample";
1492 return(TIFFWriteDirectoryTagCheckedLong8(tif,ndir,
dir,
tag,
value));
1516 return(TIFFWriteDirectoryTagCheckedSlong8(tif,ndir,
dir,
tag,
value));
1572 return(TIFFWriteDirectoryTagCheckedFloat(tif,ndir,
dir,
tag,
value));
1589 static const char module[] =
"TIFFWriteDirectoryTagFloatPerSample";
1621 return(TIFFWriteDirectoryTagCheckedDouble(tif,ndir,
dir,
tag,
value));
1638 static const char module[] =
"TIFFWriteDirectoryTagDoublePerSample";
1705 return strile_size > uncompressed_threshold;
1718 return strile_size >= uncompressed_threshold / 10;
1743 static const char module[] =
"TIFFWriteDirectoryTagLongLong8Array";
1761 int write_aslong8 = 1;
1814 "Attempt to write value larger than 0xFFFFFFFF in LONG array.");
1843 "Attempt to write value larger than 0xFFFF in SHORT array.");
1866 static const char module[] =
"TIFFWriteDirectoryTagIfdIfd8Array";
1902 "Attempt to write value larger than 0xFFFFFFFF in Classic TIFF file.");
1919 static const char module[] =
"TIFFWriteDirectoryTagShortLongLong8Array";
1932 if ((
n==0)&&(*ma>0xFFFF))
1934 if ((
n==1)&&(*ma>0xFFFFFFFF))
1981 static const char module[] =
"TIFFWriteDirectoryTagColormap";
2008 static const char module[] =
"TIFFWriteDirectoryTagTransferfunction";
2061 static const char module[] =
"TIFFWriteDirectoryTagSubifd";
2091 if( *
pa > 0xFFFFFFFFUL)
2322 static const char module[] =
"TIFFWriteDirectoryTagCheckedRational";
2335 else if (
value==0.0)
2366 static const char module[] =
"TIFFWriteDirectoryTagCheckedRationalArray";
2379 for (na=
value, nb=
m, nc=0; nc<
count; na++, nb+=2, nc++)
2381 if (*na<=0.0 || *na != *na)
2386 else if (*na >= 0 && *na <= (
float)0xFFFFFFFFU &&
2387 *na==(
float)(
uint32)(*na))
2394 nb[0]=(
uint32)((
double)(*na)*0xFFFFFFFF);
2400 nb[1]=(
uint32)((
double)0xFFFFFFFF/(*na));
2413 static const char module[] =
"TIFFWriteDirectoryTagCheckedSrationalArray";
2426 for (na=
value, nb=
m, nc=0; nc<
count; na++, nb+=2, nc++)
2430 if (*na==(
int32)(*na))
2437 nb[0]=-(
int32)((
double)(-*na)*0x7FFFFFFF);
2443 nb[1]=(
int32)((
double)0x7FFFFFFF/(-*na));
2448 if (*na==(
int32)(*na))
2455 nb[0]=(
int32)((
double)(*na)*0x7FFFFFFF);
2461 nb[1]=(
int32)((
double)0x7FFFFFFF/(*na));
2477 assert(
sizeof(
float)==4);
2490 assert(
sizeof(
float)==4);
2502 assert(
sizeof(
double)==8);
2515 assert(
sizeof(
double)==8);
2546 static const char module[] =
"TIFFWriteDirectoryTagData";
2559 for (
n=*ndir;
n>
m;
n--)
2563 dir[
m].tdir_type=datatype;
2565 dir[
m].tdir_offset.toff_long8 = 0;
2568 if(
data && datalength )
2580 if ((nb<na)||(nb<datalength))
2590 assert(datalength<0x80000000UL);
2609 dir[
m].tdir_offset.toff_long8 = na;
2624 static const char module[] =
"TIFFLinkDirectory";
2642 "Error writing SubIFD directory link");
2665 "Error writing SubIFD directory link");
2696 "Error writing TIFF header");
2709 if (!
SeekOK(tif, nextdir) ||
2710 !
ReadOK(tif, &dircount, 2)) {
2712 "Error fetching directory count");
2719 if (!
ReadOK(tif, &nextnextdir, 4)) {
2721 "Error fetching directory link");
2732 "Error writing directory link");
2737 nextdir=nextnextdir;
2755 "Error writing TIFF header");
2769 if (!
SeekOK(tif, nextdir) ||
2770 !
ReadOK(tif, &dircount64, 8)) {
2772 "Error fetching directory count");
2777 if (dircount64>0xFFFF)
2780 "Sanity check on tag count failed, likely corrupt TIFF");
2783 dircount=(
uint16)dircount64;
2786 if (!
ReadOK(tif, &nextnextdir, 8)) {
2788 "Error fetching directory link");
2799 "Error writing directory link");
2804 nextdir=nextnextdir;
2827 static const char module[] =
"TIFFResetField";
2831 uint8 direntry_raw[20];
2836 int value_in_entry = 0;
2852 "Memory mapped files not currently supported for this operation." );
2859 "Attempt to reset field on directory not already on disk." );
2868 "%s: Seek error accessing TIFF directory",
2879 "%s: Can not read TIFF directory count",
2891 "%s: Can not read TIFF directory count",
2897 dircount = (
uint16)dircount64;
2905 while( dircount > 0 )
2907 if (!
ReadOK(tif, direntry_raw, dirsize)) {
2909 "%s: Can not read TIFF directory entry.",
2914 memcpy( &entry_tag, direntry_raw + 0,
sizeof(
uint16) );
2918 if( entry_tag ==
tag )
2921 read_offset += dirsize;
2924 if( entry_tag !=
tag )
2927 "%s: Could not find tag %d.",
2935 memcpy( &entry_type, direntry_raw + 2,
sizeof(
uint16) );
2946 entry_count =
value;
2951 entry_offset =
value;
2955 memcpy( &entry_count, direntry_raw + 4,
sizeof(
uint64) );
2959 memcpy( &entry_offset, direntry_raw + 12,
sizeof(
uint64) );
2967 if( entry_offset == 0 && entry_count == 0 && entry_type == 0 )
2975 int write_aslong8 = 1;
2990 int write_aslong4 = 1;
3023 datatype = in_datatype;
3030 datatype = entry_type;
3033 datatype = entry_type;
3036 datatype = entry_type;
3038 datatype = in_datatype;
3047 "for field buffer.");
3051 if( datatype == in_datatype )
3059 ((
int32 *) buf_to_write)[
i] =
3065 "Value exceeds 32bit range of output type." );
3077 ((
uint32 *) buf_to_write)[
i] =
3083 "Value exceeds 32bit range of output type." );
3094 ((
uint16 *) buf_to_write)[
i] =
3100 "Value exceeds 16bit range of output type." );
3108 "Unhandled type conversion." );
3129 entry_offset = read_offset + 8;
3137 entry_offset = read_offset + 12;
3166 if (!
SeekOK(tif, entry_offset)) {
3169 "%s: Seek error accessing TIFF directory",
3176 "Error writing directory link");
3187 if( !value_in_entry )
3194 "Error writing directory link");
3209 entry_type = datatype;
3211 memcpy( direntry_raw + 2, &entry_type,
sizeof(
uint16) );
3231 memcpy( direntry_raw + 4, &entry_count,
sizeof(
uint64) );
3235 memcpy( direntry_raw + 12, &entry_offset,
sizeof(
uint64) );
3243 if (!
SeekOK(tif, read_offset )) {
3245 "%s: Seek error accessing TIFF directory",
3250 if (!
WriteOK(tif, direntry_raw,dirsize))
3253 "%s: Can not write TIFF directory entry.",
static int TIFFWriteDirectoryTagData(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void *data)
static int TIFFWriteDirectoryTagCheckedUndefinedArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint8 *value)
static int TIFFWriteDirectoryTagTransferfunction(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir)
static uint16 TIFFClampDoubleToUInt16(double val)
#define TIFFTAG_SUBFILETYPE
int TIFFRewriteDirectory(TIFF *tif)
static int TIFFWriteDirectoryTagShortLong(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 value)
void TIFFSwabFloat(float *fp)
uint16 td_ycbcrpositioning
uint32 TIFFFieldTag(const TIFFField *fip)
static int TIFFWriteDirectorySec(TIFF *tif, int isimage, int imagedone, uint64 *pdiroff)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
#define FIELD_MINSAMPLEVALUE
#define TIFFTAG_BITSPERSAMPLE
#define TIFFTAG_ROWSPERSTRIP
int TIFFSetupStrips(TIFF *tif)
static int TIFFWriteDirectoryTagCheckedSlong8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int64 *value)
void TIFFSwabArrayOfShort(register uint16 *wp, tmsize_t n)
static int TIFFWriteDirectoryTagCheckedFloatArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
#define FIELD_STRIPOFFSETS
#define TIFFTAG_STRIPBYTECOUNTS
ACPI_SIZE strlen(const char *String)
static int TIFFWriteDirectoryTagCheckedLong(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 value)
#define TIFFTAG_EXTRASAMPLES
#define WriteOK(tif, buf, size)
#define TIFFTAG_ORIENTATION
#define FIELD_IMAGEDIMENSIONS
#define TIFFSeekFile(tif, off, whence)
#define TIFFTAG_IMAGEWIDTH
static int32 TIFFClampDoubleToInt32(double val)
GLuint GLuint GLsizei count
#define FIELD_THRESHHOLDING
#define TIFFTAG_YRESOLUTION
#define TIFFTAG_MINSAMPLEVALUE
#define TIFFTAG_FILLORDER
void TIFFSwabDouble(double *dp)
TIFFTagValue * td_customValues
uint16 td_halftonehints[2]
static int TIFFWriteDirectoryTagRationalArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
uint64 * td_stripbytecount_p
#define FIELD_HALFTONEHINTS
#define TIFFTAG_STRIPOFFSETS
#define TIFFTAG_THRESHHOLDING
static int TIFFWriteDirectoryTagCheckedShort(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint16 value)
#define TIFFTAG_YCBCRSUBSAMPLING
#define FIELD_RESOLUTIONUNIT
#define TIFFTAG_YPOSITION
#define TIFFTAG_SMINSAMPLEVALUE
#define TIFFTAG_REFERENCEBLACKWHITE
int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c)
static int TIFFWriteDirectoryTagCheckedSshortArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int16 *value)
#define TIFFTAG_PLANARCONFIG
static int TIFFWriteDirectoryTagSrationalArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
#define FIELD_YCBCRSUBSAMPLING
static int TIFFWriteDirectoryTagCheckedShortArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint16 *value)
#define FIELD_SMAXSAMPLEVALUE
int TIFFWriteCustomDirectory(TIFF *tif, uint64 *pdiroff)
void TIFFSwabArrayOfFloat(register float *fp, tmsize_t n)
static int TIFFWriteDirectoryTagCheckedRational(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, double value)
#define TIFFTAG_TILEBYTECOUNTS
#define FIELD_TRANSFERFUNCTION
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
static int TIFFWriteDirectoryTagShort(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint16 value)
#define FIELD_MAXSAMPLEVALUE
int TIFFGetField(TIFF *tif, uint32 tag,...)
static int TIFFWriteDirectoryTagShortArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint16 *value)
static int TIFFWriteDirectoryTagLongLong8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint64 *value)
#define FIELD_BITSPERSAMPLE
#define TIFFTAG_YCBCRPOSITIONING
#define TIFFTAG_TILEWIDTH
#define FIELD_STRIPBYTECOUNTS
TIFFDirEntry td_stripbytecount_entry
void * _TIFFCheckMalloc(TIFF *tif, tmsize_t nmemb, tmsize_t elem_size, const char *what)
static int TIFFWriteDirectoryTagCheckedIfd8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint64 *value)
#define TIFFTAG_TILELENGTH
int TIFFWriteDirectory(TIFF *tif)
static int TIFFWriteDirectoryTagIfdIfd8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint64 *value)
#define TIFFTAG_IMAGELENGTH
#define FIELD_PLANARCONFIG
#define TIFFTAG_TILEOFFSETS
#define TIFFTAG_SAMPLESPERPIXEL
static uint32 TIFFClampDoubleToUInt32(double val)
double * td_sminsamplevalue
static int TIFFWriteDirectoryTagSshortArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int16 *value)
static int TIFFWriteDirectoryTagSubifd(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir)
void * _TIFFmalloc(tmsize_t s)
static uint8 TIFFClampDoubleToUInt8(double val)
TIFFSetGetFieldType get_field_type
void TIFFFreeDirectory(TIFF *tif)
unsigned char field_passcount
union tiff::@3386 tif_header
static int WriteAsLong4(TIFF *tif, uint64 strile_size)
static int TIFFWriteDirectoryTagByteArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint8 *value)
#define SAMPLEFORMAT_UINT
void TIFFSwabShort(uint16 *wp)
int TIFFGetFieldDefaulted(TIFF *tif, uint32 tag,...)
TIFFBoolMethod tif_postencode
#define SAMPLEFORMAT_IEEEFP
#define TIFFTAG_XPOSITION
unsigned char td_deferstrilearraywriting
void TIFFCvtNativeToIEEEDouble(TIFF *tif, uint32 n, double *dp)
#define TIFFTAG_HALFTONEHINTS
#define FIELD_PHOTOMETRIC
static int TIFFWriteDirectoryTagShortPerSample(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint16 value)
GLdouble GLdouble GLdouble GLdouble q
static int TIFFWriteDirectoryTagLong(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 value)
void TIFFSwabArrayOfLong(register uint32 *lp, tmsize_t n)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
static int TIFFLinkDirectory(TIFF *)
double * td_smaxsamplevalue
#define TIFFTAG_PHOTOMETRIC
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define TIFFFieldSet(tif, field)
#define TIFFTAG_PAGENUMBER
uint64 TIFFTileSize64(TIFF *tif)
static int TIFFWriteDirectoryTagIfdArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint32 *value)
#define FIELD_COMPRESSION
static int TIFFWriteDirectoryTagCheckedLong8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint64 *value)
#define FIELD_SMINSAMPLEVALUE
#define FIELD_ROWSPERSTRIP
tmsize_t tif_rawdataloaded
static int TIFFWriteDirectoryTagLong8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint64 *value)
static int8 TIFFClampDoubleToInt8(double val)
#define TIFFTAG_TRANSFERFUNCTION
#define TIFFTAG_COMPRESSION
#define FIELD_ORIENTATION
#define memcpy(s1, s2, n)
static int TIFFWriteDirectoryTagCheckedSbyteArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int8 *value)
TIFFVoidMethod tif_cleanup
GLsizei const GLfloat * value
static int TIFFWriteDirectoryTagRational(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, double value)
static int TIFFWriteDirectoryTagFloatArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
static int TIFFWriteDirectoryTagCheckedByteArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint8 *value)
static int TIFFWriteDirectoryTagCheckedSrationalArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
#define TIFFTAG_SMAXSAMPLEVALUE
#define FIELD_YCBCRPOSITIONING
int TIFFDataWidth(TIFFDataType type)
float _TIFFClampDoubleToFloat(double val)
#define FIELD_EXTRASAMPLES
void TIFFSetWriteOffset(TIFF *tif, toff_t off)
#define TIFFTAG_TILEDEPTH
uint64 TIFFStripSize64(TIFF *tif)
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
#define TIFFTAG_IMAGEDEPTH
int TIFFCheckpointDirectory(TIFF *tif)
#define TIFFTAG_RESOLUTIONUNIT
static int TIFFWriteDirectoryTagLongArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint32 *value)
void TIFFSwabLong(uint32 *lp)
uint16 td_ycbcrsubsampling[2]
#define TIFFTAG_XRESOLUTION
#define COMPRESSION_ADOBE_DEFLATE
static int TIFFWriteDirectoryTagAscii(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, char *value)
TIFFDirEntry td_stripoffset_entry
int _TIFFRewriteField(TIFF *tif, uint16 tag, TIFFDataType in_datatype, tmsize_t count, void *data)
static int TIFFWriteDirectoryTagSbyteArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int8 *value)
void TIFFSwabArrayOfLong8(register uint64 *lp, tmsize_t n)
#define FIELD_TILEDIMENSIONS
static int16 TIFFClampDoubleToInt16(double val)
int TIFFDeferStrileArrayWriting(TIFF *tif)
uint16 * td_transferfunction[3]
static int TIFFWriteDirectoryTagColormap(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir)
static int TIFFWriteDirectoryTagCheckedSlongArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int32 *value)
uint64 * td_stripoffset_p
void TIFFSwabArrayOfDouble(double *dp, tmsize_t n)
static int TIFFWriteDirectoryTagCheckedIfdArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint32 *value)
static int TIFFWriteDirectoryTagSlong8Array(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int64 *value)
#define FIELD_SAMPLESPERPIXEL
#define ReadOK(tif, buf, size)
static int TIFFWriteDirectoryTagCheckedAscii(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, char *value)
const TIFFField * TIFFFindField(TIFF *tif, uint32 tag, TIFFDataType dt)
uint16 td_samplesperpixel
static int TIFFWriteDirectoryTagSampleformatArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, double *value)
#define FIELD_REFBLACKWHITE
static int WriteAsLong8(TIFF *tif, uint64 strile_size)
TIFFHeaderClassic classic
int TIFFCreateDirectory(TIFF *tif)
static int TIFFWriteDirectoryTagCheckedDoubleArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, double *value)
#define TIFFTAG_SAMPLEFORMAT
#define FIELD_SAMPLEFORMAT
void TIFFCvtNativeToIEEEFloat(TIFF *tif, uint32 n, float *fp)
static int _WriteAsType(TIFF *tif, uint64 strile_size, uint64 uncompressed_threshold)
int TIFFFlushData1(TIFF *tif)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
#define TIFFTAG_MAXSAMPLEVALUE
static int TIFFWriteDirectoryTagCheckedRationalArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, float *value)
static int TIFFWriteDirectoryTagUndefinedArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint8 *value)
union TIFFDirEntry::@3384 tdir_offset
void TIFFSwabLong8(uint64 *lp)
int _TIFFFillStriles(TIFF *tif)
#define FIELD_SUBFILETYPE
static int TIFFWriteDirectoryTagDoubleArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, double *value)
static int TIFFWriteDirectoryTagCheckedLongArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, uint32 *value)
static int TIFFWriteDirectoryTagSlongArray(TIFF *tif, uint32 *ndir, TIFFDirEntry *dir, uint16 tag, uint32 count, int32 *value)