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

ttile_t TIFFComputeTile ( TIFF tif,
uint32  x,
uint32  y,
uint32  z,
tsample_t  s 
)

Definition at line 68 of file tif_tile.c.

Referenced by TIFFReadTile(), and TIFFWriteTile().

{
    TIFFDirectory *td = &tif->tif_dir;
    uint32 dx = td->td_tilewidth;
    uint32 dy = td->td_tilelength;
    uint32 dz = td->td_tiledepth;
    ttile_t tile = 1;

    if (td->td_imagedepth == 1)
        z = 0;
    if (dx == (uint32) -1)
        dx = td->td_imagewidth;
    if (dy == (uint32) -1)
        dy = td->td_imagelength;
    if (dz == (uint32) -1)
        dz = td->td_imagedepth;
    if (dx != 0 && dy != 0 && dz != 0) {
        uint32 xpt = TIFFhowmany(td->td_imagewidth, dx); 
        uint32 ypt = TIFFhowmany(td->td_imagelength, dy); 
        uint32 zpt = TIFFhowmany(td->td_imagedepth, dz); 

        if (td->td_planarconfig == PLANARCONFIG_SEPARATE) 
            tile = (xpt*ypt*zpt)*s +
                 (xpt*ypt)*(z/dz) +
                 xpt*(y/dy) +
                 x/dx;
        else
            tile = (xpt*ypt)*(z/dz) + xpt*(y/dy) + x/dx;
    }
    return (tile);
}

Generated on Sat May 26 2012 04:48:30 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.