37 #define WRITECHECKSTRIPS(tif, module) \ 38 (((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),0,module)) 39 #define WRITECHECKTILES(tif, module) \ 40 (((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),1,module)) 41 #define BUFFERCHECK(tif) \ 42 ((((tif)->tif_flags & TIFF_BUFFERSETUP) && tif->tif_rawdata) || \ 43 TIFFWriteBufferSetup((tif), NULL, (tsize_t) -1)) 45 static int TIFFGrowStrips(
TIFF*,
int,
const char*);
51 static const char module[] =
"TIFFWriteScanline";
53 int status, imagegrew = 0;
73 "Can not change \"ImageLength\" when using separate planes");
85 "%d: Sample out of range, max %d",
99 if (strip >= td->
td_nstrips && !TIFFGrowStrips(tif, 1, module))
184 static const char module[] =
"TIFFWriteEncodedStrip";
202 "Can not grow image by strips when using separate planes");
205 if (!TIFFGrowStrips(tif, 1, module))
268 static const char module[] =
"TIFFWriteRawStrip";
285 "Can not grow image by strips when using separate planes");
296 if (!TIFFGrowStrips(tif, 1, module))
301 return (TIFFAppendToStrip(tif, strip, (
tidata_t) data, cc) ?
340 static const char module[] =
"TIFFWriteEncodedTile";
409 if (tif->
tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile,
429 static const char module[] =
"TIFFWriteRawTile";
435 tif->
tif_name, (
unsigned long) tile,
439 return (TIFFAppendToStrip(tif, tile, (
tidata_t) data, cc) ?
443 #define isUnspecified(tif, f) \ 444 (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0) 496 "Can not write tiles to a stripped image" :
497 "Can not write scanlines to a tiled image");
513 "%s: Must set \"ImageWidth\" before writing data",
528 "%s: Must set \"PlanarConfiguration\" before writing data",
551 static const char module[] =
"TIFFWriteBufferSetup";
592 TIFFGrowStrips(
TIFF* tif,
int delta,
const char* module)
595 uint32 *new_stripoffset, *new_stripbytecount;
602 if (new_stripoffset ==
NULL || new_stripbytecount ==
NULL) {
605 if (new_stripbytecount)
629 static const char module[] =
"TIFFAppendToStrip";
669 "%s: Seek error at scanline %lu",
703 if (!TIFFAppendToStrip(tif,
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 TIFFWriteEncodedTile(TIFF *tif, ttile_t tile, tdata_t data, tsize_t cc)
int TIFFSetupStrips(TIFF *tif)
#define FIELD_STRIPOFFSETS
TIFFCodeMethod tif_encodestrip
GLint GLint GLint GLint GLint GLint y
#define WriteOK(tif, buf, size)
#define FIELD_IMAGEDIMENSIONS
#define TIFFhowmany(x, y)
#define TIFFSeekFile(tif, off, whence)
tsize_t TIFFWriteRawStrip(TIFF *tif, tstrip_t strip, tdata_t data, tsize_t cc)
TIFFCodeMethod tif_encoderow
tsize_t TIFFScanlineSize(TIFF *tif)
#define WRITECHECKSTRIPS(tif, module)
GLint GLint GLint GLint GLint x
int TIFFWriteBufferSetup(TIFF *tif, tdata_t bp, tsize_t size)
GLenum GLuint GLenum GLsizei const GLchar * buf
tsize_t TIFFWriteEncodedStrip(TIFF *tif, tstrip_t strip, tdata_t data, tsize_t cc)
#define TIFFSetFieldBit(tif, field)
#define FIELD_STRIPBYTECOUNTS
int TIFFFlushData(TIFF *tif)
GLenum GLenum GLvoid * row
#define FIELD_PLANARCONFIG
TIFFCodeMethod tif_encodetile
int td_stripbytecountsorted
TIFFPreMethod tif_preencode
GLsizei GLsizei GLenum GLenum const GLvoid * data
TIFFBoolMethod tif_postencode
ttile_t TIFFNumberOfTiles(TIFF *tif)
TIFFPostMethod tif_postdecode
void * _TIFFrealloc(tdata_t p, tsize_t s)
int TIFFWriteScanline(TIFF *tif, tdata_t buf, uint32 row, tsample_t sample)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
#define TIFFFieldSet(tif, field)
#define FIELD_ROWSPERSTRIP
ttile_t TIFFComputeTile(TIFF *tif, uint32 x, uint32 y, uint32 z, tsample_t s)
#define PLANARCONFIG_SEPARATE
void _TIFFmemset(tdata_t p, int v, tsize_t c)
tstrip_t TIFFNumberOfStrips(TIFF *tif)
if(!abbox) return FT_THROW(Invalid_Argument)
uint16 td_samplesperpixel
int TIFFWriteCheck(TIFF *tif, int tiles, const char *module)
void TIFFSetWriteOffset(TIFF *tif, toff_t off)
tsize_t TIFFTileSize(TIFF *tif)
#define isFillOrder(tif, o)
#define FIELD_TILEDIMENSIONS
void * _TIFFmalloc(tsize_t s)
tstrip_t td_stripsperimage
tsize_t TIFFWriteRawTile(TIFF *tif, ttile_t tile, tdata_t data, tsize_t cc)
tsize_t TIFFStripSize(TIFF *tif)
void _TIFFfree(tdata_t p)
#define isUnspecified(tif, f)
TIFFBoolMethod tif_setupencode
int TIFFFlushData1(TIFF *tif)
#define WRITECHECKTILES(tif, module)
#define PLANARCONFIG_CONTIG
tsize_t TIFFWriteTile(TIFF *tif, tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
uint32 * td_stripbytecount