38 static int TIFFCheckRead(
TIFF*,
int);
40 #define NOSTRIP ((tstrip_t) -1) 41 #define NOTILE ((ttile_t) -1) 60 "%lu: Sample out of range, max %lu",
79 if (!TIFFStartStrip(tif, strip))
98 if (!TIFFCheckRead(tif, 0))
100 if( (e = TIFFSeek(tif, row, sample)) != 0) {
114 return (e > 0 ? 1 : -1);
129 if (!TIFFCheckRead(tif, 0))
147 sep_strip = strip % strips_per_sep;
149 if (sep_strip != strips_per_sep-1 ||
156 else if (size > stripsize)
168 TIFFReadRawStrip1(
TIFF* tif,
178 "%s: Seek error at scanline %lu, strip %lu",
180 (
unsigned long) tif->
tif_row, (
unsigned long) strip);
186 "%s: Read error at scanline %lu; got %lu bytes, expected %lu",
190 (
unsigned long)
size);
196 "%s: Read error at scanline %lu, strip %lu; got %lu bytes, expected %lu",
199 (
unsigned long) strip,
201 (
unsigned long)
size);
216 static const char module[] =
"TIFFReadRawStrip";
220 if (!TIFFCheckRead(tif, 0))
224 (
unsigned long) strip, (
unsigned long) td->
td_nstrips);
228 if (bytecount <= 0) {
230 "%lu: Invalid strip byte count, strip %lu",
231 (
unsigned long) bytecount, (
unsigned long) strip);
234 if (size != (
tsize_t)-1 && size < bytecount)
236 return (TIFFReadRawStrip1(tif, strip, buf, bytecount, module));
247 static const char module[] =
"TIFFFillStrip";
252 if (bytecount <= 0) {
254 "%lu: Invalid strip byte count, strip %lu",
255 (
unsigned long) bytecount, (
unsigned long) strip);
281 "%s: Read error on strip %lu; got %lu bytes, expected %lu",
283 (
unsigned long) strip,
285 (
unsigned long) bytecount);
302 "%s: Data buffer too small to hold strip %lu",
303 tif->
tif_name, (
unsigned long) strip);
310 if (TIFFReadRawStrip1(tif, strip, (
unsigned char *)tif->
tif_rawdata,
311 bytecount, module) != bytecount)
317 return (TIFFStartStrip(tif, strip));
333 if (!TIFFCheckRead(tif, 1) || !
TIFFCheckTile(tif, x, y, z, s))
349 if (!TIFFCheckRead(tif, 1))
358 else if (size > tilesize)
369 TIFFReadRawTile1(
TIFF* tif,
379 "%s: Seek error at row %ld, col %ld, tile %ld",
389 "%s: Read error at row %ld, col %ld; got %lu bytes, expected %lu",
394 (
unsigned long)
size);
400 "%s: Read error at row %ld, col %ld, tile %ld; got %lu bytes, expected %lu",
406 (
unsigned long)
size);
420 static const char module[] =
"TIFFReadRawTile";
424 if (!TIFFCheckRead(tif, 1))
428 (
unsigned long) tile, (
unsigned long) td->
td_nstrips);
432 if (size != (
tsize_t) -1 && size < bytecount)
434 return (TIFFReadRawTile1(tif, tile, buf, bytecount, module));
445 static const char module[] =
"TIFFFillTile";
450 if (bytecount <= 0) {
452 "%lu: Invalid tile byte count, tile %lu",
453 (
unsigned long) bytecount, (
unsigned long) tile);
490 "%s: Data buffer too small to hold tile %ld",
498 if (TIFFReadRawTile1(tif, tile,
500 bytecount, module) != bytecount)
506 return (TIFFStartTile(tif, tile));
521 static const char module[] =
"TIFFReadBufferSetup";
539 "%s: No space for data buffer at scanline %ld",
597 TIFFCheckRead(
TIFF* tif,
int tiles)
605 "Can not read tiles from a stripped image" :
606 "Can not read scanlines from a tiled image");
622 assert((cc & 1) == 0);
630 assert((cc % 3) == 0);
638 assert((cc & 3) == 0);
646 assert((cc & 7) == 0);
TIFFCodeMethod tif_decoderow
void TIFFReverseBits(register unsigned char *cp, register unsigned long n)
int TIFFCheckTile(TIFF *tif, uint32 x, uint32 y, uint32 z, tsample_t s)
tsize_t TIFFReadRawStrip(TIFF *tif, tstrip_t strip, tdata_t buf, tsize_t size)
TIFFPreMethod tif_predecode
GLint GLint GLint GLint GLint GLint y
#define TIFFhowmany(x, y)
int TIFFFillStrip(TIFF *, tstrip_t)
int TIFFReadScanline(TIFF *tif, tdata_t buf, uint32 row, tsample_t sample)
void _TIFFSwab32BitData(TIFF *tif, tidata_t buf, tsize_t cc)
void TIFFSwabArrayOfShort(uint16 *wp, register unsigned long n)
GLint GLint GLint GLint GLint x
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
void _TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLenum GLvoid * row
TIFFCodeMethod tif_decodestrip
tsize_t TIFFReadRawTile(TIFF *tif, ttile_t tile, tdata_t buf, tsize_t size)
tsize_t TIFFVStripSize(TIFF *tif, uint32 nrows)
void TIFFSwabArrayOfTriples(uint8 *tp, unsigned long n)
TIFFPostMethod tif_postdecode
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
int TIFFFillTile(TIFF *, ttile_t)
void TIFFSwabArrayOfLong(register uint32 *lp, register unsigned long n)
#define TIFFroundup(x, y)
ttile_t TIFFComputeTile(TIFF *tif, uint32 x, uint32 y, uint32 z, tsample_t s)
TIFFCodeMethod tif_decodetile
tsize_t TIFFReadEncodedTile(TIFF *tif, ttile_t tile, tdata_t buf, tsize_t size)
#define PLANARCONFIG_SEPARATE
void _TIFFNoPostDecode(TIFF *tif, tidata_t buf, tsize_t cc)
if(!abbox) return FT_THROW(Invalid_Argument)
uint16 td_samplesperpixel
void _TIFFSwab24BitData(TIFF *tif, tidata_t buf, tsize_t cc)
void TIFFSwabArrayOfDouble(double *dp, register unsigned long n)
void _TIFFSwab16BitData(TIFF *tif, tidata_t buf, tsize_t cc)
void _TIFFSwab64BitData(TIFF *tif, tidata_t buf, tsize_t cc)
int TIFFReadBufferSetup(TIFF *tif, tdata_t bp, tsize_t size)
#define isFillOrder(tif, o)
tsize_t TIFFReadEncodedStrip(TIFF *tif, tstrip_t strip, tdata_t buf, tsize_t size)
void * _TIFFmalloc(tsize_t s)
tstrip_t td_stripsperimage
void _TIFFfree(tdata_t p)
#define TIFFReadFile(tif, buf, size)
tsize_t TIFFReadTile(TIFF *tif, tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
uint32 * td_stripbytecount
TIFFBoolMethod tif_setupdecode