private void computeIFDOffset(){
  long bytesPerRow=(long)Math.ceil((sampleSize[0] / 8.0) * tileWidth * numBands);
  long bytesPerTile=bytesPerRow * tileLength;
  long lastTile=bytesPerTile;
  if (!isTiled) {
    long lastStripRows=length - (tileLength * (numTiles - 1));
    lastTile=lastStripRows * bytesPerRow;
  }
  long totalBytesOfData=bytesPerTile * (numTiles - 1) + lastTile;
  firstIFDOffset=8 + totalBytesOfData;
  if ((firstIFDOffset % 2) != 0) {
    firstIFDOffset++;
  }
}

private void computeIFDOffset ( ) { long bytesPerRow = ( long ) Math . ceil ( ( sampleSize [ 0 ] / 8.0 ) * tileWidth * numBands ) ; long bytesPerTile = bytesPerRow * tileLength ; long lastTile = bytesPerTile ; if ( ! isTiled ) { long lastStripRows = length - ( tileLength * ( numTiles - 1 ) ) ; lastTile = lastStripRows * bytesPerRow ; } long totalBytesOfData = bytesPerTile * ( numTiles - 1 ) + lastTile ; firstIFDOffset = 8 + totalBytesOfData ; if ( ( firstIFDOffset % 2 ) != 0 ) { firstIFDOffset ++ ; } }
precomputes the ifd offset for uncompressed data .
