xp_comm_proj/ReadGeoTiff/libtiff/tif_aux.c
/*
 * Encode a hunk of pixels.
 */
Encode a hunk of pixels.
Encode a hunk of pixels .
static int
DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
{
	(void) s;
	while (cc > 0) {
		tsize_t n;
		n = cc;
		if (tif->tif_rawcc + n > tif->tif_rawdatasize)
			n = tif->tif_rawdatasize - tif->tif_rawcc;
		if (tif->tif_rawcp != pp)
			_TIFFmemcpy(tif->tif_rawcp, pp, n);
		tif->tif_rawcp += n;
		tif->tif_rawcc += n;
		pp += n;
		cc -= n;
		if (tif->tif_rawcc >= tif->tif_rawdatasize &&
		    !TIFFFlushData1(tif))
			return (-1);
	}
	return (1);
}
static int DumpModeEncode ( TIFF * tif , tidata_t pp , tsize_t cc , tsample_t s ) { ( void ) s ; while ( cc > 0 ) { tsize_t n ; n = cc ; if ( tif -> tif_rawcc + n > tif -> tif_rawdatasize ) n = tif -> tif_rawdatasize - tif -> tif_rawcc ; if ( tif -> tif_rawcp != pp ) _TIFFmemcpy ( tif -> tif_rawcp , pp , n ) ; tif -> tif_rawcp += n ; tif -> tif_rawcc += n ; pp += n ; cc -= n ; if ( tif -> tif_rawcc >= tif -> tif_rawdatasize && ! TIFFFlushData1 ( tif ) ) return ( -1 ) ; } return ( 1 ) ; }
Encode a hunk of pixels.
Encode a hunk of pixels .
/*
		 * Avoid copy if client has setup raw
		 * data buffer to avoid extra copy.
		 */