/* Tile-oriented Read Support Contributed by Nancy Cam (Silicon Graphics). Read and decompress a tile of data. The tile is selected by the (x,y,z,s) coordinates.  */
tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32 x, uint32 y, uint32 z, uint16 s)
/* Tile-oriented Read Support Contributed by Nancy Cam (Silicon Graphics). Read and decompress a tile of data. The tile is selected by the (x,y,z,s) coordinates.  */
tmsize_t TIFFReadTile(TIFF *tif, void *buf, uint32 x, uint32 y, uint32 z, uint16 s)
{
	if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
		return ((tmsize_t)(-1));
	return (TIFFReadEncodedTile(tif,
	    TIFFComputeTile(tif, x, y, z, s), buf, (tmsize_t)(-1)));
}