1 <!-- Creator     : groff version 1.18.1 --> 
   2 <!-- CreationDate: Mon Mar 13 18:03:10 2006 --> 
   5 <meta name=
"generator" content=
"groff -Thtml, see www.gnu.org"> 
   6 <meta name=
"Content-Style" content=
"text/css"> 
   7 <title>TIFFReadTile
</title> 
  11 <h1 align=center
>TIFFReadTile
</h1> 
  12 <a href=
"#NAME">NAME
</a><br> 
  13 <a href=
"#SYNOPSIS">SYNOPSIS
</a><br> 
  14 <a href=
"#DESCRIPTION">DESCRIPTION
</a><br> 
  15 <a href=
"#NOTES">NOTES
</a><br> 
  16 <a href=
"#RETURN VALUES">RETURN VALUES
</a><br> 
  17 <a href=
"#DIAGNOSTICS">DIAGNOSTICS
</a><br> 
  18 <a href=
"#SEE ALSO">SEE ALSO
</a><br> 
  24 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  25        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  26 <tr valign=
"top" align=
"left"> 
  29 <p>TIFFReadTile 
− read and decode a tile of data from
 
  30 an open 
<small>TIFF
</small> file
</p> 
  33 <a name=
"SYNOPSIS"></a> 
  36 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  37        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  38 <tr valign=
"top" align=
"left"> 
  41 <p><b>#include 
<tiffio.h
></b></p> 
  43 <p><b>tsize_t TIFFReadTile(TIFF *
</b><i>tif
</i><b>,
 
  44 tdata_t
</b> <i>buf
</i><b>, uint32
</b> <i>x
</i><b>,
 
  45 uint32
</b> <i>y
</i><b>, uint32
</b> <i>z
</i><b>,
 
  46 tsample_t
</b> <i>sample
</i><b>)
</b></p> 
  49 <a name=
"DESCRIPTION"></a> 
  52 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  53        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  54 <tr valign=
"top" align=
"left"> 
  57 <p>Return the data for the tile 
<i>containing
</i> the
 
  58 specified coordinates. The data placed in 
<i>buf
</i> are
 
  59 returned decompressed and, typically, in the native byte-
 
  60 and bit-ordering, but are otherwise packed (see further
 
  61 below). The buffer must be large enough to hold an entire
 
  62 tile of data. Applications should call the routine
 
  63 <i>TIFFTileSize
</i> to find out the size (in bytes) of a
 
  64 tile buffer. The 
<i>x
</i> and 
<i>y
</i> parameters are always
 
  65 used by 
<i>TIFFReadTile
</i>. The 
<i>z
</i> parameter is used
 
  66 if the image is deeper than 
1 slice
 
  67 (
<i>ImageDepth
</i>>1). The 
<i>sample
</i> parameter is
 
  68 used only if data are organized in separate planes
 
  69 (
<i>PlanarConfiguration
</i>=
2).
</p> 
  75 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  76        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  77 <tr valign=
"top" align=
"left"> 
  80 <p>The library attempts to hide bit- and byte-ordering
 
  81 differences between the image and the native machine by
 
  82 converting data to the native machine order. Bit reversal is
 
  83 done if the 
<i>FillOrder
</i> tag is opposite to the native
 
  84 machine bit order. 
16- and 
32-bit samples are automatically
 
  85 byte-swapped if the file was written with a byte order
 
  86 opposite to the native machine byte order,
</p> 
  89 <a name=
"RETURN VALUES"></a> 
  90 <h2>RETURN VALUES
</h2> 
  92 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
  93        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
  94 <tr valign=
"top" align=
"left"> 
  97 <p><i>TIFFReadTile
</i> returns 
−1 if it detects an
 
  98 error; otherwise the number of bytes in the decoded tile is
 
 102 <a name=
"DIAGNOSTICS"></a> 
 105 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 106        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 107 <tr valign=
"top" align=
"left"> 
 110 <p>All error messages are directed to the
 
 111 <b>TIFFError
</b>(
3TIFF) routine.
</p> 
 114 <a name=
"SEE ALSO"></a> 
 117 <table width=
"100%" border=
0 rules=
"none" frame=
"void" 
 118        cols=
"2" cellspacing=
"0" cellpadding=
"0"> 
 119 <tr valign=
"top" align=
"left"> 
 122 <p><b>TIFFCheckTile
</b>(
3TIFF),
 
 123 <b>TIFFComputeTile
</b>(
3TIFF), 
<b>TIFFOpen
</b>(
3TIFF),
 
 124 <b>TIFFReadEncodedTile
</b>(
3TIFF),
 
 125 <b>TIFFReadRawTile
</b>(
3TIFF), 
<b>libtiff
</b>(
3TIFF)
</p> 
 127 <p>Libtiff library home page:
 
 128 <b>http://www.remotesensing.org/libtiff/
</b></p>