int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample) { int e; if (!TIFFCheckRead(tif, 0)) return (-1); if (e = TIFFSeek(tif, row, sample)) { /* * Decompress desired row into user buffer. */ e = (*tif->tif_decoderow) (tif, buf, tif->tif_scanlinesize, sample); tif->tif_row++; if (e) (*tif->tif_postdecode)(tif, buf, tif->tif_scanlinesize); } return (e ? 1 : -1); }
int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample) { int e; if (!TIFFCheckRead(tif, 0)) return (-1); if( (e = TIFFSeek(tif, row, sample)) != 0) { /* * Decompress desired row into user buffer. */ e = (*tif->tif_decoderow) (tif, (tidata_t) buf, tif->tif_scanlinesize, sample); /* we are now poised at the beginning of the next row */ tif->tif_row = row + 1; if (e) (*tif->tif_postdecode)(tif, (tidata_t) buf, tif->tif_scanlinesize); } return (e > 0 ? 1 : -1); }