ntained the first sample of each pixel;
    to handle either case one might use the following instead:
  </p>
  <p style="margin-left: 40px">
    <tt>#include "tiffio.h"<br>
    main()<br>
    {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;TIFF* tif = TIFFOpen("myfile.tif", "r");<br>
    &nbsp;&nbsp;&nbsp;&nbsp;if (tif) {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uint32 imagelength;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tdata_t buf;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;