ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static tsize_t TIFFReadRawStrip1 ( TIFF tif,
tstrip_t  strip,
tdata_t  buf,
tsize_t  size,
const char module 
) [static]

Definition at line 171 of file tif_read.c.

Referenced by TIFFFillStrip(), and TIFFReadRawStrip().

{
    TIFFDirectory *td = &tif->tif_dir;

    assert((tif->tif_flags&TIFF_NOREADRAW)==0);
    if (!isMapped(tif)) {
        tsize_t cc;

        if (!SeekOK(tif, td->td_stripoffset[strip])) {
            TIFFErrorExt(tif->tif_clientdata, module,
                "%s: Seek error at scanline %lu, strip %lu",
                tif->tif_name,
                (unsigned long) tif->tif_row, (unsigned long) strip);
            return (-1);
        }
        cc = TIFFReadFile(tif, buf, size);
        if (cc != size) {
            TIFFErrorExt(tif->tif_clientdata, module,
        "%s: Read error at scanline %lu; got %lu bytes, expected %lu",
                tif->tif_name,
                (unsigned long) tif->tif_row,
                (unsigned long) cc,
                (unsigned long) size);
            return (-1);
        }
    } else {
        if (td->td_stripoffset[strip] + size > tif->tif_size) {
            TIFFErrorExt(tif->tif_clientdata, module,
    "%s: Read error at scanline %lu, strip %lu; got %lu bytes, expected %lu",
                tif->tif_name,
                (unsigned long) tif->tif_row,
                (unsigned long) strip,
                (unsigned long) tif->tif_size - td->td_stripoffset[strip],
                (unsigned long) size);
            return (-1);
        }
        _TIFFmemcpy(buf, tif->tif_base + td->td_stripoffset[strip],
                            size);
    }
    return (size);
}

Generated on Mon May 28 2012 04:49:54 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.